Communicator.MeshInstanceData

 MeshInstanceData

Object representing a Mesh instance that will be created by the client at run time. This class allows for the specification of instance specific properties of a mesh.

Constructors

constructor

  • Creates a new MeshInstanceData object.

    Parameters

    • Optional meshId: MeshId | null

      the MeshId of the mesh to instantiate

    • Optional matrix: Matrix | null

      a matrix that will be applied to this instance

    • Optional instanceName: string | null

      a name that will be visible when querying the model hierarchy

    • Optional faceColor: Color | null

      the color for faces of this instance

    • Optional lineColor: Color | null

      the color for lines of this instance

    • Optional pointColor: Color | null

      the color for points of this instance

    • Optional creationFlags: MeshInstanceCreationFlags | null

      additional options that can be used to alter the behavior of this instance

    Returns MeshInstanceData

Methods

clear

  • clear(): void
  • Resets all fields of this object.

    Returns void

copy

  • Creates a copy of this MeshInstanceData.

    Returns MeshInstanceData

    Copy of this MeshInstanceData object.

getCreationFlags

  • Gets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight...)

    Returns MeshInstanceCreationFlags

    the mesh instance creation flags (null if none set)

getFaceColor

  • getFaceColor(): Color | null
  • Gets the color for face elements in this instance.

    Returns Color | null

    the color for face elements.

getInstanceName

  • getInstanceName(): string | null
  • Gets the name that will be applied to the instance.

    Returns string | null

    the instance name.

getLineColor

  • getLineColor(): Color | null
  • Gets the color for line elements in this instance.

    Returns Color | null

    the color for line elements.

getLineOpacity

  • getLineOpacity(): number
  • Gets the line opacity value for this instance.

    Returns number

    the line opacity value for this instance.

getMatrix

  • Gets the matrix to apply to this instance.

    Returns Matrix | null

    the current matrix that will be applied to this instance upon creation.

getMeshId

getMeshKey    [deprecated]

getOpacity

  • getOpacity(): number
  • Gets the face opacity value for this instance.

    Returns number

    the face opacity value for this instance.

getOverlayIndex

  • Gets the overlay index for this instance.

    Returns OverlayIndex

    the overlay index for this instance.

getPointColor

  • getPointColor(): Color | null
  • Gets the color for point elements in this instance.

    Returns Color | null

    the color for point elements.

getPointOpacity

  • getPointOpacity(): number
  • Gets the point opacity value for this instance.

    Returns number

    the point opacity value for this instance.

getTransparency    [deprecated]

  • getTransparency(): number
  • deprecated

    use getOpacity instead.

    Returns number

setCreationFlags

  • Sets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight...)

    Parameters

    Returns void

setFaceColor

  • setFaceColor(faceColor: Color): void
  • Sets the color for face elements in this instance.

    Parameters

    • faceColor: Color

      the color to apply to face elements.

    Returns void

setInstanceName

  • setInstanceName(instanceName: string): void
  • Sets the name that will be assigned to this instance. This name will be visible when querying the model hierarchy.

    Parameters

    • instanceName: string

      the name to assign to this instance.

    Returns void

setLineColor

  • setLineColor(lineColor: Color): void
  • Sets the color for line elements in this instance.

    Parameters

    • lineColor: Color

      the color to apply to line elements.

    Returns void

setLineOpacity

  • setLineOpacity(lineOpacity: number): void
  • Sets the line opacity for this instance.

    Parameters

    • lineOpacity: number

      opacity value to set.

    Returns void

setMatrix

  • setMatrix(matrix: Matrix): void
  • Sets the matrix that will be applied to this instance.

    Parameters

    • matrix: Matrix

      the matrix to apply.

    Returns void

setMeshId

  • setMeshId(meshId: MeshId): void

setMeshKey    [deprecated]

  • setMeshKey(meshId: MeshId): void

setOpacity

  • setOpacity(faceOpacity: number): void
  • Sets the face opacity for this instance.

    Parameters

    • faceOpacity: number

      opacity value to set.

    Returns void

setOverlayIndex

  • Sets the overlay index for this instance.

    Parameters

    Returns void

setPointColor

  • setPointColor(pointColor: Color): void
  • Sets the color for point elements in this instance.

    Parameters

    • pointColor: Color

      the color to apply to point elements.

    Returns void

setPointOpacity

  • setPointOpacity(pointOpacity: number): void
  • Sets the point opacity for this instance.

    Parameters

    • pointOpacity: number

      opacity value to set.

    Returns void

setTransparency    [deprecated]

  • setTransparency(transparency: number): void
  • deprecated

    use setOpacity instead.

    Parameters

    • transparency: number

    Returns void