public class FreeCamera extends java.lang.Object implements ICameraController
setUsePointerControl(boolean).processInput(SceneView, IInput) and update(long)| Constructor and Description |
|---|
FreeCamera() |
FreeCamera(IMovable movable) |
FreeCamera(ITransformable transformable) |
| Modifier and Type | Method and Description |
|---|---|
void |
discardPointerControl(IInput input)
Force this
FreeCamera to discard pointer control |
Mat4x4 |
getLookAt(Mat4x4 dst)
| -left.x -left.y -left.z -( left.dot.position) |
| up.x up.y up.z ( up.dot.position) |
| -forward.x -forward.y -forward.z -(forward.dot.position) |
| 0 0 0 1 |
|
IMovable |
getMovable() |
float |
getSpeed() |
float |
getSpeedDamping() |
boolean |
isPointerControlled() |
void |
processInput(SceneView sceneView,
IInput input)
Update inputs.
|
void |
rotate(Vec3 anglesInRadians)
Rotate this
FreeCamera. |
void |
setLookAt(Mat4x4 src) |
void |
setPosition(Vec3 pos) |
void |
setRotation(Quat q) |
void |
setRotation(Vec3 anglesInRadians) |
void |
setRotationMask(int axis,
boolean active) |
void |
setSpeed(float speed) |
void |
setSpeedDamping(float speedDamping) |
void |
setTranslationMask(int axis,
boolean active) |
void |
setUsePointerControl(boolean usePointerControl) |
void |
translate(Vec3 vector)
Translate the camera.
|
void |
update(long timePassedMs)
Update the camera.
|
public FreeCamera()
public FreeCamera(ITransformable transformable)
public FreeCamera(IMovable movable)
public final void setSpeed(float speed)
public final float getSpeed()
public final void setSpeedDamping(float speedDamping)
public float getSpeedDamping()
public void processInput(SceneView sceneView, IInput input)
update(long)processInput in interface IInputListenerpublic void update(long timePassedMs)
processInput(SceneView, IInput)update in interface ICameraControllertimePassedMs - elapsed time in milliseconds used to update/animate the camera.public final IMovable getMovable()
IMovable attached to this FreeCamerapublic final Mat4x4 getLookAt(Mat4x4 dst)
ICamera| -left.x -left.y -left.z -( left.dot.position) | | up.x up.y up.z ( up.dot.position) | | -forward.x -forward.y -forward.z -(forward.dot.position) | | 0 0 0 1 |
public final void setLookAt(Mat4x4 src)
setLookAt in interface ICameraControllersrc - a look at matrixpublic void setUsePointerControl(boolean usePointerControl)
usePointerControl - true to allow this FreeCamera
to take control of mouse pointer when dragging.public final boolean isPointerControlled()
FreeCamerapublic final void discardPointerControl(IInput input)
FreeCamera to discard pointer controlinput - IInput previously passed in processInput(SceneView, IInput)public final void setTranslationMask(int axis,
boolean active)
axis - 0 for x axis; 1 for y axis; 2 for z axisactive - true to allow translation, false to freeze/lock translation on the specified axispublic final void setRotationMask(int axis,
boolean active)
axis - 0 for x axis; 1 for y axis; 2 for z axisactive - true to allow rotation, false to freeze/lock rotation on the specified axispublic void translate(Vec3 vector)
translate in interface ICameraControllervector - expressed in the camera axis systempublic final void setPosition(Vec3 pos)
pos - set the camera positionpublic void rotate(Vec3 anglesInRadians)
FreeCamera.rotate in interface ICameraControlleranglesInRadians - rotation angles in radianspublic final void setRotation(Vec3 anglesInRadians)
anglesInRadians - set the camera rotation, from angles in radianspublic final void setRotation(Quat q)
q - set the camera rotation, from a quaternionBonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com