856
Support / Re: How to Hardware Mode
« on: February 26, 2008, 01:33:07 pm »
Removing that line helped (before the complete canvas was grey). Now, with that line removed, I am getting a black screen (no textures are being drawn).
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.io.InputStream;
import javax.swing.JApplet;
import com.threed.jpct.Camera;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.IRenderer;
import com.threed.jpct.Lights;
import com.threed.jpct.Loader;
import com.threed.jpct.Matrix;
import com.threed.jpct.Object3D;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import java.lang.System;
public class jPCTGears extends JApplet implements MouseListener, MouseMotionListener
{
private Object3D redGear, greenGear, blueGear, assemblyPivot;
private FrameBuffer buffer = null;
private World world = null;
private Camera camera = null;
private int width = 640;
private int height = 480;
private float gear_rotation = 0.02f;
private int prevMouseX, prevMouseY;
Canvas myCanvas;
// Initialize all components of the applet
@Override
public void init()
{
// sign the applet up to receive mouse messages:
addMouseListener( this );
addMouseMotionListener( this );
world = new World(); // create a new world
World.setDefaultThread( Thread.currentThread() );
// create a new buffer to draw on:
buffer = new FrameBuffer( width, height, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY );
buffer.enableRenderer( IRenderer.RENDERER_OPENGL );
buffer.disableRenderer( IRenderer.RENDERER_SOFTWARE );
myCanvas = buffer.enableGLCanvasRenderer();
add( myCanvas, BorderLayout.CENTER);
myCanvas.setVisible( true );
// load some 3D objects and make sure they have the correct orientation:
redGear = loadMeshFile( "RedGear.3ds" );
redGear.rotateY( (float)Math.PI / 2.0f );
redGear.rotateMesh();
redGear.setRotationMatrix( new Matrix() );
redGear.setOrigin( new SimpleVector( 0, 0, 0 ) );
redGear.build();
greenGear = loadMeshFile( "GreenGear.3ds" );
greenGear.rotateY( (float)Math.PI / 2.0f );
greenGear.rotateZ( 0.35f );
greenGear.rotateMesh();
greenGear.setRotationMatrix( new Matrix() );
greenGear.setOrigin( new SimpleVector( -145.0f, 0, 0 ) );
greenGear.build();
blueGear = loadMeshFile( "BlueGear.3ds" );
blueGear.rotateY( (float)Math.PI / 2.0f );
//blueGear.rotateZ( 0.40f );
blueGear.rotateMesh();
blueGear.setRotationMatrix( new Matrix() );
blueGear.setOrigin( new SimpleVector( 0, -140.0f, 0 ) );
blueGear.build();
// Set up a pivot point for the entire gear assembly:
assemblyPivot = Object3D.createDummyObj();
assemblyPivot.setOrigin( new SimpleVector( 0, 0, 0 ) );
// Make the gears children to assemblyPivot.
// Translations and rotations to assemblyPivot
// will affect the entire gear assembly:
assemblyPivot.addChild( redGear );
assemblyPivot.addChild( greenGear );
assemblyPivot.addChild( blueGear );
// add the objects our world:
world.addObject( redGear );
world.addObject( greenGear );
world.addObject( blueGear );
world.buildAllObjects();
lookAt( redGear ); // make sure the camera is facing towards the object
letThereBeLight(); // create light sources for the scene
}
// Draw the scene
@Override
public void paint( Graphics g )
{
// rotate the gears:
redGear.rotateAxis( redGear.getZAxis(), -gear_rotation );
greenGear.rotateAxis( greenGear.getZAxis(), 2.0f * gear_rotation );
blueGear.rotateAxis( blueGear.getZAxis(), 2.0f * gear_rotation );
buffer.clear(); // erase the previous frame
// render the world onto the buffer:
world.renderScene( buffer );
world.draw( buffer );
buffer.update();
buffer.displayGLOnly();
myCanvas.repaint( 200, 0, 0, width, height );
}
// Load a 3Ds file, and return its Object3D handle
public Object3D loadMeshFile( String filename )
{
Object3D newObject;
//Object3D[] objs = Loader.load3DS( myURL, "models" + "/" + filename, 1.0f );
Object3D[] objs = Loader.load3DS( getResource( filename ), 1.0f );
if( objs.length==1 )
{
// The object loaded fine, just need to initialize it
newObject=objs[0];
newObject.setCulling( Object3D.CULLING_DISABLED );
newObject.build();
}
else
{
// Didn't load anything, or loaded
// more than 1 object (not supposed to happen)
System.out.println( "Unknown file format: " + filename );
newObject = null;
}
return newObject;
}
private InputStream getResource( String resourceName )
{
return getClass().getClassLoader().getResourceAsStream( resourceName );
}
// point the camera toward the given object
private void lookAt( Object3D obj )
{
camera = world.getCamera(); // grab a handle to the camera
camera.setPosition( 0, 0, 500 ); // set its *relative* position
camera.lookAt( obj.getTransformedCenter() ); // look toward the object
}
// create light sources for the scene
private void letThereBeLight()
{
world.getLights().setOverbrightLighting (
Lights.OVERBRIGHT_LIGHTING_DISABLED );
world.getLights().setRGBScale( Lights.RGB_SCALE_2X );
// Set the overall brightness of the world:
world.setAmbientLight( 50, 50, 50 );
// Create a main light-source:
world.addLight( new SimpleVector( 50, -50, 300 ), 20, 20, 20 );
}
// Dragging the mouse should rotate the entire gear assembly
public void mouseDragged( MouseEvent e )
{
// get the mouse's coordinates:
int x = e.getX();
int y = e.getY();
Dimension size = e.getComponent().getSize();
// Calculate the angles to rotate the assembly:
float thetaY = (float)Math.PI * ( (float)(x-prevMouseX)/(float)size.width );
float thetaX = (float)Math.PI * ( (float)(prevMouseY-y)/(float)size.height );
// Apply the rotations to the gear assembly:
assemblyPivot.rotateAxis( assemblyPivot.getXAxis(), thetaX );
assemblyPivot.rotateAxis( assemblyPivot.getYAxis(), thetaY );
// Keep track of the mouse location:
prevMouseX = x;
prevMouseY = y;
}
public void mousePressed( MouseEvent e )
{
// Start keeping track of the mouse location now.
// This prevent the gear assembly from jerking to the new angle
// whenever mouseDragged first gets called:
prevMouseX = e.getX();
prevMouseY = e.getY();
}
public void mouseReleased( MouseEvent e ){}
public void mouseEntered( MouseEvent e ) {}
public void mouseExited( MouseEvent e ) {}
public void mouseClicked( MouseEvent e ) {}
public void mouseMoved( MouseEvent e ) {}
}
Java version is: 1.6.0_03
-> support for BufferedImage
Version helper for 1.2+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Current mode:640 x 480 x 32 @120Hz
Driver is: ati2dvag/6.14.10.6666 on ATI Technologies Inc. / RADEON XPRESS Series x86/MMX/3DNow!/SSE2
FBO supported and used!
OpenGL renderer initialized (using 4 texture stages)
Software renderer disposed
Loading file from InputStream
File from InputStream loaded...51142 bytes
Processing new material FlatRed!
Processing object from 3DS-file: Gear
Object 'Gear_jPCT0' created using 728 polygons and 364 vertices.
Loading file from InputStream
File from InputStream loaded...29586 bytes
Processing new material FlatGreen!
Processing object from 3DS-file: Gear
Object 'Gear_jPCT1' created using 420 polygons and 210 vertices.
Loading file from InputStream
File from InputStream loaded...33504 bytes
Processing new material FlatBlue!
Processing object from 3DS-file: Gear
Object 'Gear_jPCT2' created using 476 polygons and 238 vertices.
Adding Lightsource: 0
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at org.lwjgl.opengl.GL11.glClearColor(GL11.java:566)
at com.threed.jpct.GLRenderer.execute(Unknown Source)
at com.threed.jpct.FrameBuffer.clearHardware(Unknown Source)
at com.threed.jpct.FrameBuffer.clear(Unknown Source)
at com.threed.jpct.FrameBuffer.clear(Unknown Source)
at jPCTGears.paint(jPCTGears.java:103)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.io.InputStream;
import javax.swing.JApplet;
import com.threed.jpct.Camera;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.IRenderer;
import com.threed.jpct.Lights;
import com.threed.jpct.Loader;
import com.threed.jpct.Matrix;
import com.threed.jpct.Object3D;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import java.lang.System;
public class jPCTGears extends JApplet implements MouseListener, MouseMotionListener
{
private Object3D redGear, greenGear, blueGear, assemblyPivot;
private FrameBuffer buffer = null;
private World world = null;
private Camera camera = null;
private int width = 640;
private int height = 480;
private float gear_rotation = 0.02f;
private int prevMouseX, prevMouseY;
// Initialize all components of the applet
@Override
public void init()
{
// sign the applet up to receive mouse messages:
addMouseListener( this );
addMouseMotionListener( this );
world = new World(); // create a new world
World.setDefaultThread(Thread.currentThread());
// create a new buffer to draw on:
buffer = new FrameBuffer( width, height, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY );
buffer.enableRenderer( IRenderer.RENDERER_OPENGL );
buffer.disableRenderer( IRenderer.RENDERER_SOFTWARE );
// load some 3D objects and make sure they have the correct orientation:
redGear = loadMeshFile( "RedGear.3ds" );
redGear.rotateY( (float)Math.PI / 2.0f );
redGear.rotateMesh();
redGear.setRotationMatrix( new Matrix() );
redGear.setOrigin( new SimpleVector( 0, 0, 0 ) );
redGear.build();
greenGear = loadMeshFile( "GreenGear.3ds" );
greenGear.rotateY( (float)Math.PI / 2.0f );
greenGear.rotateZ( 0.35f );
greenGear.rotateMesh();
greenGear.setRotationMatrix( new Matrix() );
greenGear.setOrigin( new SimpleVector( -145.0f, 0, 0 ) );
greenGear.build();
blueGear = loadMeshFile( "BlueGear.3ds" );
blueGear.rotateY( (float)Math.PI / 2.0f );
//blueGear.rotateZ( 0.40f );
blueGear.rotateMesh();
blueGear.setRotationMatrix( new Matrix() );
blueGear.setOrigin( new SimpleVector( 0, -140.0f, 0 ) );
blueGear.build();
// Set up a pivot point for the entire gear assembly:
//assemblyPivot = new Object3D(1);
assemblyPivot = Object3D.createDummyObj();
assemblyPivot.setOrigin( new SimpleVector( 0, 0, 0 ) );
// Make the gears children to assemblyPivot.
// Translations and rotations to assemblyPivot
// will affect the entire gear assembly:
assemblyPivot.addChild( redGear );
assemblyPivot.addChild( greenGear );
assemblyPivot.addChild( blueGear );
// add the objects our world:
world.addObject( redGear );
world.addObject( greenGear );
world.addObject( blueGear );
world.buildAllObjects();
lookAt( redGear ); // make sure the camera is facing towards the object
letThereBeLight(); // create light sources for the scene
}
// Draw the scene
@Override
public void paint( Graphics g )
{
// rotate the gears:
redGear.rotateAxis( redGear.getZAxis(), -gear_rotation );
greenGear.rotateAxis( greenGear.getZAxis(), 2.0f * gear_rotation );
blueGear.rotateAxis( blueGear.getZAxis(), 2.0f * gear_rotation );
buffer.clear(); // erase the previous frame
// render the world onto the buffer:
world.renderScene( buffer );
world.draw( buffer );
buffer.update();
buffer.display(g, 0, 0); // draw the buffer onto the applet frame
repaint( 200, 0, 0, width, height ); // keep the graphics auto-refreshing
}
// Load a 3Ds file, and return its Object3D handle
public Object3D loadMeshFile( String filename )
{
Object3D newObject;
//Object3D[] objs = Loader.load3DS( myURL, "models" + "/" + filename, 1.0f );
Object3D[] objs = Loader.load3DS( getResource( filename ), 1.0f );
if( objs.length==1 )
{
// The object loaded fine, just need to initialize it
newObject=objs[0];
newObject.setCulling( Object3D.CULLING_DISABLED );
newObject.build();
}
else
{
// Didn't load anything, or loaded
// more than 1 object (not supposed to happen)
System.out.println( "Unknown file format: " + filename );
newObject = null;
}
return newObject;
}
private InputStream getResource( String resourceName )
{
return getClass().getClassLoader().getResourceAsStream( resourceName );
}
// point the camera toward the given object
private void lookAt( Object3D obj )
{
camera = world.getCamera(); // grab a handle to the camera
camera.setPosition( 0, 0, 500 ); // set its *relative* position
camera.lookAt( obj.getTransformedCenter() ); // look toward the object
}
// create light sources for the scene
private void letThereBeLight()
{
world.getLights().setOverbrightLighting (
Lights.OVERBRIGHT_LIGHTING_DISABLED );
world.getLights().setRGBScale( Lights.RGB_SCALE_2X );
// Set the overall brightness of the world:
world.setAmbientLight( 50, 50, 50 );
// Create a main light-source:
world.addLight( new SimpleVector( 50, -50, 300 ), 20, 20, 20 );
}
// Dragging the mouse should rotate the entire gear assembly
public void mouseDragged( MouseEvent e )
{
// get the mouse's coordinates:
int x = e.getX();
int y = e.getY();
Dimension size = e.getComponent().getSize();
// Calculate the angles to rotate the assembly:
float thetaY = (float)Math.PI * ( (float)(x-prevMouseX)/(float)size.width );
float thetaX = (float)Math.PI * ( (float)(prevMouseY-y)/(float)size.height );
// Apply the rotations to the gear assembly:
assemblyPivot.rotateAxis( assemblyPivot.getXAxis(), thetaX );
assemblyPivot.rotateAxis( assemblyPivot.getYAxis(), thetaY );
// Keep track of the mouse location:
prevMouseX = x;
prevMouseY = y;
}
public void mousePressed( MouseEvent e )
{
// Start keeping track of the mouse location now.
// This prevent the gear assembly from jerking to the new angle
// whenever mouseDragged first gets called:
prevMouseX = e.getX();
prevMouseY = e.getY();
}
public void mouseReleased( MouseEvent e ){}
public void mouseEntered( MouseEvent e ) {}
public void mouseExited( MouseEvent e ) {}
public void mouseClicked( MouseEvent e ) {}
public void mouseMoved( MouseEvent e ) {}
}
Java version is: 1.6.0_03
-> support for BufferedImage
Version helper for 1.2+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
java.lang.NoClassDefFoundError: org/lwjgl/opengl/Display
at com.threed.jpct.GLHelper.findMode(Unknown Source)
at com.threed.jpct.GLHelper.init(Unknown Source)
at com.threed.jpct.GLRenderer.init(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at jPCTGears.init(jPCTGears.java:48)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
// Initialize all components of the applet
@Override
public void init()
{
// sign the applet up to receive mouse messages:
addMouseListener( this );
addMouseMotionListener( this );
world = new World(); // create a new world
World.setDefaultThread(Thread.currentThread());
// create a new buffer to draw on:
buffer = new FrameBuffer( width, height, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY );
buffer.enableRenderer( IRenderer.RENDERER_OPENGL );
buffer.disableRenderer( IRenderer.RENDERER_SOFTWARE );
// load some 3D objects and make sure they have the correct orientation:
redGear = loadMeshFile( "RedGear.3ds" );
redGear.rotateY( (float)Math.PI / 2.0f );
redGear.rotateMesh();
redGear.setRotationMatrix( new Matrix() );
redGear.setOrigin( new SimpleVector( 0, 0, 0 ) );
redGear.build();
greenGear = loadMeshFile( "GreenGear.3ds" );
greenGear.rotateY( (float)Math.PI / 2.0f );
greenGear.rotateZ( 0.35f );
greenGear.rotateMesh();
greenGear.setRotationMatrix( new Matrix() );
greenGear.setOrigin( new SimpleVector( -145.0f, 0, 0 ) );
greenGear.build();
blueGear = loadMeshFile( "BlueGear.3ds" );
blueGear.rotateY( (float)Math.PI / 2.0f );
blueGear.rotateZ( 0.40f );
blueGear.rotateMesh();
blueGear.setRotationMatrix( new Matrix() );
blueGear.setOrigin( new SimpleVector( 0, 135.0f, 0 ) );
blueGear.build();
// Set up a pivot point for the entire gear assembly:
//assemblyPivot = new Object3D(1);
assemblyPivot = Object3D.createDummyObj();
assemblyPivot.setOrigin( new SimpleVector( 0, 0, 0 ) );
// Make the gears children to assemblyPivot.
// Translations and rotations to assemblyPivot
// will affect the entire gear assembly:
assemblyPivot.addChild( redGear );
assemblyPivot.addChild( greenGear );
assemblyPivot.addChild( blueGear );
// add the objects our world:
world.addObject( redGear );
world.addObject( greenGear );
world.addObject( blueGear );
world.buildAllObjects();
lookAt( redGear ); // make sure the camera is facing towards the object
letThereBeLight(); // create light sources for the scene
}
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.io.File;
import javax.swing.JApplet;
import com.threed.jpct.Camera;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.IRenderer;
import com.threed.jpct.Lights;
import com.threed.jpct.Loader;
import com.threed.jpct.Matrix;
import com.threed.jpct.Object3D;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import java.lang.System;
public class jPCTGears extends JApplet implements MouseListener, MouseMotionListener
{
private Object3D redGear, blueGear, assemblyPivot;
private FrameBuffer buffer = null;
private World world = null;
private Camera camera = null;
private int width = 640;
private int height = 480;
private float gear_rotation = 0.02f;
private int prevMouseX, prevMouseY;
// Initialize all components of the applet
@Override
public void init()
{
// sign the applet up to receive mouse messages:
addMouseListener( this );
addMouseMotionListener( this );
world = new World(); // create a new world
// create a new buffer to render the world on:
buffer = new FrameBuffer( width, height, FrameBuffer.SAMPLINGMODE_NORMAL );
buffer.enableRenderer( IRenderer.RENDERER_SOFTWARE );
// load some 3D objects and make sure they have the correct orientation:
redGear = loadMeshFile( "RedGear.3ds" );
redGear.rotateY( (float)Math.PI / 2.0f );
redGear.rotateMesh();
redGear.setRotationMatrix( new Matrix() );
redGear.setOrigin( new SimpleVector( 0, 0, 0 ) );
redGear.build();
blueGear = loadMeshFile( "BlueGear.3ds" );
blueGear.rotateY( (float)Math.PI / 2.0f );
blueGear.rotateZ( 0.35f );
blueGear.rotateMesh();
blueGear.setRotationMatrix( new Matrix() );
blueGear.setOrigin( new SimpleVector( 0, 135.0f, 0 ) );
blueGear.build();
// Set up a pivot point for the entire gear assembly:
assemblyPivot = new Object3D(1);
assemblyPivot.setOrigin( new SimpleVector( 0, 0, 0 ) );
// Make the gears children to assemblyPivot.
// Translations and rotations to assemblyPivot
// will affect the entire gear assembly:
assemblyPivot.addChild( redGear );
assemblyPivot.addChild( blueGear );
// add the objects our world:
world.addObject( redGear );
world.addObject( blueGear );
world.buildAllObjects();
lookAt( redGear ); // make sure the camera is facing towards the gear assembly
letThereBeLight(); // create light sources for the scene
}
// Draw the scene
@Override
public void paint( Graphics g )
{
// rotate the gears:
redGear.rotateAxis( redGear.getZAxis(), -gear_rotation );
blueGear.rotateAxis( blueGear.getZAxis(), 2.0f * gear_rotation );
buffer.clear(); // erase the previous frame
// render the world onto the buffer:
world.renderScene( buffer );
world.draw( buffer );
buffer.update();
buffer.display(g, 0, 0); // draw the buffer onto the applet frame
repaint( 200, 0, 0, width, height ); // keep the graphics auto-refreshing
}
// Load a 3Ds file, and return its Object3D handle
private Object3D loadMeshFile( String filename )
{
Object3D newObject;
Object3D[] objs = Loader.load3DS( this.getDocumentBase(), "models" + File.separatorChar + filename, 1.0f );
if( objs.length==1 )
{
// The object loaded fine, just need to initialize it
newObject=objs[0];
newObject.setCulling( Object3D.CULLING_DISABLED );
newObject.build();
}
else
{
// Didn't load anything, or loaded
// more than 1 object (not supposed to happen)
System.out.println( "Unknown file format: " + filename );
newObject = null;
}
return newObject;
}
// point the camera toward the given object
private void lookAt( Object3D obj )
{
camera = world.getCamera(); // grab a handle to the camera
camera.setPosition( 0, 0, 500 ); // set its *relative* position
camera.lookAt( obj.getTransformedCenter() ); // look toward the object
}
// create light sources for the scene
private void letThereBeLight()
{
world.getLights().setOverbrightLighting (
Lights.OVERBRIGHT_LIGHTING_DISABLED );
world.getLights().setRGBScale( Lights.RGB_SCALE_2X );
// Set the overall brightness of the world:
world.setAmbientLight( 50, 50, 50 );
// Create a main light-source:
world.addLight( new SimpleVector( 50, -50, 300 ), 20, 20, 20 );
}
// Dragging the mouse should rotate the entire gear assembly
public void mouseDragged( MouseEvent e )
{
// get the mouse's coordinates:
int x = e.getX();
int y = e.getY();
Dimension size = e.getComponent().getSize();
// Calculate the angles to rotate the assembly:
float thetaY = (float)Math.PI * ( (float)(x-prevMouseX)/(float)size.width );
float thetaX = (float)Math.PI * ( (float)(prevMouseY-y)/(float)size.height );
// Apply the rotations to the gear assembly:
assemblyPivot.rotateAxis( assemblyPivot.getXAxis(), thetaX );
assemblyPivot.rotateAxis( assemblyPivot.getYAxis(), thetaY );
// Keep track of the mouse location:
prevMouseX = x;
prevMouseY = y;
}
public void mousePressed( MouseEvent e )
{
// Start keeping track of the mouse location now.
// This prevent the gear assembly from jerking to the new angle
// whenever mouseDragged first gets called:
prevMouseX = e.getX();
prevMouseY = e.getY();
}
public void mouseReleased( MouseEvent e ){}
public void mouseEntered( MouseEvent e ) {}
public void mouseExited( MouseEvent e ) {}
public void mouseClicked( MouseEvent e ) {}
public void mouseMoved( MouseEvent e ) {}
}
myObject.setRotationPivot( new SimpleVector( 0, 0, 0 ) );
myObject.rotateAxis( myObject.getZAxis(), radZ );
myObject.setRotationPivot( new SimpleVector( 0, -135.0f, 0 ) );