Defines an occurrence of part or assembly in a scene graph.
Instance contains a reference to another element part or assembly and is used to share data, e.g. two instances can share the same part adding own transformations. Instance points to a specific scene graph element configuration and may return base configuration of reference scene graph element.
new Instance(
reference?,transformation?,name?):Instance
Referenced element.
null | Part | Assembly | Instance
Transformation of the referenced element.
null | Transformation
Name of the instance.
null | string
material:
null|VisualMaterial=null
The model element material. null if the element has no material (by default).
get id():
bigint
Returns object id.
bigint
get name():
null|string
Returns name of the model element. null if the element has no name (by default).
null | string
set name(
name):void
Sets name of the model element.
Name of the model element.
null | string
void
get reference():
null|ModelElement
Returns the referenced object. null if the instance does not refer to any object (by default).
null | ModelElement
set reference(
reference):void
Sets referenced object.
reference represents part or assembly or null, then sets its as this object reference.reference represents instance, then sets its reference as this object reference.Referenced object.
null | ModelElement
void
get transformation():
Transformation
Returns the transformation matrix.
If the matrix has not been explicitly assigned, then creates and explicitly assigns an identity matrix.
set transformation(
transformation):void
Sets transformation matrix.
Transformation matrix.
void
get uuid():
null| `$string