public class HKScene
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<HKAnnotation> |
annotations
A list of HKAnnotation objects.
|
java.util.ArrayList<java.lang.String> |
objectIDs
A flat map of objectID Strings
|
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 Module.
|
java.lang.String |
title
The title of the current loaded Module.
|
Constructor and Description |
---|
HKScene() |
Modifier and Type | Method and Description |
---|---|
void |
colorObject(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
|
HKColor |
getColor(java.lang.String objectID)
Query the color of an object
|
double[] |
getScreenPosition(java.lang.String objectID)
Get screen position of object
|
void |
hideAnnotations()
Hides all annotations.
|
void |
hideLabels()
Hides all labels.
|
void |
isolate(boolean enabled)
Turn isolate mode ON or OFF in the current scene
|
void |
resetScene()
Reset the camera and objects to the current scene/chapter's original state
|
void |
screenshot()
Calls the onScreenshot interface method with the generated screenshot
|
void |
selectObject(java.lang.String objectID)
Select an object programatically
|
void |
setBackgroundColor(int topColor,
int bottomColor)
Change the background colors without changing the style, default is radial
|
void |
setBackgroundColor(int topColor,
int bottomColor,
java.lang.String bgType)
Change the background style with two specified colors
|
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 |
showAnnotations()
Shows all annotations.
|
void |
showLabels()
Shows all labels.
|
void |
uncolorObject(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 |
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.util.ArrayList<HKAnnotation> annotations
public void share()
public void screenshot()
public void resetScene()
public void xray(boolean enabled)
enabled
- A boolean to turn xray mode ON or OFFpublic 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 setBackgroundColor(int topColor, int bottomColor)
topColor
- Primary colorbottomColor
- Secondary colorpublic void setBackgroundColor(int topColor, int bottomColor, java.lang.String bgType)
topColor
- Primary colorbottomColor
- Secondary colorbgType
- Background style ("linear" or "radial", default is "radial")public void disableHighlight()
public void enableHighlight()
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 showLabels()
public void hideLabels()
public void selectObject(java.lang.String objectID)
objectID
- the object to selectpublic void undoSelections()
public void disablePicking()
public void enablePicking()
public double[] getScreenPosition(java.lang.String objectID)
objectID
- Stringpublic void colorObject(java.lang.String objectID, HKColor color)
objectID
- - the String id of the objectcolor
- - the HKColor to paint the objectpublic void uncolorObject(java.lang.String objectID)
objectID
- String id of the objectpublic HKColor getColor(java.lang.String objectID)
objectID
- - the String id of the objectpublic void showAnnotations()
public void hideAnnotations()