Class ValueGridPortrayal3D

All Implemented Interfaces:
Portrayal, Portrayal3D

public class ValueGridPortrayal3D extends FieldPortrayal3D
  • Constructor Details

    • ValueGridPortrayal3D

      public ValueGridPortrayal3D()
    • ValueGridPortrayal3D

      public ValueGridPortrayal3D(String valueName)
    • ValueGridPortrayal3D

      public ValueGridPortrayal3D(double s)
    • ValueGridPortrayal3D

      public ValueGridPortrayal3D(String valueName, double scale)
  • Method Details

    • getMap

      public ColorMap getMap()
    • setMap

      public void setMap(ColorMap m)
    • getValueName

      public String getValueName()
    • setValueName

      public void setValueName(String name)
    • getScale

      public double getScale()
    • setScale

      public void setScale(double val)
    • 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(Object field)
      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 class FieldPortrayal
    • getField

      public 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, 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: 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).

      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 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 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
    • getColorFor

      public Color getColorFor(Object wrapper)
      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.