Interface HKHumanInterface


public interface HKHumanInterface
Callback functions for the 3D Scene All callback functions are optional to implement
  • Method Details

    • onModelLoaded

      default void onModelLoaded(String modelId)
      Called when loading is complete for a scene
      Parameters:
      modelId - String id of the loaded model
    • onModelLoadError

      default void onModelLoadError(String modelId)
      Called when an error has occurred during loading for a scene
      Parameters:
      modelId - String id of the loaded model
    • onObjectSelected

      default void onObjectSelected(String objectId)
      Called when an object is selected in the scene
      Parameters:
      objectId - String id of the selected object
    • onObjectDeselected

      default void onObjectDeselected(String objectId)
      Called when an object is deselected in the scene
      Parameters:
      objectId - String id of the selected object
    • onObjectsShown

      default void onObjectsShown(Map<String,Object> objects)
      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

      default void onChapterTransition(String chapterId)
      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

      default void onSceneInit(String title)
      Called when the scene is initialized and metadata is available
      Parameters:
      title - the scene title
    • onXrayEnabled

      default void onXrayEnabled(Boolean isEnabled)
      Called when xray mode is enabled or disabled
      Parameters:
      isEnabled - true if enabled
    • onSceneRestore

      default void onSceneRestore()
      Called when the scene is restored
    • onTimelineUpdated

      default void onTimelineUpdated(HKTimeline timeline)
      Called when the timeline has been updated
      Parameters:
      timeline - the HKTimeline object
    • onLabelCreated

      default void onLabelCreated(String labelId)
      Called when a new Label is created in the scene
      Parameters:
      labelId - the ID of the new HKLabel object
    • onLabelDestroyed

      default void onLabelDestroyed(String labelId)
      Called when a Label is destroyed in the scene
      Parameters:
      labelId - the ID of the destroyed HKLabel
    • onCameraUpdated

      default void onCameraUpdated(HKCamera camera)
      Called when the camera moves in the scene
      Parameters:
      camera - the updated HKCamera object
    • onObjectPicked

      default void onObjectPicked(String objectId, double[] position)
      Called when an object is picked by the user
      Parameters:
      objectId - the ID of the object
      position - the 3D position of the picked object
    • onLabelsShown

      default void onLabelsShown(Boolean isShown)
      Called when Labels are shown or hidden in the scene
      Parameters:
      isShown - true if Labels are shown
    • onLabelUpdated

      default void onLabelUpdated(String labelId)
      Called when the Label properties have been updated
      Parameters:
      labelId - of the updated HKLabel object
    • onLabelMoved

      default void onLabelMoved(String labelId)
      Called when the Label screen position has changed
      Parameters:
      labelId - of the updated HKLabel object
    • onObjectColor

      default void onObjectColor(String objectId, HKColor color)
      Called when an object's color is retrieved
      Parameters:
      objectId - the ID of the object
      color - the HKColor of the object
    • onSceneCapture

      default void onSceneCapture(String captureString)
      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

      default void onQuizEnabled(Boolean enabled)
      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

      default void onQuizQuestionLoaded(String questionId)
      Called when a Question is loaded
      Parameters:
      questionId - the ID for reference
    • onQuizAnswerSelected

      default void onQuizAnswerSelected(ArrayList<String> answers)
      Called when a set of answers has been selected by the user
      Parameters:
      answers - the IDs of the selections
    • onQuizAnswerSubmitted

      default void onQuizAnswerSubmitted(HKQuizSubmission submission)
      Called when the user submits a set of answers to a question
      Parameters:
      submission - HKSubmission object with relevant data
    • onQuizCompleted

      default void onQuizCompleted(Double score)
      Called when the user completes a quiz
      Parameters:
      score - the user's score out of 100