Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.portrayal3d.simple
Class ValuePortrayal3D

    java.lang.Object
      sim.portrayal3d.SimplePortrayal3D
          sim.portrayal3d.simple.PrimitivePortrayal3D
              sim.portrayal3d.simple.Shape3DPortrayal3D
                  sim.portrayal3d.simple.ValuePortrayal3D

All Implemented Interfaces:
  java.io.Serializable, Portrayal, Portrayal3D

    public class ValuePortrayal3D

extends Shape3DPortrayal3D

ValuePortrayal3D defines a cube or square whose color and transparency can be changed, and is really intended solely for use in ValueGridPortrayal3D. Note that although ValuePortrayal3D is a subclass of Shape3DPortrayal3D, it does not include a Transform3D and so cannot be scaled or rotated. This is mostly for speed reasons.

ValuePortrayal3D has settable polygon attributes: so you can have it display with faces, as a wireframe, or as corner dots (just change the desired value in the options panel of the Display3D when running).

See Also:
  Serialized Form

Nested Class Summary
`static class` | `ValuePortrayal3D.DoubleFilter`
`static class` | `ValuePortrayal3D.Filter`
`static class` | `ValuePortrayal3D.IntFilter`

Field Summary
`static int` | `SHAPE_CUBE`
`static int` | `SHAPE_SQUARE`

Fields inherited from class sim.portrayal3d.simple.PrimitivePortrayal3D
`group`

Fields inherited from class sim.portrayal3d.SimplePortrayal3D
`DEFAULT_APPEARANCE`

Constructor Summary
`ValuePortrayal3D()` Creates a ValuePortrayal3D with a cube shape.
`ValuePortrayal3D(int shape)` Creates a ValuePortrayal3D with a cube (SHAPE_CUBE) or square (SHAPE_SQUARE) shape.

Method Summary
`Inspector` | `getInspector(LocationWrapper wrapper, GUIState state)` Provide an inspector for an object.
`javax.media.j3d.TransformGroup` | `getModel(java.lang.Object obj, javax.media.j3d.TransformGroup j3dModel)` We suggest that if you wish to override this to change the appearance or scale or transform of the underlying model, do the changes first and THEN call super.getModel(obj, j3dModel).
`java.lang.String` | `getName(LocationWrapper wrapper)` Returns a static, one-line name for the given object that is useful for a human to distinguish it from other objects.
`protected javax.media.j3d.Shape3D` | `getShape(javax.media.j3d.TransformGroup j3dModel, int shapeNumber)` Returns the shape by the given index.
`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).
`boolean` | `setTransform(javax.media.j3d.TransformGroup j3dModel, javax.media.j3d.Transform3D transform)` Returns false and does not set the transform (there's nothing to set).

Methods inherited from class sim.portrayal3d.simple.Shape3DPortrayal3D
`numShapes`

Methods inherited from class sim.portrayal3d.simple.PrimitivePortrayal3D
`getAppearance, setAppearance, setPickable, setScale, setShape3DFlags`

Methods inherited from class sim.portrayal3d.SimplePortrayal3D
`appearanceForColor, appearanceForColors, appearanceForImage, clearPickableFlags, getCurrentDisplay, getCurrentFieldPortrayal, getCurrentGUIState, getStatus, isSelected, setAppearanceFlags, setCurrentDisplay, setCurrentFieldPortrayal, setPickableFlags, setPickableFlags, setSelected`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SHAPE_CUBE

    public static final int SHAPE_CUBE

See Also:
  Constant Field Values

### SHAPE_SQUARE

    public static final int SHAPE_SQUARE

See Also:
  Constant Field Values

Constructor Detail

### ValuePortrayal3D

    public ValuePortrayal3D()

  Creates a ValuePortrayal3D with a cube shape.

### ValuePortrayal3D

    public ValuePortrayal3D(int shape)

  Creates a ValuePortrayal3D with a cube (SHAPE_CUBE) or square (SHAPE_SQUARE) shape.

Method Detail

### setTransform

    public boolean setTransform(javax.media.j3d.TransformGroup j3dModel,
                                javax.media.j3d.Transform3D transform)

  Returns false and does not set the transform (there's nothing to set).

  Overrides:
    `setTransform` in class `PrimitivePortrayal3D`

### getShape

    protected javax.media.j3d.Shape3D getShape(javax.media.j3d.TransformGroup j3dModel,
                                               int shapeNumber)

  Description copied from class: `PrimitivePortrayal3D`
  Returns the shape by the given index. Cylinder has three shapes (BODY=0, TOP=1, BOTTOM=2), while Cone has two shapes (BODY=0, CAP=1) and Sphere has a single shape (BODY=0). Useful for use in for-loops in combination with numShapes().

  Overrides:
    `getShape` in class `Shape3DPortrayal3D`

### 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 `SimplePortrayal3D`

### getModel

    public javax.media.j3d.TransformGroup getModel(java.lang.Object obj,
                                                   javax.media.j3d.TransformGroup j3dModel)

  Description copied from class: `PrimitivePortrayal3D`
  We suggest that if you wish to override this to change the appearance or scale or transform of the underlying model, do the changes first and THEN call super.getModel(obj, j3dModel). Be sure to also set the appearance/scale/transform of the model the first time (that is, when j3dModel is null) as well as when something interesting changes necessitating an update.

  Specified by:
    `getModel` in interface `Portrayal3D`
  Overrides:
    `getModel` in class `PrimitivePortrayal3D`

### getInspector

    public Inspector getInspector(LocationWrapper wrapper,
                                  GUIState state)

  Description copied from interface: `Portrayal`
  Provide an inspector for an object.

  Specified by:
    `getInspector` in interface `Portrayal`
  Overrides:
    `getInspector` in class `SimplePortrayal3D`

### getName

    public java.lang.String getName(LocationWrapper wrapper)

  Description copied from interface: `Portrayal`
  Returns a static, one-line name for the given object that is useful for a human to distinguish it from other objects. A simple default would be just to return "" + object.

  Specified by:
    `getName` in interface `Portrayal`
  Overrides:
    `getName` in class `SimplePortrayal3D`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD