Java Programing

February 4, 2007

Figure 14.27 Transparency = 0.2, PolygonAttributes.CULL_NONE. Shape3D with

Filed under: Java 3D Programming — webmaster @ 4:22 pm

CHAPTER 15 Geometry utility classes and object loaders 15.1 Introduction 15.2 Triangulator, normal vector generator, stripifier 15.3 Object loaders 15.4 Summary This chapter explains some of the utility classes that Java 3D supplies to help you import or generate geometry for your scenes. 15.1 Introduction Java 3D comes with three utility classes that facilitate runtime geometry creation: Triangulatorconverts a list of points and connectivity information into a GeometryArray composed of triangles. NormalGeneratorgenerates Normal vectors for a list of triangles. Stripifierredefines an existing triangle list such that the triangles are specified in longs strips, with adjacent triangles sharing as many vertices as possible. Triangle lists are stripified to speed rendering by graphics hardware and software underlying Java 3D. The geometry compression classes allow Java 3D to create an internal compressed representation of geometry information. If the graphics hardware supports using compressed geometry, the result may be faster rendering time and lower memory usage. Geometry compression can also be useful for applications that need to send Java 3D geometry across network connections using serialization or Java RMI. Refer to the API documentation for further details. The Java 3D object loaders define an architecture for writing files to import geometry data into Java 3D. Sun supplies two loaders as part of the Java 3D utilities package: Lightwave 3D Object file In addition, the Java 3D/VRML working groups maintain a VRML loader to import VRML (WRL) files into Java 3D. The VRML loader must be downloaded separately (VRML97.JAR). The example VrmlPickingTestuses the VRML97 loader. The VRML97 loader is no longer be ing developed and is being replaced by the loaders being developed for the X3D standard, hosted at http://www.web3d.org. 15.2 Triangulator, normal vector generator, stripifier Triangulation is a mechanism to convert arbitrary polygons to triangular surfaces for rendering. The com.sun.j3d.utils.geometry.Triangulatorclass can be used not only to convert an arbitrary n-sided polygon (which does not have to be planar) to triangul ar surfaces, but also to create holes in the generated composite surface. To use the Triangulator, put your vertex coordinates into a double or float 259

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP 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