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.
Constructors
Properties
Methods
clear()copy()getCreationFlags()getFaceColor()getInstanceName()getLineColor()getLineOpacity()getMatrix()getMeshId()getOpacity()getOverlayIndex()getPointColor()getPointOpacity()setCreationFlags()setFaceColor()setInstanceName()setLineColor()setLineOpacity()setMatrix()setMeshId()setOpacity()setOverlayIndex()setPointColor()setPointOpacity()
Constructors
- 
MeshInstanceData.constructor([meshId[, matrix[, instanceName[, faceColor[, lineColor[, pointColor[, creationFlags]]]]]]]) Arguments: - meshId (
null | MeshId()) – optional the [[MeshId]] of the mesh to instantiate - matrix (
null | Matrix()) – optional a matrix that will be applied to this instance - instanceName (
null | string()) – optional a name that will be visible when querying the model hierarchy - faceColor (
null | Color()) – optional the color for faces of this instance - lineColor (
null | Color()) – optional the color for lines of this instance - pointColor (
null | Color()) – optional the color for points of this instance - creationFlags (
null | MeshInstanceCreationFlags()) – optional additional options that can be used to alter the behavior of this instance 
Creates a new MeshInstanceData object.
Return type: MeshInstanceData - meshId (
 
Methods
copy
- 
MeshInstanceData.copy() Creates a copy of this MeshInstanceData.
Returns: Copy of this MeshInstanceData object. Return type: MeshInstanceData 
getCreationFlags
- 
MeshInstanceData.getCreationFlags() Gets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
Returns: the mesh instance creation flags (null if none set) Return type: MeshInstanceCreationFlags 
getFaceColor
- 
MeshInstanceData.getFaceColor() Gets the color for face elements in this instance.
Returns: the color for face elements. Return type: null | Color 
getInstanceName
- 
MeshInstanceData.getInstanceName() Gets the name that will be applied to the instance.
Returns: the instance name. Return type: null | string 
getLineColor
- 
MeshInstanceData.getLineColor() Gets the color for line elements in this instance.
Returns: the color for line elements. Return type: null | Color 
getLineOpacity
- 
MeshInstanceData.getLineOpacity() Gets the line opacity value for this instance.
Returns: the line opacity value for this instance. Return type: number 
getMatrix
- 
MeshInstanceData.getMatrix() Gets the matrix to apply to this instance.
Returns: the current matrix that will be applied to this instance upon creation. Return type: null | Matrix 
getMeshId
- 
MeshInstanceData.getMeshId() Gets the [[MeshId]] of the mesh to use for this instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
Returns: the mesh ID to use for this instance. Return type: null | MeshId 
getOpacity
- 
MeshInstanceData.getOpacity() Gets the face opacity value for this instance.
Returns: the face opacity value for this instance. Return type: number 
getOverlayIndex
- 
MeshInstanceData.getOverlayIndex() Gets the overlay index for this instance.
Returns: the overlay index for this instance, but not the associated view. Deprecated: use [[overlayId]] instead. Return type: number 
getPointColor
- 
MeshInstanceData.getPointColor() Gets the color for point elements in this instance.
Returns: the color for point elements. Return type: null | Color 
getPointOpacity
- 
MeshInstanceData.getPointOpacity() Gets the point opacity value for this instance.
Returns: the point opacity value for this instance. Return type: number 
setCreationFlags
- 
MeshInstanceData.setCreationFlags(flags) Arguments: - flags (
MeshInstanceCreationFlags()) – creation flags 
Sets the mesh instance creation flags (SuppressCameraScale, DoNotExplode, DoNotLight…)
Return type: void - flags (
 
setFaceColor
setInstanceName
- 
MeshInstanceData.setInstanceName(instanceName) Arguments: - instanceName (
string()) – the name to assign to this instance. 
Sets the name that will be assigned to this instance. This name will be visible when querying the model hierarchy.
Return type: void - instanceName (
 
setLineColor
setLineOpacity
- 
MeshInstanceData.setLineOpacity(lineOpacity) Arguments: - lineOpacity (
number()) – opacity value to set. 
Sets the line opacity for this instance.
Return type: void - lineOpacity (
 
setMatrix
setMeshId
- 
MeshInstanceData.setMeshId(meshId) Arguments: - meshId (
MeshId()) – the [[MeshId]] to use. 
Sets the [[MeshId]] of the mesh to use for the instance. [[MeshId]]s are created with [[Model.createMesh]] or retrieved with [[Model.getMeshIds]].
Return type: void - meshId (
 
setOpacity
- 
MeshInstanceData.setOpacity(faceOpacity) Arguments: - faceOpacity (
number()) – opacity value to set. 
Sets the face opacity for this instance.
Return type: void - faceOpacity (
 
setOverlayIndex
- 
MeshInstanceData.setOverlayIndex(overlayIndex) Arguments: - overlayIndex (
number()) – overlay index to set. 
Sets the overlay index for this instance but doesn’t change the associated view.
Deprecated: use [[overlayId]] instead. Return type: void - overlayIndex (