public class HKScene
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
captureJson
JSON describing a scene capture as an Map object
|
java.lang.String |
captureString
JSON describing a scene capture as a String
|
java.util.ArrayList<java.lang.String> |
objectIds
A flat list of visible objects by ID
|
java.util.HashMap<java.lang.String,java.lang.String> |
objects
A map of objectID Strings to Display Names
|
java.lang.String |
text
The description of the current loaded scene.
|
java.lang.String |
title
The title of the current loaded scene.
|
Constructor and Description |
---|
HKScene() |
Modifier and Type | Method and Description |
---|---|
void |
capture()
Capture the current state of the scene
|
void |
color(java.lang.String objectId,
HKColor color)
Paint an object
|
void |
disableHighlight()
Turn off highlighting the selected object
|
void |
disablePicking()
Disable object selection
|
void |
dissect(boolean enabled)
Turn dissect mode ON or OFF in the current scene
|
void |
enableHighlight()
Turn on highlighting the selected object
|
void |
enablePicking()
Enable object selection
|
void |
getColor(java.lang.String objectId)
Query the color of an object, calls onObjectColor with the color value
|
void |
hide(java.util.ArrayList<java.lang.String> objectIds)
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 |
hideLabels()
Hides all labels.
|
void |
highlight(java.util.ArrayList<java.lang.String> objectIds)
Highlight an object even if highlight is disabled for the user
|
void |
isolate(java.util.ArrayList<java.lang.String> objectIds)
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 |
isolate(boolean enabled)
Turn isolate mode ON or OFF in the current scene
|
void |
pivot(java.lang.String objectId,
double[] pivot)
Pivot an object in 3D space
|
void |
reset()
Reset the objects to their original state
PLEASE NOTE: This does not reset the camera, use HKCamera.reset()
|
void |
resetHighlightColor()
Change the object highlight color back to the original yellow color
|
void |
restore()
Restore the scene from the last capture
Calls human(_:sceneRestored:) on success
|
void |
restore(java.lang.String restoreString)
Restore the scene from a previous capture
Calls human(_:sceneRestored:) on success
|
void |
rotate(java.lang.String objectId,
double[] rotate)
Rotate an object in 3D space
|
void |
scale(java.lang.String objectId,
double[] scale)
Scale an object in 3D space
|
void |
screenshot()
Calls the onScreenshot interface method with the generated screenshot
|
void |
select(java.util.ArrayList<java.lang.String> objectIds)
Select a group of objects programmatically
|
void |
selectObject(java.lang.String objectId)
Deprecated.
use select(ArrayList objectIds) instead
|
void |
setHighlightColor(float[] highlight)
Change the object highlight color
|
void |
setHighlightColor(int color)
Change the object highlight color
|
void |
share()
Brings up the built-in Android share UI with the current contents of the view
|
void |
show(java.util.ArrayList<java.lang.String> objectIds)
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 |
showLabels()
Shows all labels.
|
void |
transform(java.lang.String objectId,
double[] translate,
double[] rotate,
double[] scale,
double[] pivot)
Move an object in 3D space
|
void |
translate(java.lang.String objectId,
double[] translate)
Move an object in 3D space
|
void |
uncolor(java.lang.String objectId)
Unpaint an object - set it back to it's original color
|
void |
undo()
Undo the last dissect
|
void |
undoSelections()
Deselect all objects in the scene
|
void |
unhighlight(java.lang.String objectId)
Unhighlight an object
|
void |
xray(boolean enabled)
Turn xray mode ON or OFF in the current scene
|
public java.lang.String title
public java.lang.String text
public java.util.ArrayList<java.lang.String> objectIds
public java.util.HashMap<java.lang.String,java.lang.String> objects
public java.lang.String captureString
public java.util.Map<java.lang.String,java.lang.Object> captureJson
public void share()
public void screenshot()
public void reset()
public void hide(java.util.ArrayList<java.lang.String> objectIds)
objectIds:
- An array of object IDs to hidepublic void show(java.util.ArrayList<java.lang.String> objectIds)
objectIds:
- An array of object IDs to showpublic void isolate(java.util.ArrayList<java.lang.String> objectIds)
objectIds:
- An array of object IDs to isolatepublic void select(java.util.ArrayList<java.lang.String> objectIds)
objectIds:
- An array of object IDs to selectpublic void undoSelections()
public void setHighlightColor(int color)
color
- Color as intpublic void setHighlightColor(float[] highlight)
highlight
- color as [r,b,g] in the range 0 - 1, to make it transparent pass in [1.0,1.0,1.0]public void resetHighlightColor()
public void disableHighlight()
public void enableHighlight()
public void highlight(java.util.ArrayList<java.lang.String> objectIds)
objectIds:
- object to highlightpublic void unhighlight(java.lang.String objectId)
objectId
- : object to unhighlightpublic void disablePicking()
public void enablePicking()
public void showLabels()
public void hideLabels()
public void xray(boolean enabled)
enabled
- A boolean to turn xray mode ON or OFFpublic void color(java.lang.String objectId, HKColor color)
objectId
- - the String id of the objectcolor
- - the HKColor to paint the objectpublic void uncolor(java.lang.String objectId)
objectId
- String id of the objectpublic void getColor(java.lang.String objectId)
objectId
- - the String id of the objectpublic void isolate(boolean enabled)
enabled
- A boolean to turn isolate mode ON or OFFpublic void dissect(boolean enabled)
enabled
- A boolean to turn dissect mode ON or OFFpublic void undo()
public void selectObject(java.lang.String objectId)
objectId
- the object to selectpublic void translate(java.lang.String objectId, double[] translate)
objectId
- : object to transformtranslate
- : [x,y,z] array amount to move the object]public void rotate(java.lang.String objectId, double[] rotate)
objectId
- : object to transformrotate
- : [x,y,z] array amount to rotate the object]public void scale(java.lang.String objectId, double[] scale)
objectId
- : object to transformscale
- : [x,y,z] array amount to scale the object]public void pivot(java.lang.String objectId, double[] pivot)
objectId
- : object to transformpivot
- : [x,y,z] array amount to rotate the object]public void transform(java.lang.String objectId, double[] translate, double[] rotate, double[] scale, double[] pivot)
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]public void capture()
public void restore()
public void restore(java.lang.String restoreString)
restoreString
- a capture String