Package 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:
Portrayal
,Portrayal3D
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 Summary
Fields inherited from class sim.portrayal.FieldPortrayal
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals
-
Constructor Summary
ConstructorDescriptionCreates a SparseGrid2DPortrayal3D with scale = 1.0SparseGrid2DPortrayal3D
(double zScale) Creates a SparseGrid2DPortrayal3D with the provided scale -
Method Summary
Modifier and TypeMethodDescriptionjavax.media.j3d.TransformGroup
Returns a tree structure of the form InternalTransformGroup[model info].void
Sets the field, and sets the dirtyField flag to true.void
updateModel
(javax.media.j3d.TransformGroup globalTG) Returns a tree structure of the form InternalTransformGroup[model info].Methods inherited from class sim.portrayal3d.grid.SparseGridPortrayal3D
completedWrapper, getLocationOfObjectAsVector3d
Methods inherited from class sim.portrayal3d.SparseFieldPortrayal3D
wrapModelForNewObject
Methods inherited from class sim.portrayal3d.FieldPortrayal3D
getCurrentDisplay, getCurrentGUIState, getDefaultPortrayal, getDefaultTransform, getModel, getObjectLocation, getTransform, polygonAttributes, resetTransform, rotateX, rotateY, rotateZ, scale, scale, setCurrentDisplay, setObjectLocation, setTransform, transform, translate
Methods inherited from class sim.portrayal.FieldPortrayal
getAlternatePortrayalOrdering, getDefaultNullPortrayal, getField, getInspector, getName, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isDirtyField, isImmutableField, reset, setAlternatePortrayalOrdering, setDirtyField, setImmutableField, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected, setSelected
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface sim.portrayal.Portrayal
getInspector, getName, getStatus, setSelected
-
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
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 classSparseGridPortrayal3D
-
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 classSparseFieldPortrayal3D
-
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 classSparseFieldPortrayal3D
-