HKHuman

@objc
public class HKHuman : NSObject

The BioDigital Human 3D View object and API

  • The HKHumanDelegate object

    • Set this to have access to the callback functions in your app

    Declaration

    Swift

    @objc
    public weak var delegate: HKHumanDelegate?
  • HKScene object provides information and control of the 3D scene

    Declaration

    Swift

    @objc
    public var scene: HKScene
  • HKTimeline object controls Chapter navigation and animations

    Declaration

    Swift

    @objc
    public var timeline: HKTimeline
  • HKCamera object for manipulating the camera and reading camera information

    Declaration

    Swift

    @objc
    public var camera: HKCamera
  • ui

    HKUI object for setting and reading the UI parameters

    Declaration

    Swift

    @objc
    public var ui: HKUI
  • HKAnnotations object managing HKAnnotations in the scene

    Since

    SDK 2.0

    Declaration

    Swift

    @objc
    public var annotations: HKAnnotations
  • version of the 3D engine

    Declaration

    Swift

    @objc
    public var version: String
  • Initialize the Human Body with a view and the default UI options

    Note

    This is the recommended way to use HKHuman as of SDK 2.0

    Declaration

    Swift

    @objc
    public init(view: UIView)

    Parameters

    view

    the UIView to draw the 3D scene

  • Initialize the Human Body with a view and options to turn off and on UI elements in the scene

    Declaration

    Swift

    public init(view: UIView, options: [HumanUIOptions : Bool])

    Parameters

    view

    the UIView to draw the 3D scene

    options

    a map of HumanUIOptions and booleans to set or unset them

  • Set one UI variable to true or false

    Declaration

    Swift

    @objc
    public func setupUI(option: HumanUIOptions, value: Bool)

    Parameters

    option

    a value from the enum HumanUIOptions

    value

    true or false

API functions

  • Loads a BioDigital Human 3D module.

    Declaration

    Swift

    @objc
    public func load(model: String)

    Parameters

    model

    The moduleID string

    callback

    A closure to run after the module is loaded

  • Unload the currently laoded model

    NOTE:

    this function should be used in conjunction with load() to reuse the HKHuman object for load time improvements

    Declaration

    Swift

    @objc
    public func unload()
  • Reload the currently loaded model

    Declaration

    Swift

    @objc
    public func reload()
  • Disable user input

    Since

    SDK 2.0

    Declaration

    Swift

    @objc
    public func disableInput()
  • Enable user input

    Since

    SDK 2.0

    Declaration

    Swift

    @objc
    public func enableInput()