public class HKCamera
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
float[] |
eye
Eye vector [x,y,z]
|
float[] |
look
Look vector [x,y,z]
|
float[] |
up
Up vector [x,y,z]
|
double |
zoom
Zoom factor
|
| Constructor and Description |
|---|
HKCamera() |
HKCamera(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Float>> camInfo,
double zoom) |
| Modifier and Type | Method and Description |
|---|---|
void |
animateTo(java.lang.String objectID)
Animates camera to object specified by its id.
|
void |
getCameraInfo()
Get current camera information.
|
void |
getChapterCameraInfo()
Get current Chapter's initial camera information.
|
void |
getModuleCameraInfo(java.lang.String moduleID)
Get module's initial camera information.
|
void |
lockCamera(java.lang.Boolean lock)
Lock or unlock the camera rotation around the Y axis
|
void |
orbit(float yaw,
float pitch)
Orbit around camera's current point of focus.
|
void |
orbit(float yaw,
float pitch,
float duration)
Orbit around camera's current point of focus.
|
void |
pan(float x,
float y,
float z)
Pan camera by offset in world space.
|
void |
updateCamera(float[] eyeIn,
float[] lookIn,
float[] upIn,
boolean animated)
Updates camera position.
|
void |
zoom(float factor)
Zoom the camera in and out of its point of focus.
|
public float[] eye
public float[] look
public float[] up
public double zoom
public HKCamera(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Float>> camInfo,
double zoom)
public HKCamera()
public void getModuleCameraInfo(java.lang.String moduleID)
moduleID - the ID of the module
Sets local float arrays with camera information (eye, look, and up vectors)public void getChapterCameraInfo()
public void getCameraInfo()
public void pan(float x,
float y,
float z)
x - offset on x axisy - offset on y axisz - offset on z axispublic void zoom(float factor)
factor - Zoom factor between 0 and 1public void updateCamera(float[] eyeIn,
float[] lookIn,
float[] upIn,
boolean animated)
eyeIn - The new camera eye vector.lookIn - The new camera look vector.upIn - The new camera up vector.animated - If true, camera will animate from current position to new positionpublic void lockCamera(java.lang.Boolean lock)
lock - booleanpublic void orbit(float yaw,
float pitch)
yaw - Yaw angle (degrees)pitch - Pitch angle (degrees)public void orbit(float yaw,
float pitch,
float duration)
yaw - Yaw angle (degrees)pitch - Pitch angle (degrees)duration - time of animation (seconds) Default is 1 secondpublic void animateTo(java.lang.String objectID)
objectID - Object id specified by string