Package com.biodigital.humansdk
Class HKScene
java.lang.Object
com.biodigital.humansdk.HKScene
Scene object - for interacting with objects and scene data
-
Field Summary
FieldsModifier and TypeFieldDescriptionJSON describing a scene capture as an Map objectJSON describing a scene capture as a StringA flat list of visible objects by IDA map of objectID Strings to Display NamesThe description of the current loaded scene.The title of the current loaded scene. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
capture()
Capture the current state of the scenevoid
Paint an objectvoid
Turn off highlighting the selected objectvoid
Disable object selectionvoid
dissect
(boolean enabled) Turn dissect mode ON or OFF in the current scenevoid
Turn on highlighting the selected objectvoid
Enable object selectionvoid
Query the color of an object, calls onObjectColor with the color valuevoid
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" IDvoid
Highlight an object even if highlight is disabled for the uservoid
isolate
(boolean enabled) Turn isolate mode ON or OFF in the current scenevoid
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" IDvoid
Pivot an object in 3D spacevoid
reset()
Reset the objects to their original state PLEASE NOTE: This does not reset the camera, use HKCamera.reset()void
restore()
Restore the scene from the last capture Calls human(_:sceneRestored:) on successvoid
Restore the scene from a previous capture Calls human(_:sceneRestored:) on successvoid
Rotate an object in 3D spacevoid
Scale an object in 3D spacevoid
Calls the onScreenshot interface method with the generated screenshotvoid
Select a group of objects programmaticallyvoid
selectObject
(String objectId) Deprecated.use select(ArrayList objectIds) insteadvoid
share()
Brings up the built-in Android share UI with the current contents of the viewvoid
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" IDvoid
Move an object in 3D spacevoid
Move an object in 3D spacevoid
Unpaint an object - set it back to it's original colorvoid
undo()
Undo the last dissectvoid
Deselect all objects in the scenevoid
unhighlight
(String objectId) Unhighlight an objectvoid
xray
(boolean enabled) Turn xray mode ON or OFF in the current scene
-
Field Details
-
title
The title of the current loaded scene. -
text
The description of the current loaded scene. -
objectIds
A flat list of visible objects by ID -
objects
A map of objectID Strings to Display Names -
captureString
JSON describing a scene capture as a String -
captureJson
JSON describing a scene capture as an Map object
-
-
Constructor Details
-
HKScene
public HKScene()
-
-
Method Details
-
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
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
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
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
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
Highlight an object even if highlight is disabled for the user- Parameters:
highlightIds
- : object to highlight
-
unhighlight
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
Paint an object- Parameters:
objectId
- - the String id of the objectcolor
- - the HKColor to paint the object
-
uncolor
Unpaint an object - set it back to it's original color- Parameters:
objectId
- String id of the object
-
getColor
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.use select(ArrayList objectIds) insteadSelect an object programmmatically- Parameters:
objectId
- the object to select
-
translate
Move an object in 3D space- Parameters:
objectId
- : object to transformtranslate
- : [x,y,z] array amount to move the object]- Since:
- sdk 2.0
-
rotate
Rotate an object in 3D space- Parameters:
objectId
- : object to transformrotate
- : [x,y,z] array amount to rotate the object]- Since:
- sdk 2.0
-
scale
Scale an object in 3D space- Parameters:
objectId
- : object to transformscale
- : [x,y,z] array amount to scale the object]- Since:
- sdk 2.0
-
pivot
Pivot an object in 3D space- Parameters:
objectId
- : object to transformpivot
- : [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 transformtranslate
- : [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
Restore the scene from a previous capture Calls human(_:sceneRestored:) on success- Parameters:
restoreString
- a capture String- Since:
- sdk 2.0