public abstract class SparseFieldPortrayal3D extends FieldPortrayal3D
SparseFieldPortrayal3D presently takes the TransformGroups of the models of its children and wraps them into BranchGroups so that they can be removed and added dynamically.
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals
Constructor and Description |
---|
SparseFieldPortrayal3D() |
Modifier and Type | Method and Description |
---|---|
javax.media.j3d.TransformGroup |
createModel()
Returns a tree structure of the form
InternalTransformGroup[model info].
|
abstract javax.vecmath.Vector3d |
getLocationOfObjectAsVector3d(java.lang.Object location,
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 |
updateModel(javax.media.j3d.TransformGroup globalTG)
Returns a tree structure of the form
InternalTransformGroup[model info].
|
protected javax.media.j3d.BranchGroup |
wrapModelForNewObject(java.lang.Object o,
javax.media.j3d.Transform3D localT)
This function is called from createModel for each object in the
field and from the updateModel part of getModel for the
new objects.
|
completedWrapper, getCurrentDisplay, getCurrentGUIState, getDefaultPortrayal, getDefaultTransform, getModel, getObjectLocation, getTransform, polygonAttributes, resetTransform, rotateX, rotateY, rotateZ, scale, scale, setCurrentDisplay, setObjectLocation, setTransform, transform, translate
getDefaultNullPortrayal, getField, getInspector, getName, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isDirtyField, isImmutableField, reset, setDirtyField, setField, setImmutableField, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected, setSelected
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInspector, getName, getStatus, setSelected
public abstract javax.vecmath.Vector3d getLocationOfObjectAsVector3d(java.lang.Object location, javax.vecmath.Vector3d putInHere)
public javax.media.j3d.TransformGroup createModel()
FieldPortrayal3D
...where InternalTransformGroup is an identity transformgroup whose transform will be modified elsewhere (create it but don't play with it).
createModel
in class FieldPortrayal3D
protected javax.media.j3d.BranchGroup wrapModelForNewObject(java.lang.Object o, javax.media.j3d.Transform3D localT)
In order to dynamically add/remove the subtrees associated with children, this function wraps their TransformGroups into BranchGroups.
public void updateModel(javax.media.j3d.TransformGroup globalTG)
FieldPortrayal3D
...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.
updateModel
in class FieldPortrayal3D