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
Methods
Constructors
constructor
- Communicator.MeshInstanceData.constructor(meshId, matrix, instanceName, faceColor, lineColor, pointColor, creationFlags)
Creates a new MeshInstanceData object.
- Arguments
meshId (
{ }()
) –matrix (
{ }()
) –instanceName (
{ }()
) –faceColor (
{ }()
) –lineColor (
{ }()
) –pointColor (
{ }()
) –creationFlags (
{ }()
) –
- Return type
Communicator.MeshInstanceData
Methods
copy
- Communicator.MeshInstanceData.copy()
Creates a copy of this MeshInstanceData.
- Return type
Communicator.MeshInstanceData
- Returns
Copy of this MeshInstanceData object.
getCreationFlags
- Communicator.MeshInstanceData.getCreationFlags()
Gets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
- Return type
Communicator.MeshInstanceCreationFlags
- Returns
the mesh instance creation flags (null if none set)
getFaceColor
- Communicator.MeshInstanceData.getFaceColor()
Gets the color for face elements in this instance.
- Return type
{ }
- Returns
the color for face elements.
getInstanceName
- Communicator.MeshInstanceData.getInstanceName()
Gets the name that will be applied to the instance.
- Return type
{ }
- Returns
the instance name.
getLineColor
- Communicator.MeshInstanceData.getLineColor()
Gets the color for line elements in this instance.
- Return type
{ }
- Returns
the color for line elements.
getLineOpacity
- Communicator.MeshInstanceData.getLineOpacity()
Gets the line opacity value for this instance.
- Return type
number
- Returns
the line opacity value for this instance.
getMatrix
- Communicator.MeshInstanceData.getMatrix()
Gets the matrix to apply to this instance.
- Return type
{ }
- Returns
the current matrix that will be applied to this instance upon creation.
getMeshId
- Communicator.MeshInstanceData.getMeshId()
Gets the
MeshId
of the mesh to use for this instance.MeshId
are created withModel.createMesh
or retrieved withModel.getMeshIds
- Return type
{ }
- Returns
the mesh ID to use for this instance.
getMeshKey
- Communicator.MeshInstanceData.getMeshKey()
Note
getMeshKey is deprecated: Use
getMeshId
instead- Return type
{ }
getOpacity
- Communicator.MeshInstanceData.getOpacity()
Gets the face opacity value for this instance.
- Return type
number
- Returns
the face opacity value for this instance.
getOverlayIndex
- Communicator.MeshInstanceData.getOverlayIndex()
Gets the overlay index for this instance.
- Return type
Communicator.OverlayIndex
- Returns
the overlay index for this instance.
getPointColor
- Communicator.MeshInstanceData.getPointColor()
Gets the color for point elements in this instance.
- Return type
{ }
- Returns
the color for point elements.
getPointOpacity
- Communicator.MeshInstanceData.getPointOpacity()
Gets the point opacity value for this instance.
- Return type
number
- Returns
the point opacity value for this instance.
getTransparency
- Communicator.MeshInstanceData.getTransparency()
Note
getTransparency is deprecated: use
getOpacity
instead.- Return type
number
setCreationFlags
- Communicator.MeshInstanceData.setCreationFlags(flags)
Sets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
- Arguments
flags (
Communicator.MeshInstanceCreationFlags()
) – creation flags
- Return type
void
setFaceColor
- Communicator.MeshInstanceData.setFaceColor(faceColor)
Sets the color for face elements in this instance.
- Arguments
faceColor (
Communicator.Color()
) – the color to apply to face elements.
- Return type
void
setInstanceName
- Communicator.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
- Communicator.MeshInstanceData.setLineColor(lineColor)
Sets the color for line elements in this instance.
- Arguments
lineColor (
Communicator.Color()
) – the color to apply to line elements.
- Return type
void
setLineOpacity
- Communicator.MeshInstanceData.setLineOpacity(lineOpacity)
Sets the line opacity for this instance.
- Arguments
lineOpacity (
number()
) – opacity value to set.
- Return type
void
setMatrix
- Communicator.MeshInstanceData.setMatrix(matrix)
Sets the matrix that will be applied to this instance.
- Arguments
matrix (
Communicator.Matrix()
) – the matrix to apply.
- Return type
void
setMeshId
- Communicator.MeshInstanceData.setMeshId(meshId)
Sets the
MeshId
of the mesh to use for the instance.MeshId
are created withModel.createMesh
or retrieved withModel.getMeshIds
- Arguments
meshId (
Communicator.MeshId()
) – theMeshId
to use.
- Return type
void
setMeshKey
- Communicator.MeshInstanceData.setMeshKey(meshId)
Note
setMeshKey is deprecated: use
setMeshId
instead- Arguments
meshId (
Communicator.MeshId()
) –
- Return type
void
setOpacity
- Communicator.MeshInstanceData.setOpacity(faceOpacity)
Sets the face opacity for this instance.
- Arguments
faceOpacity (
number()
) – opacity value to set.
- Return type
void
setOverlayIndex
- Communicator.MeshInstanceData.setOverlayIndex(overlayIndex)
Sets the overlay index for this instance.
- Arguments
overlayIndex (
Communicator.OverlayIndex()
) – overlay index to set.
- Return type
void
setPointColor
- Communicator.MeshInstanceData.setPointColor(pointColor)
Sets the color for point elements in this instance.
- Arguments
pointColor (
Communicator.Color()
) – the color to apply to point elements.
- Return type
void