Package sim.portrayal3d.grid
Class ValueGridPortrayal3D
java.lang.Object
sim.portrayal.FieldPortrayal
sim.portrayal3d.FieldPortrayal3D
sim.portrayal3d.grid.ValueGridPortrayal3D
- All Implemented Interfaces:
Portrayal,Portrayal3D
-
Field Summary
Fields inherited from class sim.portrayal.FieldPortrayal
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals -
Constructor Summary
ConstructorsConstructorDescriptionValueGridPortrayal3D(double s) ValueGridPortrayal3D(String valueName) ValueGridPortrayal3D(String valueName, double scale) -
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.media.j3d.TransformGroupReturns a tree structure of the form InternalTransformGroup[model info].getColorFor(Object wrapper) Returns the color presently mapped to the value stored within the given wrapper.Should return a portrayal which can portray any object regardless of whether it's valid or notgetField()Returns the field.getMap()doublegetScale()doublenewValue(int x, int y, int z, double value) This method is called by the default inspector to filter new values set by the user.javax.media.j3d.PolygonAttributesProvides a PolygonAttributes which can be modified to change the underlying model's attributes (culling, vertex versus point versus fill).voidSets the field, and sets the dirtyField flag to true.voidvoidsetScale(double val) voidsetValueName(String name) voidupdateModel(javax.media.j3d.TransformGroup modelTG) Returns a tree structure of the form InternalTransformGroup[model info].Methods inherited from class sim.portrayal3d.FieldPortrayal3D
getCurrentDisplay, getCurrentGUIState, getDefaultTransform, getModel, getObjectLocation, getTransform, resetTransform, rotateX, rotateY, rotateZ, scale, scale, setCurrentDisplay, setObjectLocation, setTransform, transform, translateMethods inherited from class sim.portrayal.FieldPortrayal
getAlternatePortrayalOrdering, getDefaultNullPortrayal, getInspector, getName, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isDirtyField, isImmutableField, reset, setAlternatePortrayalOrdering, setDirtyField, setImmutableField, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected, setSelectedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sim.portrayal.Portrayal
getInspector, getName, getStatus, setSelected
-
Constructor Details
-
ValueGridPortrayal3D
public ValueGridPortrayal3D() -
ValueGridPortrayal3D
-
ValueGridPortrayal3D
public ValueGridPortrayal3D(double s) -
ValueGridPortrayal3D
-
-
Method Details
-
getMap
-
setMap
-
getValueName
-
setValueName
-
getScale
public double getScale() -
setScale
public void setScale(double val) -
getDefaultPortrayal
Description copied from class:FieldPortrayalShould return a portrayal which can portray any object regardless of whether it's valid or not- Overrides:
getDefaultPortrayalin classFieldPortrayal3D
-
setField
Description copied from class:FieldPortrayalSets 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:
setFieldin classFieldPortrayal
-
getField
Description copied from class:FieldPortrayalReturns the field.- Overrides:
getFieldin classFieldPortrayal
-
polygonAttributes
public javax.media.j3d.PolygonAttributes polygonAttributes()Description copied from interface:Portrayal3DProvides a PolygonAttributes which can be modified to change the underlying model's attributes (culling, vertex versus point versus fill). This is an optional function: you are free to return null- Specified by:
polygonAttributesin interfacePortrayal3D- Overrides:
polygonAttributesin classFieldPortrayal3D
-
newValue
public double newValue(int x, int y, int z, double value) This method is called by the default inspector to filter new values set by the user. You should return the "corrected" value if the given value is invalid. The default version of this method bases values on the values passed into the setLevels() and setColorTable() methods. -
createModel
public javax.media.j3d.TransformGroup createModel()Description copied from class:FieldPortrayal3DReturns 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).
- Specified by:
createModelin classFieldPortrayal3D
-
updateModel
public void updateModel(javax.media.j3d.TransformGroup modelTG) Description copied from class:FieldPortrayal3DReturns 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:
updateModelin classFieldPortrayal3D
-
completedWrapper
public LocationWrapper completedWrapper(LocationWrapper w, com.sun.j3d.utils.picking.PickIntersection pi, com.sun.j3d.utils.picking.PickResult pr) Description copied from class:FieldPortrayal3DGiven 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:
completedWrapperin classFieldPortrayal3D
-
getColorFor
Returns the color presently mapped to the value stored within the given wrapper. The wrapper must have been generated by ValueGridPortrayal3D, else a cast error will be raised. Used solely by ValuePortrayal3D to determine the color of the object passed it. It's an Object rather than a LocationWrapper to save an unneccessary cast.
-