Represents dynamic elements that can be transformed.

Hierarchy

  • DynamicElements

Constructors

Accessors

  • get transformObjectsCount(): number
  • Returns number

  • get transformationChangedEvent(): IEvent<BaseRenderer, TransformationChangedEvent>
  • Returns IEvent<BaseRenderer, TransformationChangedEvent>

Methods

  • Concatenates the transformations for the specified internal IDs and matrices.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • matrices: number[][]

      The transformation matrices.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Checks if there is a transformation for the specified internal ID.

    Returns

    Whether there is a transformation for the internal ID.

    Parameters

    • internalId: Int64

      The internal ID of the element.

    Returns boolean

  • Checks if there are any transformations.

    Returns

    Whether there are transformations.

    Returns boolean

  • Inverts the transformations for the specified internal IDs.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • updateRender: boolean = false

      Whether to update the render.

    Returns Promise<void>

  • Gets the inverted transformation matrix for the specified internal ID.

    Returns

    The inverted transformation matrix.

    Parameters

    • internalId: Int64

      The internal ID of the element.

    Returns number[]

  • Rotates the elements to look at the specified vector.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • lookVector: Vector3D

      The look vector.

    • upVector: Vector3D = ...

      The up vector.

    Returns Promise<void>

  • Gets the transformation matrices for the specified internal IDs.

    Returns

    The transformation matrices.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    Returns number[][]

  • Gets the transformation matrix for the specified internal ID.

    Returns

    The transformation matrix.

    Parameters

    • internalId: Int64

      The internal ID of the element.

    • nullOnIdentity: boolean = false

      Whether to return null on identity matrix.

    Returns number[]

  • Moves the elements to the specified target position.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • targetPosition: Vector3D

      The target position.

    • Optional currentPosition: Vector3D

      The current position.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Resets the transformations for the specified IDs.

    Parameters

    • ids: Int64 | Int64[]

      The IDs of the elements.

    • updateRender: boolean = false

      Whether to update the render.

    Returns Promise<void>

  • Resets all transformations.

    Parameters

    • updateRender: boolean = false

      Whether to update the render.

    Returns Promise<void>

  • Rotates the elements around the specified quaternion.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • quaternion: Quaternion

      The rotation quaternion.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Rotates the elements around the X-axis.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • deg: number

      The rotation angle in degrees.

    Returns Promise<void>

  • Rotates the elements around the specified XYZ angles.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • rotationAnglesXYZ: Vector3D

      The rotation angles in XYZ.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Rotates the elements around the Y-axis.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • deg: number

      The rotation angle in degrees.

    Returns Promise<void>

  • Rotates the elements around the Z-axis.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • deg: number

      The rotation angle in degrees.

    Returns Promise<void>

  • Scales the elements around the specified XYZ factors.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • origin: Vector3D

      The origin point.

    • scaleFactors: Vector3D

      The scale factors in XYZ.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Sets the transformations for the specified internal IDs and matrices.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • matrices: number[][]

      The transformation matrices.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Sets the state of the dynamic elements.

    Parameters

    Returns Promise<void>

  • Translates the elements to the specified vector.

    Parameters

    • internalIds: Int64[]

      The internal IDs of the elements.

    • vector: Vector3D

      The translation vector.

    • updateRender: boolean = true

      Whether to update the render.

    Returns Promise<void>

  • Unloads the model and removes its dynamic elements.

    Parameters

    • modelInfo: ModelInfo

      The model information.

    Returns void