Class SpheroDataObject<T>

Type Parameters

  • T extends Core

Hierarchy

  • DataObject
    • SpheroDataObject

Constructors

Properties

createdTimestamp: number

Created timestamp

displayName: string

Object display name

parentUID: string
toy: T
uid: string

Object identifier

Returns

Unique object identifier

Accessors

  • get position(): AbsolutePosition
  • Get the current absolute position of the object relative to the global reference space

    Returns

    Absolute position of data object

    Returns AbsolutePosition

  • set position(position: AbsolutePosition): void
  • Set the current absolute position of the object relative to the global reference space

    Parameters

    • position: AbsolutePosition

    Returns void

  • get relativePositions(): RelativePosition<any, Unit>[]
  • Get relative positions

    Returns

    Array of relative positions

    Returns RelativePosition<any, Unit>[]

  • set relativePositions(relativePostions: RelativePosition<any, Unit>[]): void
  • Parameters

    • relativePostions: RelativePosition<any, Unit>[]

    Returns void

Methods

  • Add a relative position to this data object

    Returns

    Data object instance

    Parameters

    • relativePosition: RelativePosition<any, Unit>

      Relative position to add

    Returns SpheroDataObject<T>

  • Bind the data object to a service

    Returns

    Data object binding with a service

    Parameters

    Returns DataObjectBinding<SpheroDataObject<T>>

  • Clone the data object

    Returns

    Cloned data object

    Returns SpheroDataObject<T>

  • Get the current absolute position of the object

    Returns

    Position of the data object

    Parameters

    • Optional referenceSpace: TransformationSpace

      Reference space to transform it to

    Returns AbsolutePosition

  • Get relative position of a specified object

    Returns

    Relative position to reference object

    Parameters

    • referenceObjectUID: string

      Reference object identifier

    • Optional type: string

      Constructor type of the relative position

    Returns RelativePosition<any, Unit>

  • Get relative positions for a different target

    Returns

    Array of relative positions for the reference object

    Parameters

    • Optional referenceObjectUID: string

      Reference object identifier

    Returns RelativePosition<any, Unit>[]

  • Parameters

    • referenceObjectUID: string

    Returns boolean

  • Parameters

    • referenceObjectUID: string

    Returns void

  • Set a parent object to the data object

    Returns

    instance

    Parameters

    • object: string | DataObject

      Data object or UID to add as parent

    Returns SpheroDataObject<T>

  • Set the current absolute position of the object

    Returns

    Data object instance

    Parameters

    • position: AbsolutePosition

      Position to set

    • Optional referenceSpace: TransformationSpace

      Reference space

    Returns SpheroDataObject<T>

  • Set the unique identifier of this object

    Returns

    Data object instance

    Parameters

    • uid: string

      Unique Identifier

    Returns SpheroDataObject<T>