Java Programing

May 4, 2007

public RotatingGeometryUpdater ( ) { } public boolean

Filed under: Java 3D Programming — webmaster @ 1:24 am

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

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