Package com.biodigital.humansdk
Interface HKHumanInterface
public interface HKHumanInterface
Callback functions for the 3D Scene
All callback functions are optional to implement
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Called when the current is done runningdefault void
onCameraUpdated
(HKCamera camera) Called when the camera moves in the scenedefault void
onChapterTransition
(String chapterId) Called when a new chapter is loaded by the scenedefault void
onLabelCreated
(String labelId) Called when a new Label is created in the scenedefault void
onLabelDestroyed
(String labelId) Called when a Label is destroyed in the scenedefault void
onLabelMoved
(String labelId) Called when the Label screen position has changeddefault void
onLabelsShown
(Boolean isShown) Called when Labels are shown or hidden in the scenedefault void
onLabelUpdated
(String labelId) Called when the Label properties have been updateddefault void
onModelLoaded
(String modelId) Called when loading is complete for a scenedefault void
onModelLoadError
(String modelId) Called when an error has occurred during loading for a scenedefault void
onObjectColor
(String objectId, HKColor color) Called when an object's color is retrieveddefault void
onObjectDeselected
(String objectId) Called when an object is deselected in the scenedefault void
onObjectPicked
(String objectId, double[] position) Called when an object is picked by the userdefault void
onObjectSelected
(String objectId) Called when an object is selected in the scenedefault void
onObjectsShown
(Map<String, Object> objects) Called when a set of objects are shown or hidden in the scenedefault void
onQuizAnswerSelected
(ArrayList<String> answers) Called when a set of answers has been selected by the userdefault void
onQuizAnswerSubmitted
(HKQuizSubmission submission) Called when the user submits a set of answers to a questiondefault void
onQuizCompleted
(Double score) Called when the user completes a quizdefault void
onQuizEnabled
(Boolean enabled) Called when content is loaded that contains a quiadefault void
Called when a Quiz is starteddefault void
Called when a Quiz is exiteddefault void
onQuizQuestionLoaded
(String questionId) Called when a Question is loadeddefault void
onSceneCapture
(String captureString) Called when a scene capture is completedefault void
onSceneInit
(String title) Called when the scene is initialized and metadata is availabledefault void
Called when the scene is restoreddefault void
onScreenshot
(android.graphics.Bitmap image) Called when a screenshot is returned from the sdkdefault void
onTimelineUpdated
(HKTimeline timeline) Called when the timeline has been updateddefault void
onXrayEnabled
(Boolean isEnabled) Called when xray mode is enabled or disabled
-
Method Details
-
onModelLoaded
Called when loading is complete for a scene- Parameters:
modelId
- String id of the loaded model
-
onModelLoadError
Called when an error has occurred during loading for a scene- Parameters:
modelId
- String id of the loaded model
-
onObjectSelected
Called when an object is selected in the scene- Parameters:
objectId
- String id of the selected object
-
onObjectDeselected
Called when an object is deselected in the scene- Parameters:
objectId
- String id of the selected object
-
onObjectsShown
Called when a set of objects are shown or hidden in the scene- Parameters:
objects
- a Map of object IDs and boolean values for shown/hidden
-
onChapterTransition
Called when a new chapter is loaded by the scene- Parameters:
chapterId
- String id of the current chapter
-
onAnimationComplete
default void onAnimationComplete()Called when the current is done running -
onScreenshot
default void onScreenshot(android.graphics.Bitmap image) Called when a screenshot is returned from the sdk- Parameters:
image
- Bitmap representation of the saved screenshot
-
onSceneInit
Called when the scene is initialized and metadata is available- Parameters:
title
- the scene title
-
onXrayEnabled
Called when xray mode is enabled or disabled- Parameters:
isEnabled
- true if enabled
-
onSceneRestore
default void onSceneRestore()Called when the scene is restored -
onTimelineUpdated
Called when the timeline has been updated- Parameters:
timeline
- the HKTimeline object
-
onLabelCreated
Called when a new Label is created in the scene- Parameters:
labelId
- the ID of the new HKLabel object
-
onLabelDestroyed
Called when a Label is destroyed in the scene- Parameters:
labelId
- the ID of the destroyed HKLabel
-
onCameraUpdated
Called when the camera moves in the scene- Parameters:
camera
- the updated HKCamera object
-
onObjectPicked
Called when an object is picked by the user- Parameters:
objectId
- the ID of the objectposition
- the 3D position of the picked object
-
onLabelsShown
Called when Labels are shown or hidden in the scene- Parameters:
isShown
- true if Labels are shown
-
onLabelUpdated
Called when the Label properties have been updated- Parameters:
labelId
- of the updated HKLabel object
-
onLabelMoved
Called when the Label screen position has changed- Parameters:
labelId
- of the updated HKLabel object
-
onObjectColor
Called when an object's color is retrieved- Parameters:
objectId
- the ID of the objectcolor
- the HKColor of the object
-
onSceneCapture
Called when a scene capture is complete- Parameters:
captureString
- the saved data as a Json String the capture can also be retrieved as a Map object with HKScene.captureJson
-
onQuizEnabled
Called when content is loaded that contains a quia- Parameters:
enabled
- will be true if there is a quiz in the content
-
onQuizEntered
default void onQuizEntered()Called when a Quiz is started -
onQuizExited
default void onQuizExited()Called when a Quiz is exited -
onQuizQuestionLoaded
Called when a Question is loaded- Parameters:
questionId
- the ID for reference
-
onQuizAnswerSelected
Called when a set of answers has been selected by the user- Parameters:
answers
- the IDs of the selections
-
onQuizAnswerSubmitted
Called when the user submits a set of answers to a question- Parameters:
submission
- HKSubmission object with relevant data
-
onQuizCompleted
Called when the user completes a quiz- Parameters:
score
- the user's score out of 100
-