MeshInstanceData

class Communicator.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


Constructors

MeshInstanceData.constructor([meshId[, matrix[, instanceName[, faceColor[, lineColor[, pointColor[, creationFlags]]]]]]])

Creates a new MeshInstanceData object.

Arguments
  • meshId (MeshId | null) – optional

  • matrix (Matrix() | null) – optional

  • instanceName (string | null()) – optional

  • faceColor (Color() | null) – optional

  • lineColor (Color() | null) – optional

  • pointColor (Color() | null) – optional

  • creationFlags (MeshInstanceCreationFlags | null) – optional

Return type

MeshInstanceData()

Methods

clear

MeshInstanceData.clear()

Resets all fields of this object.

Return type

void

copy

MeshInstanceData.copy()

Creates a copy of this MeshInstanceData.

Return type

MeshInstanceData()

Returns

Copy of this MeshInstanceData object.

getCreationFlags

MeshInstanceData.getCreationFlags()

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

Return type

MeshInstanceCreationFlags

Returns

the mesh instance creation flags (null if none set)

getFaceColor

MeshInstanceData.getFaceColor()

Gets the color for face elements in this instance.

Return type

Color() | null

Returns

the color for face elements.

getInstanceName

MeshInstanceData.getInstanceName()

Gets the name that will be applied to the instance.

Return type

string | null

Returns

the instance name.

getLineColor

MeshInstanceData.getLineColor()

Gets the color for line elements in this instance.

Return type

Color() | null

Returns

the color for line elements.

getLineOpacity

MeshInstanceData.getLineOpacity()

Gets the line opacity value for this instance.

Return type

number

Returns

the line opacity value for this instance.

getMatrix

MeshInstanceData.getMatrix()

Gets the matrix to apply to this instance.

Return type

Matrix() | null

Returns

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

getMeshId

MeshInstanceData.getMeshId()

Gets the MeshId of the mesh to use for this instance. MeshId are created with Model.createMesh or retrieved with Model.getMeshIds

Return type

MeshId | null

Returns

the mesh ID to use for this instance.

getMeshKey

MeshInstanceData.getMeshKey()
Deprecated

Use getMeshId instead

Return type

MeshId | null

getOpacity

MeshInstanceData.getOpacity()

Gets the face opacity value for this instance.

Return type

number

Returns

the face opacity value for this instance.

getOverlayIndex

MeshInstanceData.getOverlayIndex()

Gets the overlay index for this instance.

Return type

OverlayIndex

Returns

the overlay index for this instance.

getPointColor

MeshInstanceData.getPointColor()

Gets the color for point elements in this instance.

Return type

Color() | null

Returns

the color for point elements.

getPointOpacity

MeshInstanceData.getPointOpacity()

Gets the point opacity value for this instance.

Return type

number

Returns

the point opacity value for this instance.

getTransparency

MeshInstanceData.getTransparency()
Deprecated

use getOpacity instead.

Return type

number

setCreationFlags

MeshInstanceData.setCreationFlags(flags)

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

Arguments
Return type

void

setFaceColor

MeshInstanceData.setFaceColor(faceColor)

Sets the color for face elements in this instance.

Arguments
  • faceColor (Color()) – the color to apply to face elements.

Return type

void

setInstanceName

MeshInstanceData.setInstanceName(instanceName)

Sets the name that will be assigned to this instance. This name will be visible when querying the model hierarchy.

Arguments
  • instanceName (string()) – the name to assign to this instance.

Return type

void

setLineColor

MeshInstanceData.setLineColor(lineColor)

Sets the color for line elements in this instance.

Arguments
  • lineColor (Color()) – the color to apply to line elements.

Return type

void

setLineOpacity

MeshInstanceData.setLineOpacity(lineOpacity)

Sets the line opacity for this instance.

Arguments
  • lineOpacity (number()) – opacity value to set.

Return type

void

setMatrix

MeshInstanceData.setMatrix(matrix)

Sets the matrix that will be applied to this instance.

Arguments
  • matrix (Matrix()) – the matrix to apply.

Return type

void

setMeshId

MeshInstanceData.setMeshId(meshId)

Sets the MeshId of the mesh to use for the instance. MeshId are created with Model.createMesh or retrieved with Model.getMeshIds

Arguments
  • meshId (MeshId) – the MeshId to use.

Return type

void

setMeshKey

MeshInstanceData.setMeshKey(meshId)
Deprecated

use setMeshId instead

Arguments
Return type

void

setOpacity

MeshInstanceData.setOpacity(faceOpacity)

Sets the face opacity for this instance.

Arguments
  • faceOpacity (number()) – opacity value to set.

Return type

void

setOverlayIndex

MeshInstanceData.setOverlayIndex(overlayIndex)

Sets the overlay index for this instance.

Arguments
Return type

void

setPointColor

MeshInstanceData.setPointColor(pointColor)

Sets the color for point elements in this instance.

Arguments
  • pointColor (Color()) – the color to apply to point elements.

Return type

void

setPointOpacity

MeshInstanceData.setPointOpacity(pointOpacity)

Sets the point opacity for this instance.

Arguments
  • pointOpacity (number()) – opacity value to set.

Return type

void

setTransparency

MeshInstanceData.setTransparency(transparency)
Deprecated

use setOpacity instead.

Arguments
  • transparency (number()) –

Return type

void