/** * Get the current View Angle used
repainton the JPanel, forcing the scene to be continuously redrawn. The Surfaceclass, which is the base class for AnimatingSurface(both taken from Sun Java 2D demos), allows you to specify Java 2D rendering hints such as RenderingHints.VALUE_ANTIALIAS_OFF, which switches off antialiasing, and RenderingHints.VALUE_RENDER_SPEED, which tells the Graphicsobject to optimize for speed rather than rendering quality. It is interesting to see the effect of switching on antialiasing (figure 2.4 is on, figure 2.7 is off), as rendering APIs or 3D graphics hardware does not commonly support this functionality. Figure 2.7 MyJava3D rendering with Java2D antialiasing enabled The RotatingGeometryUpdaterclass is used to increase the X-angle of the viewer after each subsequent frame. From RotatingGeometryUpdater.java /** * Implementation of the GeometryUpdater interface * that rotates the scene by changing the viewer position * and the scale factor for the model. */ public class RotatingGeometryUpdater implements GeometryUpdater { long lastFrame = -1; 25
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services