|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gnu.gleem.ExaminerViewer
This is an application-level class, not part of the manipulator hierarchy. It is an example of how you might integrate gleem with another application which uses the mouse.
For the given GLDrawable, the ExaminerViewer takes over the setting of the view position. It passes along mouse events it is not interested in to the ManipManager's mouse routines.
| Constructor Summary | |
ExaminerViewer(int numMouseButtons)
The constructor takes the number of mouse buttons on this system (couldn't figure out how to determine this internally) |
|
| Method Summary | |
void |
attach(gl4java.drawable.GLDrawable window,
BSphereProvider provider)
Attaches this ExaminerViewer to the given GLDrawable. |
void |
detach()
Detaches from the given window. |
void |
dollyFaster()
|
void |
dollySlower()
|
CameraParameters |
getCameraParameters()
Get the camera parameters out of this Examiner Viewer (for example, to pass to ManipManager.updateCameraParameters()) |
void |
rotateFaster()
These routines can be hooked into a GUI by calling them from ActionEvent listeners for buttons elsewhere in the application. |
void |
rotateSlower()
|
void |
update(gl4java.GLFunc gl,
gl4java.GLUFunc glu)
Call this at the end of your display() method to cause the Modelview matrix to be recomputed for the next frame. |
void |
viewAll(gl4java.GLFunc gl,
gl4java.GLUFunc glu)
Call this from within your display() method to cause the ExaminerViewer to recompute its position based on the visible geometry. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExaminerViewer(int numMouseButtons)
| Method Detail |
public void attach(gl4java.drawable.GLDrawable window,
BSphereProvider provider)
Attaches this ExaminerViewer to the given GLDrawable. This causes the ManipManager's mouse routines to be removed from the window (using ManipManager.removeMouseListeners) and the ExaminerViewer's to be installed. The GLDrawable should be registered with the ManipManager before the ExaminerViewer is attached to it.
In order for the viewer to do anything useful, you need to provide a BSphereProvider to it to allow "view all" functionality.
public void detach()
public void update(gl4java.GLFunc gl,
gl4java.GLUFunc glu)
public void viewAll(gl4java.GLFunc gl,
gl4java.GLUFunc glu)
public CameraParameters getCameraParameters()
public void rotateFaster()
public void rotateSlower()
public void dollyFaster()
public void dollySlower()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||