Class HKScene

java.lang.Object
com.biodigital.humansdk.HKScene

public class HKScene extends Object
Scene object - for interacting with objects and scene data
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    JSON describing a scene capture as an Map object
    JSON describing a scene capture as a String
    A flat list of visible objects by ID
    A map of objectID Strings to Display Names
    The description of the current loaded scene.
    The title of the current loaded scene.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Capture the current state of the scene
    void
    color(String objectId, HKColor color)
    Paint an object
    void
    Turn off highlighting the selected object
    void
    Disable object selection
    void
    dissect(boolean enabled)
    Turn dissect mode ON or OFF in the current scene
    void
    Turn on highlighting the selected object
    void
    Enable object selection
    void
    getColor(String objectId)
    Query the color of an object, calls onObjectColor with the color value
    void
    hide(ArrayList<String> hideIds)
    Hide a group of obejcts by object ID Groups of objects can be hidden by passing more than one objectID or by passing a "group node" ID
    void
    highlight(ArrayList<String> highlightIds)
    Highlight an object even if highlight is disabled for the user
    void
    isolate(boolean enabled)
    Turn isolate mode ON or OFF in the current scene
    void
    isolate(ArrayList<String> isolateIds)
    Isolate a group of objects by object ID Groups of objects can be shown by passing more than one object ID or by passing a "group node" ID
    void
    pivot(String objectId, double[] pivot)
    Pivot an object in 3D space
    void
    Reset the objects to their original state PLEASE NOTE: This does not reset the camera, use HKCamera.reset()
    void
    Restore the scene from the last capture Calls human(_:sceneRestored:) on success
    void
    restore(String restoreString)
    Restore the scene from a previous capture Calls human(_:sceneRestored:) on success
    void
    rotate(String objectId, double[] rotate)
    Rotate an object in 3D space
    void
    scale(String objectId, double[] scale)
    Scale an object in 3D space
    void
    Calls the onScreenshot interface method with the generated screenshot
    void
    select(ArrayList<String> selectIds)
    Select a group of objects programmatically
    void
    selectObject(String objectId)
    Deprecated.
    use select(ArrayList objectIds) instead
    void
    Brings up the built-in Android share UI with the current contents of the view
    void
    show(ArrayList<String> showIds)
    Show a group of objects by object ID Groups of objects can be shown by passing more than one objectID or by passing a "group node" ID
    void
    transform(String objectId, double[] translate, double[] rotate, double[] scale, double[] pivot)
    Move an object in 3D space
    void
    translate(String objectId, double[] translate)
    Move an object in 3D space
    void
    uncolor(String objectId)
    Unpaint an object - set it back to it's original color
    void
    Undo the last dissect
    void
    Deselect all objects in the scene
    void
    unhighlight(String objectId)
    Unhighlight an object
    void
    xray(boolean enabled)
    Turn xray mode ON or OFF in the current scene

    Methods inherited from class java.lang.Object

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

    • title

      public String title
      The title of the current loaded scene.
    • text

      public String text
      The description of the current loaded scene.
    • objectIds

      public ArrayList<String> objectIds
      A flat list of visible objects by ID
    • objects

      public HashMap<String,String> objects
      A map of objectID Strings to Display Names
    • captureString

      public String captureString
      JSON describing a scene capture as a String
    • captureJson

      public Map<String,Object> captureJson
      JSON describing a scene capture as an Map object
  • Constructor Details

    • HKScene

      public HKScene()
  • Method Details

    • share

      public void share()
      Brings up the built-in Android share UI with the current contents of the view
    • screenshot

      public void screenshot()
      Calls the onScreenshot interface method with the generated screenshot
    • reset

      public void reset()
      Reset the objects to their original state PLEASE NOTE: This does not reset the camera, use HKCamera.reset()
      Since:
      sdk 2.0
    • hide

      public void hide(ArrayList<String> hideIds)
      Hide a group of obejcts by object ID Groups of objects can be hidden by passing more than one objectID or by passing a "group node" ID
      Parameters:
      hideIds - : An array of object IDs to hide
      Since:
      sdk 2.0
    • show

      public void show(ArrayList<String> showIds)
      Show a group of objects by object ID Groups of objects can be shown by passing more than one objectID or by passing a "group node" ID
      Parameters:
      showIds - : An array of object IDs to show
      Since:
      sdk 2.0
    • isolate

      public void isolate(ArrayList<String> isolateIds)
      Isolate a group of objects by object ID Groups of objects can be shown by passing more than one object ID or by passing a "group node" ID
      Parameters:
      isolateIds - : An array of object IDs to isolate
      Since:
      sdk 2.0
    • select

      public void select(ArrayList<String> selectIds)
      Select a group of objects programmatically
      Parameters:
      selectIds - : An array of object IDs to select
    • undoSelections

      public void undoSelections()
      Deselect all objects in the scene
    • disableHighlight

      public void disableHighlight()
      Turn off highlighting the selected object
    • enableHighlight

      public void enableHighlight()
      Turn on highlighting the selected object
    • highlight

      public void highlight(ArrayList<String> highlightIds)
      Highlight an object even if highlight is disabled for the user
      Parameters:
      highlightIds - : object to highlight
    • unhighlight

      public void unhighlight(String objectId)
      Unhighlight an object
      Parameters:
      objectId - : object to unhighlight
    • disablePicking

      public void disablePicking()
      Disable object selection
    • enablePicking

      public void enablePicking()
      Enable object selection
    • xray

      public void xray(boolean enabled)
      Turn xray mode ON or OFF in the current scene
      Parameters:
      enabled - A boolean to turn xray mode ON or OFF
    • color

      public void color(String objectId, HKColor color)
      Paint an object
      Parameters:
      objectId - - the String id of the object
      color - - the HKColor to paint the object
    • uncolor

      public void uncolor(String objectId)
      Unpaint an object - set it back to it's original color
      Parameters:
      objectId - String id of the object
    • getColor

      public void getColor(String objectId)
      Query the color of an object, calls onObjectColor with the color value
      Parameters:
      objectId - - the String id of the object
    • isolate

      public void isolate(boolean enabled)
      Turn isolate mode ON or OFF in the current scene
      Parameters:
      enabled - A boolean to turn isolate mode ON or OFF
    • dissect

      public void dissect(boolean enabled)
      Turn dissect mode ON or OFF in the current scene
      Parameters:
      enabled - A boolean to turn dissect mode ON or OFF
    • undo

      public void undo()
      Undo the last dissect
    • selectObject

      @Deprecated public void selectObject(String objectId)
      Deprecated.
      use select(ArrayList objectIds) instead
      Select an object programmmatically
      Parameters:
      objectId - the object to select
    • translate

      public void translate(String objectId, double[] translate)
      Move an object in 3D space
      Parameters:
      objectId - : object to transform
      translate - : [x,y,z] array amount to move the object]
      Since:
      sdk 2.0
    • rotate

      public void rotate(String objectId, double[] rotate)
      Rotate an object in 3D space
      Parameters:
      objectId - : object to transform
      rotate - : [x,y,z] array amount to rotate the object]
      Since:
      sdk 2.0
    • scale

      public void scale(String objectId, double[] scale)
      Scale an object in 3D space
      Parameters:
      objectId - : object to transform
      scale - : [x,y,z] array amount to scale the object]
      Since:
      sdk 2.0
    • pivot

      public void pivot(String objectId, double[] pivot)
      Pivot an object in 3D space
      Parameters:
      objectId - : object to transform
      pivot - : [x,y,z] array amount to rotate the object]
      Since:
      sdk 2.0
    • transform

      public void transform(String objectId, double[] translate, double[] rotate, double[] scale, double[] pivot)
      Move an object in 3D space
      Parameters:
      objectId - : object to transform
      translate - : [x,y,z] array amount to move the object]
      rotate - : [x,y,z] array amount to rotate the object]
      scale - : [x,y,z] array amount to scale the object]
      pivot - : [x,y,z] array amount to rotate the object]
      Since:
      sdk 2.0
    • capture

      public void capture()
      Capture the current state of the scene
      Since:
      sdk 2.0
    • restore

      public void restore()
      Restore the scene from the last capture Calls human(_:sceneRestored:) on success
      Since:
      sdk 2.0
    • restore

      public void restore(String restoreString)
      Restore the scene from a previous capture Calls human(_:sceneRestored:) on success
      Parameters:
      restoreString - a capture String
      Since:
      sdk 2.0