The Shape3D object does not contain information about the shape or color of a visual object. This information is stored in the NodeComponent objects referred to by the Shape3D object. A Shape3D object can refer to one Geometry node component and one Appearance node component.
Shape3D对象不包含对象的颜色和形状。这些信息包含在对应的NodeComponent中。一个Shape3D对象可以引用一个Geometry node component和一个Appearance node component.
A visual object can be defined using just a Shape3D object and a Geometry node component.
一个可见对象可以只用一个Shape3D object和一个Geometry node component,即可以不包含Appearance node component。
As long as the Shape3D object is not live and not compiled, the node component references can be
changed with the methods shown in the next reference block. These methods can be used on live or
compiled Shape3D objects if the capabilities to do so are set first.
只要Shape3D object不是live且没有被编译,则可以改变它的node component引用。如果设置了对应的capabilities,则Live或者编译之后也可以改变。
NodeComponent objects contain the exact specification of the attributes of a visual object.
NodeComponent包含可见对象的精确描述和属性。
Defining Visual Object Classes
方法1:继承Shape3D
方法2:to define a container class not derived from Java 3D
API classes. In this design, the visual object class would contain a Group Node or a Shape3D as the
root of the subgraph it defines. The class must define method(s) to return a reference to this root.
这种方法不是使用继承而是使用组合。
方法3:A third possible organization for a visual object class is one similar to the classes Box, Cone, Cylinder,and Sphere defined in the com.sun.j3d.utils.geometry package.
These primitives are composed of multiple Shape3D objects in a group.所以他们才是继承自Group而不是Shape3D。
The geometry of a primitive utility class does not define color.