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 voidCalled when the current is done runningdefault voidonCameraUpdated(HKCamera camera) Called when the camera moves in the scenedefault voidonChapterTransition(String chapterId) Called when a new chapter is loaded by the scenedefault voidonLabelCreated(String labelId) Called when a new Label is created in the scenedefault voidonLabelDestroyed(String labelId) Called when a Label is destroyed in the scenedefault voidonLabelMoved(String labelId) Called when the Label screen position has changeddefault voidonLabelsShown(Boolean isShown) Called when Labels are shown or hidden in the scenedefault voidonLabelUpdated(String labelId) Called when the Label properties have been updateddefault voidonModelLoaded(String modelId) Called when loading is complete for a scenedefault voidonModelLoadError(String modelId) Called when an error has occurred during loading for a scenedefault voidonObjectColor(String objectId, HKColor color) Called when an object's color is retrieveddefault voidonObjectDeselected(String objectId) Called when an object is deselected in the scenedefault voidonObjectPicked(String objectId, double[] position) Called when an object is picked by the userdefault voidonObjectSelected(String objectId) Called when an object is selected in the scenedefault voidonObjectsShown(Map<String, Object> objects) Called when a set of objects are shown or hidden in the scenedefault voidonQuizAnswerSelected(ArrayList<String> answers) Called when a set of answers has been selected by the userdefault voidonQuizAnswerSubmitted(HKQuizSubmission submission) Called when the user submits a set of answers to a questiondefault voidonQuizCompleted(Double score) Called when the user completes a quizdefault voidonQuizEnabled(Boolean enabled) Called when content is loaded that contains a quiadefault voidCalled when a Quiz is starteddefault voidCalled when a Quiz is exiteddefault voidonQuizQuestionLoaded(String questionId) Called when a Question is loadeddefault voidonSceneCapture(String captureString) Called when a scene capture is completedefault voidonSceneInit(String title) Called when the scene is initialized and metadata is availabledefault voidCalled when the scene is restoreddefault voidonScreenshot(android.graphics.Bitmap image) Called when a screenshot is returned from the sdkdefault voidonTimelineUpdated(HKTimeline timeline) Called when the timeline has been updateddefault voidonXrayEnabled(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
-