Occurrence
Learn about occurrences in the scene, including their properties, functions, and how to work with prototypes and instances.
Read time 1 minuteLast updated 21 hours ago
API reference The nodes in the product structure are referred to as occurrences. Most of the optimization functions take an occurrence or a list of occurrences as input. This table shows examples:
Function | Description |
|---|---|
| algo.tessellate([1], …) | Specify [1] to run the algorithm on all the direct and indirect child occurrences of this occurrence. |
| scene.getRoot() | Use this function to retrieve the root occurrence of your scene. |
| scene.findOccurrencesByProperty(property, regex) | Use this function to find occurrences that have a specific property. |
This table shows the properties of occurrences:
Property | Type | Description |
|---|---|---|
| Id | Ident | A unique unsigned int identifier. |
| Name | String | The name of this occurrence. |
| Visible | InheritableBool | The visibility status of this occurrence. |
| Material | Entity | The optional material of this occurrence. |
| Transform | Matrix4 | Local transform matrix of this occurrence, storing local position, rotation and scale information. |
| Prototype | Entity | Prototype occurrence. If exists this occurrence inherits from its prototype's properties. |