sim.portrayal3d.simple
Class CubePortrayal3D
java.lang.Object
sim.portrayal3d.SimplePortrayal3D
sim.portrayal3d.simple.CubePortrayal3D
- All Implemented Interfaces:
- Portrayal, Portrayal3D, java.io.Serializable
- public class CubePortrayal3D
- extends SimplePortrayal3D
White cube of size 1, centered in the origin, perfect for a default portrayal.
Portions of this software is based on the file ColorCube.java, available
as part of the Java3D Developer Kit examples, and falls under the license
that came with that example. The license is listed at the end of this file.
The remainder of the file falls under the standard license for this library.
- See Also:
- Serialized Form
Method Summary |
javax.media.j3d.TransformGroup |
getModel(java.lang.Object obj,
javax.media.j3d.TransformGroup j3dModel)
If argument is null, it should behave like createModel;
otherwise, it is updateModel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CubePortrayal3D
public CubePortrayal3D()
getModel
public javax.media.j3d.TransformGroup getModel(java.lang.Object obj,
javax.media.j3d.TransformGroup j3dModel)
- Description copied from interface:
Portrayal3D
- If argument is null, it should behave like createModel;
otherwise, it is updateModel.
The newly created version or the updated one should be returned.
The sub-scene graph repesented by a portrayal is wraped
in a TransformGroup, so the parent could place the child
at the apropriate position relative to the parent's coordinate system.
The child is responsible for positioning itself relative to its own
coordinate system. E.g. if the model assumes the position for an
object is the postion of its center/upper-left corner/etc, then
the portrayal for the object should have the center/upper-left
corner of the J3D model of the object in the origin of its
coorniate system.