sim.portrayal3d.grid
Class SparseGrid2DPortrayal3D
java.lang.Object
sim.portrayal.FieldPortrayal
sim.portrayal3d.FieldPortrayal3D
sim.portrayal3d.SparseFieldPortrayal3D
sim.portrayal3d.grid.SparseGridPortrayal3D
sim.portrayal3d.grid.SparseGrid2DPortrayal3D
- All Implemented Interfaces:
- java.io.Serializable, 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.
- See Also:
- Serialized Form
Method Summary |
javax.media.j3d.TransformGroup |
createModel()
Returns a tree structure of the form
InternalTransform[model info]. |
void |
setField(java.lang.Object field)
Sets the field. |
void |
updateModel(javax.media.j3d.TransformGroup globalTG)
Returns a tree structure of the form
InternalTransform[model info]. |
Methods inherited from class sim.portrayal3d.FieldPortrayal3D |
getDefaultPortrayal, getDefaultTransform, getModel, getTransform, polygonAttributes, resetTransform, rotateX, rotateY, rotateZ, scale, scale, setTransform, transform, translate |
Methods inherited from class sim.portrayal.FieldPortrayal |
getDefaultNullPortrayal, getField, getInspector, getName, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isImmutableField, setImmutableField, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zScale
public double zScale
SparseGrid2DPortrayal3D
public SparseGrid2DPortrayal3D(double zScale)
- Creates a SparseGrid2DPortrayal3D with the provided scale
SparseGrid2DPortrayal3D
public SparseGrid2DPortrayal3D()
- Creates a SparseGrid2DPortrayal3D with scale = 1.0
setField
public void setField(java.lang.Object field)
- Description copied from class:
FieldPortrayal
- Sets the field. Also sets dirtyField = true. May throw an exception if the field is inappropriate.
- Overrides:
setField
in class SparseGridPortrayal3D
createModel
public javax.media.j3d.TransformGroup createModel()
- Description copied from class:
FieldPortrayal3D
- Returns a tree structure of the form
InternalTransform[model info].
...where InternalTransform 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
InternalTransform[model info].
...where InternalTransform 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