Java Programing

March 30, 2007

The Shape3Dclass is essential to defining viewable geometry

Filed under: Java 3D Programming — webmaster @ 2:41 pm

Figure 8.1 Geometric objects derived from Primitive: sphere, box, cylinder, and cone. Note the different resolution options and how the Primitives are triangulated when drawn as wire frames Primitive is not part of the Java 3D package (javax.media.j3d) but has been defined in the Java 3D utilities package (com.sun.java.j3d.utils). The Primitiveclass serves as the base class for several simple geometric shapes that can act as building blocks for Java 3D developers. The Java 3D Primitive-derived classes have been illustrated in figure 8.1. Primitiveis derived from Group that is, it is not a Shape3Dobject. This is important a Primitive is not a shape or geometric object, but is rather a collection of Shape3Dobjects. Primitiveprovides methods to access the subcomponents of the Group. There is therefore an important distinction between modifying the characteristics of the Primitive(Groupsettings) and modifying the properties of the child Shape3Dobjects (Shape3Dsettings such as Material, Appearance, etc.) Because of serious class design issues regarding the Primitivebase class, I cannot recommend that any of the Primitive-derived classes be used in a Java 3D application of any complexity. The fundamental issue is that the Primitiveclass defines a has-a relationship for its geometry. That is, a single Primitiveis defined such that it is a container for its geometric parts. For example, Boxhas six geometric parts: FRONT, BACK, LEFT, RIGHT TOP, and BOTTOM 109

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting