Class SparseGrid2DPortrayal3D

All Implemented Interfaces:
Portrayal, Portrayal3D

public class SparseGrid2DPortrayal3D extends SparseGridPortrayal3D
Displays objects in a SparseGrid2D along the XY grid in a special way. When multiple objects are at the same location, SparseGrid2DPortrayal3D will stack them up in a column towards the positive Z axis. The centers of stacked objects are separated by a value zScale, which by default is 1.0.
  • Field Details

    • zScale

      public double zScale
  • Constructor Details

    • SparseGrid2DPortrayal3D

      public SparseGrid2DPortrayal3D(double zScale)
      Creates a SparseGrid2DPortrayal3D with the provided scale
    • SparseGrid2DPortrayal3D

      public SparseGrid2DPortrayal3D()
      Creates a SparseGrid2DPortrayal3D with scale = 1.0
  • Method Details

    • setField

      public void setField(Object field)
      Description copied from class: FieldPortrayal
      Sets the field, and sets the dirtyField flag to true. May throw an exception if the field is inappropriate. The default version just sets the field and sets the dirtyField flag.
      Overrides:
      setField in class SparseGridPortrayal3D
    • createModel

      public javax.media.j3d.TransformGroup createModel()
      Description copied from class: FieldPortrayal3D
      Returns a tree structure of the form InternalTransformGroup[model info].

      ...where InternalTransformGroup is an identity transformgroup whose transform will be modified elsewhere (create it but don't play with it).

      Overrides:
      createModel in class SparseFieldPortrayal3D
    • updateModel

      public void updateModel(javax.media.j3d.TransformGroup globalTG)
      Description copied from class: FieldPortrayal3D
      Returns a tree structure of the form InternalTransformGroup[model info].

      ...where InternalTransformGroup is an identity transformgroup whose transform will be modified elsewhere (don't play with it). By default, this function does nothing. Override it to update the model when it's called.

      Overrides:
      updateModel in class SparseFieldPortrayal3D