Package sim.portrayal3d.grid
Class SparseGridPortrayal3D
java.lang.Object
sim.portrayal.FieldPortrayal
sim.portrayal3d.FieldPortrayal3D
sim.portrayal3d.SparseFieldPortrayal3D
sim.portrayal3d.grid.SparseGridPortrayal3D
- All Implemented Interfaces:
Portrayal
,Portrayal3D
- Direct Known Subclasses:
SparseGrid2DPortrayal3D
Portrays both SparseGrid2D and SparseGrid3D fields. A (0,0) or (0,0,0) object is centered
on the origin. 2D fields are spread through the XY plane and are presumed to have Z=0.
Generally speaking, SparseGrid2D is better drawn using a different class: the SparseGrid2DPortrayal3D.
-
Field Summary
Fields inherited from class sim.portrayal.FieldPortrayal
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompletedWrapper
(LocationWrapper w, com.sun.j3d.utils.picking.PickIntersection pi, com.sun.j3d.utils.picking.PickResult pr) Given the provided PickIntersection and the PickResult it came from, fill in w the location of the picked object, and return it.javax.vecmath.Vector3d
getLocationOfObjectAsVector3d
(Object obj, javax.vecmath.Vector3d putInHere) Converts a given location (perhaps a Double3D, Double2D, Int3D, or Int2D) into a Vector3d, placing it in the given Vector3d, and returning that Vector3d.void
Sets the field, and sets the dirtyField flag to true.Methods inherited from class sim.portrayal3d.SparseFieldPortrayal3D
createModel, updateModel, 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
-
Constructor Details
-
SparseGridPortrayal3D
public SparseGridPortrayal3D()
-
-
Method Details
-
getLocationOfObjectAsVector3d
public javax.vecmath.Vector3d getLocationOfObjectAsVector3d(Object obj, javax.vecmath.Vector3d putInHere) Description copied from class:SparseFieldPortrayal3D
Converts a given location (perhaps a Double3D, Double2D, Int3D, or Int2D) into a Vector3d, placing it in the given Vector3d, and returning that Vector3d. Double2D and Int2D should convert to a Vector3d with a zero Z value.- Specified by:
getLocationOfObjectAsVector3d
in classSparseFieldPortrayal3D
-
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 classFieldPortrayal
-
completedWrapper
public LocationWrapper completedWrapper(LocationWrapper w, com.sun.j3d.utils.picking.PickIntersection pi, com.sun.j3d.utils.picking.PickResult pr) Description copied from class:FieldPortrayal3D
Given the provided PickIntersection and the PickResult it came from, fill in w the location of the picked object, and return it. Alternatively, return a new LocationWrapper with all information filled in. The PickResult is provided you in case the object is in a shared group and you need to identify what link had connected to it.- Specified by:
completedWrapper
in classFieldPortrayal3D
-