public class ViewPole extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ViewProvider.MouseButtons |
| Constructor and Description |
|---|
ViewPole(ViewData initialView,
ViewScale viewScale,
int actionButton) |
ViewPole(ViewData initialView,
ViewScale viewScale,
int actionButton,
boolean rightKeyboardCtrls)
Creates a view pole with the given initial target position, view
definition, and action button.
|
| Modifier and Type | Method and Description |
|---|---|
glm.mat._4.Mat4 |
calcMatrix()
Generates the world-to-camera matrix for the view.
|
void |
charPress(com.jogamp.newt.event.KeyEvent keyEvent) |
ViewData |
getView() |
void |
mouseMove(com.jogamp.newt.event.MouseEvent mouseEvent) |
void |
mousePressed(com.jogamp.newt.event.MouseEvent mouseEvent) |
void |
mouseReleased(com.jogamp.newt.event.MouseEvent mouseEvent) |
void |
mouseWheel(com.jogamp.newt.event.MouseEvent mouseEvent) |
void |
processXchange(int xDiff) |
void |
processYchange(int yDiff) |
void |
reset()
Resets the view to the initial view.
|
float |
rotationScale() |
void |
rotationScale(float rotateScale)
Sets the scaling factor for orientation changes.
|
public ViewPole(ViewData initialView, ViewScale viewScale, int actionButton, boolean rightKeyboardCtrls)
initialView - initialView The starting state of the view.viewScale - viewScale The viewport definition to use.actionButton - actionButton The mouse button to listen for. All
other mouse buttons are ignored.rightKeyboardCtrls - if true, then it uses IJKLUO instead of WASDQE
keys.public glm.mat._4.Mat4 calcMatrix()
public void rotationScale(float rotateScale)
rotateScale - The scaling factor is the number of degrees to rotate
the view per window space pixel. The scale is the same for all mouse
movements.public float rotationScale()
public ViewData getView()
public void reset()
public void processXchange(int xDiff)
public void processYchange(int yDiff)
public void mouseMove(com.jogamp.newt.event.MouseEvent mouseEvent)
public void mousePressed(com.jogamp.newt.event.MouseEvent mouseEvent)
public void mouseReleased(com.jogamp.newt.event.MouseEvent mouseEvent)
public void mouseWheel(com.jogamp.newt.event.MouseEvent mouseEvent)
public void charPress(com.jogamp.newt.event.KeyEvent keyEvent)
Copyright © 2016 Java Graphics Society. All rights reserved.