MeshInstanceData
-
class
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.
Index
Constructors
Properties
Methods
clearcopygetCreationFlagsgetFaceColorgetInstanceNamegetLineColorgetLineOpacitygetMatrixgetMeshIdgetOpacitygetOverlayIndexgetPointColorgetPointOpacitysetCreationFlagssetFaceColorsetInstanceNamesetLineColorsetLineOpacitysetMatrixsetMeshIdsetOpacitysetOverlayIndexsetPointColorsetPointOpacity
Constructors
-
MeshInstanceData.constructor() - MeshInstanceData(meshId: (None |
MeshId), matrix: (None |Matrix), instanceName: (None | string), faceColor: (None |Color), lineColor: (None |Color), pointColor: (None |Color), creationFlags: (None |MeshInstanceCreationFlags)):MeshInstanceDataCreates a new MeshInstanceData object.
Parameters
meshId: (None |
MeshId)the [[MeshId]] of the mesh to instantiatematrix: (None |
Matrix)a matrix that will be applied to this instanceinstanceName: (None | string)
a name that will be visible when querying the model hierarchyfaceColor: (None |
Color)the color for faces of this instancelineColor: (None |
Color)the color for lines of this instancepointColor: (None |
Color)the color for points of this instancecreationFlags: (None |
MeshInstanceCreationFlags)additional options that can be used to alter the behavior of this instanceReturns:
MeshInstanceData
Methods
-
MeshInstanceData.clear() - clear(): void
Resets all fields of this object.
Returns: void
-
MeshInstanceData.copy() - copy():
MeshInstanceDataCreates a copy of this MeshInstanceData.
Returns:
MeshInstanceDataCopy of this MeshInstanceData object.
-
MeshInstanceData.getCreationFlags() - getCreationFlags():
MeshInstanceCreationFlagsGets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
Returns:
MeshInstanceCreationFlagsthe mesh instance creation flags (null if none set)
-
MeshInstanceData.getFaceColor() - getFaceColor(): (None |
Color)Gets the color for face elements in this instance.
Returns: (None |
Color)the color for face elements.
-
MeshInstanceData.getInstanceName() - getInstanceName(): (None | string)
Gets the name that will be applied to the instance.
Returns: (None | string)
the instance name.
-
MeshInstanceData.getLineColor() - getLineColor(): (None |
Color)Gets the color for line elements in this instance.
Returns: (None |
Color)the color for line elements.
-
MeshInstanceData.getLineOpacity() - getLineOpacity(): number
Gets the line opacity value for this instance.
Returns: number
the line opacity value for this instance.
-
MeshInstanceData.getMatrix() - getMatrix(): (None |
Matrix)Gets the matrix to apply to this instance.
Returns: (None |
Matrix)the current matrix that will be applied to this instance upon creation.
-
MeshInstanceData.getMeshId() - getMeshId(): (None |
MeshId)Gets the [[MeshId]] of the mesh to use for this instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
Returns: (None |
MeshId)the mesh ID to use for this instance.
-
MeshInstanceData.getOpacity() - getOpacity(): number
Gets the face opacity value for this instance.
Returns: number
the face opacity value for this instance.
-
MeshInstanceData.getOverlayIndex() - getOverlayIndex(): number
Gets the overlay index for this instance.
Deprecated
use [[overlayId]] instead.Returns: number
the overlay index for this instance, but not the associated view.
-
MeshInstanceData.getPointColor() - getPointColor(): (None |
Color)Gets the color for point elements in this instance.
Returns: (None |
Color)the color for point elements.
-
MeshInstanceData.getPointOpacity() - getPointOpacity(): number
Gets the point opacity value for this instance.
Returns: number
the point opacity value for this instance.
-
MeshInstanceData.setCreationFlags() - setCreationFlags(flags:
MeshInstanceCreationFlags): voidSets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
Parameters
flags:
MeshInstanceCreationFlagscreation flagsReturns: void
-
MeshInstanceData.setFaceColor() - setFaceColor(faceColor:
Color): voidSets the color for face elements in this instance.
Parameters
faceColor:
Colorthe color to apply to face elements.Returns: void
-
MeshInstanceData.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
-
MeshInstanceData.setLineColor() - setLineColor(lineColor:
Color): voidSets the color for line elements in this instance.
Parameters
lineColor:
Colorthe color to apply to line elements.Returns: void
-
MeshInstanceData.setLineOpacity() - setLineOpacity(lineOpacity: number): void
Sets the line opacity for this instance.
Parameters
lineOpacity: number
opacity value to set.Returns: void
-
MeshInstanceData.setMatrix() - setMatrix(matrix:
Matrix): voidSets the matrix that will be applied to this instance.
Parameters
matrix:
Matrixthe matrix to apply.Returns: void
-
MeshInstanceData.setMeshId() - setMeshId(meshId:
MeshId): voidSets the [[MeshId]] of the mesh to use for the instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
Parameters
meshId:
MeshIdthe [[MeshId]] to use.Returns: void
-
MeshInstanceData.setOpacity() - setOpacity(faceOpacity: number): void
Sets the face opacity for this instance.
Parameters
faceOpacity: number
opacity value to set.Returns: void
-
MeshInstanceData.setOverlayIndex() - setOverlayIndex(overlayIndex: number): void
Sets the overlay index for this instance but doesn’t change the associated view.
Deprecated
use [[overlayId]] instead.Parameters
overlayIndex: number
overlay index to set.Returns: void
-
MeshInstanceData.setPointColor() - setPointColor(pointColor:
Color): voidSets the color for point elements in this instance.
Parameters
pointColor:
Colorthe color to apply to point elements.Returns: void
-
MeshInstanceData.setPointOpacity() - setPointOpacity(pointOpacity: number): void
Sets the point opacity for this instance.
Parameters
pointOpacity: number
opacity value to set.Returns: void