Class HKCamera

java.lang.Object
com.biodigital.humansdk.HKCamera

public class HKCamera
extends java.lang.Object
Camera object camInfo has fields: eye, look, and up of type double[] zoom should be between 0 and 1
  • Field Summary

    Fields 
    Modifier and Type Field Description
    double[] eye
    Eye vector [x,y,z]
    double[] look
    Look vector [x,y,z]
    double[] up
    Up vector [x,y,z]
    double zoomFactor
    Zoom factor
  • Method Summary

    Modifier and Type Method Description
    void animateTo​(java.lang.String objectId)
    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 position
    void 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • eye

      public double[] eye
      Eye vector [x,y,z]
    • look

      public double[] look
      Look vector [x,y,z]
    • up

      public double[] up
      Up vector [x,y,z]
    • zoomFactor

      public double zoomFactor
      Zoom 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 axis
      y - offset on y axis
      z - 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

      public void animateTo​(java.lang.String objectId)
      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