Package com.biodigital.humansdk
Class HKCamera
java.lang.Object
com.biodigital.humansdk.HKCamera
Camera object
camInfo has fields: eye, look, and up of type double[]
zoom should be between 0 and 1
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble[]
Eye vector [x,y,z]double[]
Look vector [x,y,z]double[]
Up vector [x,y,z]double
Zoom factor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Animates camera to object specified by its id.void
orbit
(double yaw, double pitch) Orbit around camera's current point of focus.void
orbit
(double yaw, double pitch, double duration) Orbit around camera's current point of focus.void
pan
(double x, double y, double z) Pan camera by offset in world space.void
reset()
Reset camera to original positionvoid
set
(double[] eyeIn, double[] lookIn, double[] upIn, boolean animated) Updates camera position.void
updateCamera
(double[] eyeIn, double[] lookIn, double[] upIn, boolean animated) Deprecated.void
zoom
(float factor) Zoom the camera in and out of its point of focus.
-
Field Details
-
eye
public double[] eyeEye vector [x,y,z] -
look
public double[] lookLook vector [x,y,z] -
up
public double[] upUp vector [x,y,z] -
zoomFactor
public double zoomFactorZoom factor
-
-
Method Details
-
reset
public void reset()Reset camera to original position- Since:
- sdk 2.0
-
pan
public void pan(double x, double y, double z) Pan camera by offset in world space.- Parameters:
x
- offset on x axisy
- offset on y axisz
- offset on z axis
-
zoom
public void zoom(float factor) Zoom the camera in and out of its point of focus.- Parameters:
factor
- Zoom factor between 0 and 1
-
set
public void set(double[] eyeIn, double[] lookIn, double[] upIn, boolean animated) Updates camera position.- Parameters:
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 position
-
orbit
public void orbit(double yaw, double pitch) Orbit around camera's current point of focus. Default is 1 second animation.- Parameters:
yaw
- Yaw angle (degrees)pitch
- Pitch angle (degrees)
-
orbit
public void orbit(double yaw, double pitch, double duration) Orbit around camera's current point of focus.- Parameters:
yaw
- Yaw angle (degrees)pitch
- Pitch angle (degrees)duration
- time of animation (seconds)
-
animateTo
Animates camera to object specified by its id.- Parameters:
objectId
- Object id specified by string
-
updateCamera
@Deprecated public void updateCamera(double[] eyeIn, double[] lookIn, double[] upIn, boolean animated) Deprecated.Update the camera position This is deprecated, use set()- Parameters:
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 position
-