public RotatingGeometryUpdater ( ) { } public boolean
public RotatingGeometryUpdater ( ) { } public boolean update( Graphics graphics, RenderingEngine engine, GeometryArray geometry, int index, long frameNumber ) { if ( lastFrame != frameNumber ) { lastFrame = frameNumber; Vector3d viewAngle = engine.getViewAngle( ); viewAngle.x += 1; engine.setViewAngle( viewAngle ); } return false; } } The MyJava3Dclass pulls all of these elements together. It creates an AwtRenderingEngineinstance, loads a GeometryArrayfrom disk using a Java 3D ObjectFileobject loader, adds the GeometryArrayto the AwtRenderingEngine, constructs a RenderingSurfacesupplying a RotatingGeometryUpdater, starts the RenderingSurface, and then adds it to the content pane of the JFramethat hosts the application. From MyJava3D.java /** * Render a 3D shape using a 3D rendering engine * that was written from scratch using AWT for * graphics operations. */ public class MyJava3D extends JFrame { 26
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services