public class FreeCamera extends java.lang.Object implements IActivableCamera, IInputListener
#setUsePointerControl(boolean).processInput(SceneView, IInput) and ICamera.update(SceneView, 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 |
|
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 |
setTranslationMask(int axis,
boolean active) |
void |
translate(Vec3 vector)
Translate the camera.
|
void |
update(SceneView sceneView,
long timePassedMs)
Update the camera.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisActive, setActivepublic FreeCamera()
public FreeCamera(ITransformable transformable)
public FreeCamera(IMovable movable)
public void processInput(SceneView sceneView, IInput input)
ICamera.update(SceneView, long)processInput in interface IInputListenerpublic void update(SceneView sceneView, long timePassedMs)
processInput(SceneView, IInput)public final Mat4x4 getLookAt(Mat4x4 dst)
IViewable| -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)
public 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)
vector - expressed in the camera axis systempublic final void setPosition(Vec3 pos)
pos - set the camera positionpublic void rotate(Vec3 anglesInRadians)
FreeCamera.anglesInRadians - 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.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com