sim.portrayal3d.grid
Class ValueGridPortrayal3D

java.lang.Object
  extended by sim.portrayal.FieldPortrayal
      extended by sim.portrayal3d.FieldPortrayal3D
          extended by sim.portrayal3d.grid.ValueGridPortrayal3D
All Implemented Interfaces:
java.io.Serializable, Portrayal, Portrayal3D

public class ValueGridPortrayal3D
extends FieldPortrayal3D

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class sim.portrayal.FieldPortrayal
FieldPortrayal.CustomInspector
 
Field Summary
 ColorMap map
           
 double scale
           
 
Fields inherited from class sim.portrayal.FieldPortrayal
classPortrayals, dirtyField, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals
 
Constructor Summary
ValueGridPortrayal3D()
           
ValueGridPortrayal3D(double s)
           
ValueGridPortrayal3D(java.lang.String valueName)
           
ValueGridPortrayal3D(java.lang.String valueName, double scale)
           
 
Method Summary
 LocationWrapper completedWrapper(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.TransformGroup createModel()
          Returns a tree structure of the form InternalTransform[model info].
 Portrayal getDefaultPortrayal()
          Should return a portrayal which can portray any object regardless of whether it's valid or not
 java.lang.Object getField()
          Returns the field.
 ColorMap getMap()
           
 java.lang.String getValueName()
           
 double newValue(int x, int y, int z)
           
 javax.media.j3d.PolygonAttributes polygonAttributes()
          Provides a PolygonAttributes which can be modified to change the underlying model's attributes (culling, vertex versus point versus fill).
 void setField(java.lang.Object field)
          Sets the field.
 void setMap(ColorMap m)
           
 void updateModel(javax.media.j3d.TransformGroup modelTG)
          Returns a tree structure of the form InternalTransform[model info].
 
Methods inherited from class sim.portrayal3d.FieldPortrayal3D
getDefaultTransform, getModel, getTransform, resetTransform, rotateX, rotateY, rotateZ, scale, scale, setTransform, transform, translate
 
Methods inherited from class sim.portrayal.FieldPortrayal
getDefaultNullPortrayal, getInspector, getName, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isImmutableField, 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 Detail

scale

public double scale

map

public ColorMap map
Constructor Detail

ValueGridPortrayal3D

public ValueGridPortrayal3D()

ValueGridPortrayal3D

public ValueGridPortrayal3D(java.lang.String valueName)

ValueGridPortrayal3D

public ValueGridPortrayal3D(double s)

ValueGridPortrayal3D

public ValueGridPortrayal3D(java.lang.String valueName,
                            double scale)
Method Detail

getMap

public ColorMap getMap()

setMap

public void setMap(ColorMap m)

getValueName

public java.lang.String getValueName()

getDefaultPortrayal

public Portrayal getDefaultPortrayal()
Description copied from class: FieldPortrayal
Should return a portrayal which can portray any object regardless of whether it's valid or not

Overrides:
getDefaultPortrayal in class FieldPortrayal3D

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.

Specified by:
setField in class FieldPortrayal

getField

public java.lang.Object getField()
Description copied from class: FieldPortrayal
Returns the field.

Overrides:
getField in class FieldPortrayal

polygonAttributes

public javax.media.j3d.PolygonAttributes polygonAttributes()
Description copied from interface: Portrayal3D
Provides 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:
polygonAttributes in interface Portrayal3D
Overrides:
polygonAttributes in class FieldPortrayal3D

newValue

public double newValue(int x,
                       int y,
                       int z)

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).

Specified by:
createModel in class FieldPortrayal3D

updateModel

public void updateModel(javax.media.j3d.TransformGroup modelTG)
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 FieldPortrayal3D

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 class FieldPortrayal3D