public class ObjectPole extends Object
| Constructor and Description |
|---|
ObjectPole(ObjectData initialData,
float rotateScale,
int actionButton,
view.ViewProvider lookAtProvider)
Creates an object pole with a given initial position and orientation.
|
| Modifier and Type | Method and Description |
|---|---|
glm.mat._4.Mat4 |
calcMatrix()
Generates the local-to-world matrix for this object.
|
ObjectData |
getPosOrient() |
float |
getRotationScale() |
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 |
reset()
Resets the object to the initial position/orientation.
|
void |
rotateLocalDegrees(glm.quat.Quat rot) |
void |
rotateLocalDegrees(glm.quat.Quat rot,
boolean fromInitial) |
void |
rotateViewDegrees(glm.quat.Quat rot) |
void |
rotateViewDegrees(glm.quat.Quat rot,
boolean fromInitial) |
void |
rotateWorldDegrees(glm.quat.Quat rot) |
void |
rotateWorldDegrees(glm.quat.Quat rot,
boolean fromInitial) |
void |
setRotationScale(float rotateScale)
Sets the scaling factor for orientation changes.
|
public ObjectPole(ObjectData initialData, float rotateScale, int actionButton, view.ViewProvider lookAtProvider)
initialData - The starting position and orientation of the object in
world space.rotateScale - The number of degrees to rotate the object per window
space pixelactionButton - The mouse button to listen for. All other mouse
buttons are ignored.lookAtProvider - An object that will compute a view matrix. This
defines the view space that orientations can be relative to. If it is
NULL, then orientations will be relative to the world.public glm.mat._4.Mat4 calcMatrix()
public void setRotationScale(float rotateScale)
rotateScale - The scaling factor is the number of degrees to rotate
the object per window space pixel. The scale is the same for all mouse
movements.public float getRotationScale()
public ObjectData getPosOrient()
public void reset()
public void rotateWorldDegrees(glm.quat.Quat rot)
public void rotateWorldDegrees(glm.quat.Quat rot,
boolean fromInitial)
public void rotateLocalDegrees(glm.quat.Quat rot)
public void rotateLocalDegrees(glm.quat.Quat rot,
boolean fromInitial)
public void rotateViewDegrees(glm.quat.Quat rot)
public void rotateViewDegrees(glm.quat.Quat rot,
boolean fromInitial)
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)
Copyright © 2016 Java Graphics Society. All rights reserved.