Basic Newbie Rotation, Movement

Please Help,

I am pretty new to JOGL (fairly good at Java) and have a few questions that are probably easy.

First:
Given that I have a Model displayed and have calculated the center point of the model (in X, Y, and Z coordinates), what is the easiest way to rotate that model around the given center point with the mouse cursor?

Second:
How does one go about moving a displayed model using JOGL with the mouse cursor?

Lastly,
I am debating the merits of JOGL vs. the Java 3D API, what is the general consensus among the two?
Are there any good books regarding Java 3D or JOGL that anyone would recommend ?

Thanks in Advance.

  1. glRotate (get the delta’s of your mouse pointer movement and apply them to glRotate)

  2. same, but using glTranslate instead of glRotate

  3. comparing the 2 is like comparing Swing with Java2D (shaky analogy ;)). You use JOGL (or LWJGL) if you want to do low level OpenGL, you use Java3D (or Xith3D or jME) if you want your rendering API to do more for you; Java3D is a full fledged scenegraph API which uses OpenGL under the hood (or DirectX). Which is better for you depends on what you want to do.

The Java3D tutorial from Sun is pretty good (google for it). As for JOGL, check out the OpenGL tutorials at http://nehe.gamedev.net: They have both JOGL and LWJGL versions of the tutorials.

Thanks for the inof erickd. I will give the rotate and translate functions a try. :slight_smile: