# SceneInterface

> Class

Inheritance

* [object](https://learn.microsoft.com/dotnet/api/system.object)
* [Interface](./api_interface)
* SceneInterface

***

Inherited Members

* [Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\))

* [Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\))

* [GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

* [GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)

* [MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

* [ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)

* [ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

***

Namespace: UnityEngine.Pixyz.Scene

```csharp
public class SceneInterface : Interface
```

## Methods

### GetLastError

```csharp
public static string GetLastError()
```

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### AddComponent

Add a component to an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddComponent(uint occurrence, ComponentType componentType)
```

Parameters

| Type                                                         | Name          | Description                              |
| ------------------------------------------------------------ | ------------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence    | The occurrence to add the new component. |
| [ComponentType](./scene_componenttype)                       | componentType | Type of the component.                   |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### AddComponents

Add a components to each occurrence in the array.

```csharp
[HandleProcessCorruptedStateExceptions]
public ComponentList AddComponents(OccurrenceList occurrences, ComponentType componentType)
```

Parameters

| Type                                     | Name          | Description                                      |
| ---------------------------------------- | ------------- | ------------------------------------------------ |
| [OccurrenceList](./scene_occurrencelist) | occurrences   | Occurrences that need the component to be added. |
| [ComponentType](./scene_componenttype)   | componentType | Type of the component.                           |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentList](./scene_componentlist) |             |

### AddInParentInstances

Add an instance of prototype's child as child in current occurrence recursively.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddInParentInstances(uint root)
```

Parameters

| Type                                                         | Name | Description             |
| ------------------------------------------------------------ | ---- | ----------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | The occurrence to test. |

### CleanUnusedImages

Remove unused images from texture library.

```csharp
[HandleProcessCorruptedStateExceptions]
public int CleanUnusedImages()
```

Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### CleanUnusedMaterials

Remove unused materials from material library.

```csharp
[HandleProcessCorruptedStateExceptions]
public int CleanUnusedMaterials(bool cleanImages = false)
```

Parameters

| Type                                                          | Name        | Description                     |
| ------------------------------------------------------------- | ----------- | ------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | cleanImages | Call cleanUnusedImages if true. |

Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### ComputeSubTreeChecksum

Compute the checksum of a sub-tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public string ComputeSubTreeChecksum(uint root = 0)
```

Parameters

| Type                                                         | Name | Description            |
| ------------------------------------------------------------ | ---- | ---------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Occurrence to compute. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### ConfigureFunctionLogger

```csharp
[HandleProcessCorruptedStateExceptions]
public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
```

Parameters

| Type                                                           | Name                | Description |
| -------------------------------------------------------------- | ------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | functionName        |             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | enableFunction      |             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | enableParameters    |             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | enableExecutionTime |             |

### ConvertMaterialsToColor

Convert all materials to materials with a color pattern, trying to keep the visual aspect as similar as possible.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ConvertMaterialsToColor(MaterialList materials = null)
```

Parameters

| Type                                    | Name      | Description                                        |
| --------------------------------------- | --------- | -------------------------------------------------- |
| [MaterialList](./material_materiallist) | materials | Materials to merge (merge all materials if empty). |

### ConvertMaterialsToPBR

Convert all materials to materials with a PBR pattern, trying to keep the visual aspect as similar as possible.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ConvertMaterialsToPBR(MaterialList materials = null)
```

Parameters

| Type                                    | Name      | Description                                        |
| --------------------------------------- | --------- | -------------------------------------------------- |
| [MaterialList](./material_materiallist) | materials | Materials to merge (merge all materials if empty). |

### CreateOBBMesh

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateOBBMesh(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateOccurrence

Create a new occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateOccurrence(string name, uint parent = 0)
```

Parameters

| Type                                                           | Name   | Description                                                                     |
| -------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name   | Name of the new occurrence.                                                     |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | parent | Create the occurrence as a child of parent, if not set the parent will be root. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateOccurrenceFromSelection

Create a new occurrence and add the given occurrences as children.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateOccurrenceFromSelection(string name, OccurrenceList children, uint parent, bool keepMaterialAssignment = true)
```

Parameters

| Type                                                           | Name                   | Description                                                                                                                                                                                                                                  |
| -------------------------------------------------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name                   | Name of the new occurrence.                                                                                                                                                                                                                  |
| [OccurrenceList](./scene_occurrencelist)                       | children               | Add given occurrence as children (if any).                                                                                                                                                                                                   |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | parent                 | If defined, the new occurrence will be created as a child of this parent. Else if children are defined, the first common parent of children will be used as a parent for this new occurrence. Last resort will be to use the root as parent. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | keepMaterialAssignment | If defined, material assignation will be updated to keep the visual same aspect.                                                                                                                                                             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateOccurrenceFromText

Creates an occurrence from string.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateOccurrenceFromText(string text, string font = "ChicFont", int fontSize = 64, ColorAlpha? color = null, double heigth3D = 40)
```

Parameters

| Type                                                           | Name     | Description            |
| -------------------------------------------------------------- | -------- | ---------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | text     | The occurrence's name. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | font     | The font to use.       |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | fontSize | The font size.         |
| [ColorAlpha](./core_coloralpha)                                | color    | The occurrence color.  |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | heigth3D | 3D height of text.     |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateOccurrences

Create one new occurrence under each given parent.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList CreateOccurrences(string name, OccurrenceList parents = null)
```

Parameters

| Type                                                           | Name    | Description                                                                                                     |
| -------------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name    | Name of the new occurrence.                                                                                     |
| [OccurrenceList](./scene_occurrencelist)                       | parents | Create the occurrences as a child of each parent. If empty, one occurrence will be created with root as parent. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### CreatePartsFromMeshes

Create a set of Parts given meshes and occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public PartList CreatePartsFromMeshes(OccurrenceList occurrences, MeshList meshes)
```

Parameters

| Type                                     | Name        | Description                                                                                                                                 |
| ---------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The occurrence which will contains the part component of the mesh at the same index.                                                        |
| [MeshList](./polygonal_meshlist)         | meshes      | List of mesh to create part, if the mesh is invalid (e.g 0) no part will be created and 0 will be returned in the parts list at this index. |

Returns

| Type                         | Description |
| ---------------------------- | ----------- |
| [PartList](./scene_partlist) |             |

### CreateSceneFromMeshes

Create a scene tree with a list of meshes, all meshes becomes part occurrences with the same root. The same mesh Id can be used several times to handle create instances (prototypes).

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateSceneFromMeshes(MeshList meshes, Matrix4List matrices, bool centerPartPivots = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                                                                                                                                               |
| ------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [MeshList](./polygonal_meshlist)                              | meshes           | List of input meshes.                                                                                                                                                                                                     |
| [Matrix4List](./geom_matrix4list)                             | matrices         | List of matrices of input meshes (if empty Identity will be used).                                                                                                                                                        |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | centerPartPivots | If True, the input meshes will be centered in their local coordinate system and the translation will be set as part matrix. If you want to rollback the meshes to their initial pivots use 'resetPartTransform' function. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### DeleteComponentByType

Delete component from type.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteComponentByType(ComponentType componentType, uint occurrence, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                         |
| ------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [ComponentType](./scene_componenttype)                        | componentType    | Type of the component.                                                                              |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence       | The occurrence to remove components from.                                                           |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

### DeleteComponentsByType

Delete all components on subtree from type.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteComponentsByType(ComponentType componentType, uint rootOccurrence = 0)
```

Parameters

| Type                                                         | Name           | Description                                    |
| ------------------------------------------------------------ | -------------- | ---------------------------------------------- |
| [ComponentType](./scene_componenttype)                       | componentType  | Type of the component.                         |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | rootOccurrence | The root occurrence to remove components from. |

### DeleteEmptyOccurrences

Delete all empty assemblies. An occurrence is considered empty if it doesn't contain any children and has no Part, Light, Animation, Joint, or Camera component attached.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteEmptyOccurrences(uint root = 0)
```

Parameters

| Type                                                         | Name | Description                      |
| ------------------------------------------------------------ | ---- | -------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root occurrence for the process. |

### DeleteOccurrences

Delete a liste of occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteOccurrences(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description            |
| ---------------------------------------- | ----------- | ---------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | Occurrences to delete. |

### GenerateOctaViews

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GenerateOctaViews(double radius, int XFrames, int YFrames, bool hemi = false)
```

Parameters

| Type                                                           | Name    | Description |
| -------------------------------------------------------------- | ------- | ----------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | radius  |             |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | XFrames |             |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | YFrames |             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | hemi    |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetAABB

Returns the axis aligned bounding box of a list of occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public AABB GetAABB(OccurrenceList occurrences, bool precise = false)
```

Parameters

| Type                                                          | Name        | Description                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences | List of occurrences to retrieve the AABB.                                                                                                                                                                                                                            |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | precise     | If true, will take more time but returns the minimal AABB and use the current animation pose. If false, fast but the AABB is approximated and multiple rotation matrices in the tree structure may extend it a lot, also the static pose of the meshes will be used. |

Returns

| Type                | Description |
| ------------------- | ----------- |
| [AABB](./geom_aabb) |             |

### GetActiveMaterial

Get the active material on occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetActiveMaterial(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetActiveMaterials

Get the active materials on multiple occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public MaterialList GetActiveMaterials(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                                     |
| ---------------------------------------- | ----------- | ----------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The occurrences to retrieve active material on. |

Returns

| Type                                    | Description |
| --------------------------------------- | ----------- |
| [MaterialList](./material_materiallist) |             |

### GetActivePropertyValue

Get the value of a property on the first parent that own it.

```csharp
[HandleProcessCorruptedStateExceptions]
public string GetActivePropertyValue(uint occurrence, string propertyName, bool cacheProperty = false)
```

Parameters

| Type                                                           | Name          | Description                                                                                                           |
| -------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence    | An occurrence.                                                                                                        |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | propertyName  | Property name.                                                                                                        |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | cacheProperty | If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### GetActivePropertyValues

Get the value of a property on the first parent that own it for each given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public StringList GetActivePropertyValues(OccurrenceList occurrences, string propertyName, bool cacheProperty = false)
```

Parameters

| Type                                                           | Name          | Description                                                                                                           |
| -------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                       | occurrences   | List of occurrences.                                                                                                  |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | propertyName  | Property name.                                                                                                        |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | cacheProperty | If true, the property will be copied on all ancestor of occurrence below the property owner to speed up future calls. |

Returns

| Type                            | Description |
| ------------------------------- | ----------- |
| [StringList](./core_stringlist) |             |

### GetAncestors

Returns the list of ancestors for one occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetAncestors(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description             |
| ------------------------------------------------------------ | ---------- | ----------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence to test. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetBrepShape

Returns the Brep shape of a part.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetBrepShape(uint part)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The Part.   |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetComponent

Returns a component on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                         |
| ------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence       | The occurrence.                                                                                     |
| [ComponentType](./scene_componenttype)                        | componentType    | Type of the component.                                                                              |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetComponentByOccurrence

Returns one component of the specified type by occurrence if it exists.

```csharp
[Obsolete]
[HandleProcessCorruptedStateExceptions]
public ComponentList GetComponentByOccurrence(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                         |
| ------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences      | The occurrences list.                                                                               |
| [ComponentType](./scene_componenttype)                        | componentType    | Type of the component.                                                                              |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentList](./scene_componentlist) |             |

### GetComponentOccurrence

Get the occurrence that own a component.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetComponentOccurrence(uint component)
```

Parameters

| Type                                                         | Name      | Description    |
| ------------------------------------------------------------ | --------- | -------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component | The component. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetComponentType

Get the type of a component.

```csharp
[HandleProcessCorruptedStateExceptions]
public ComponentType GetComponentType(uint component)
```

Parameters

| Type                                                         | Name      | Description    |
| ------------------------------------------------------------ | --------- | -------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component | The component. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentType](./scene_componenttype) |             |

### GetComponents

Returns one component of the specified type by occurrence if it exists.

```csharp
[HandleProcessCorruptedStateExceptions]
public ComponentList GetComponents(OccurrenceList occurrences, ComponentType componentType, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                         |
| ------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences      | The occurrences list.                                                                               |
| [ComponentType](./scene_componenttype)                        | componentType    | Type of the component.                                                                              |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentList](./scene_componentlist) |             |

### GetGlobalMatrices

Returns the global matrix for each given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4List GetGlobalMatrices(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                    |
| ---------------------------------------- | ----------- | ------------------------------ |
| [OccurrenceList](./scene_occurrencelist) | occurrences | Nodes to get the local matrix. |

Returns

| Type                              | Description |
| --------------------------------- | ----------- |
| [Matrix4List](./geom_matrix4list) |             |

### GetGlobalMatrix

Returns the global matrix on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4 GetGlobalMatrix(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                          |
| ------------------------------------------------------------ | ---------- | ------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to get the global matrix. |

Returns

| Type                      | Description |
| ------------------------- | ----------- |
| [Matrix4](./geom_matrix4) |             |

### GetGlobalVisibility

Returns the global visibility of a given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool GetGlobalVisibility(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                              |
| ------------------------------------------------------------ | ---------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to get the global visibility. |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### GetLocalMatrices

Returns the local matrix for each given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4List GetLocalMatrices(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                    |
| ---------------------------------------- | ----------- | ------------------------------ |
| [OccurrenceList](./scene_occurrencelist) | occurrences | Nodes to get the local matrix. |

Returns

| Type                              | Description |
| --------------------------------- | ----------- |
| [Matrix4List](./geom_matrix4list) |             |

### GetLocalMatrix

Returns the local matrix on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4 GetLocalMatrix(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                   |
| ------------------------------------------------------------ | ---------- | ----------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Node to get the local matrix. |

Returns

| Type                      | Description |
| ------------------------- | ----------- |
| [Matrix4](./geom_matrix4) |             |

### GetMBB

Returns the Minimum Bounding Box of a list of occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public OBB GetMBB(OccurrenceList occurrences, Point3? forcedAxis = null)
```

Parameters

| Type                                     | Name        | Description                              |
| ---------------------------------------- | ----------- | ---------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | List of occurrences to retrieve the MBB. |
| [Point3](./geom_point3)                  | forcedAxis  | Forced axis of the mbb.                  |

Returns

| Type              | Description |
| ----------------- | ----------- |
| [OBB](./geom_obb) |             |

### GetMaterialsFromSubtree

```csharp
[HandleProcessCorruptedStateExceptions]
public MaterialList GetMaterialsFromSubtree(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                                              |
| ------------------------------------------------------------ | ---------- | ------------------------------------------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Root occurrence of the subtree on which to get the materials and images. |

Returns

| Type                                    | Description |
| --------------------------------------- | ----------- |
| [MaterialList](./material_materiallist) |             |

### GetOBB

Returns the Oriented Bounding Box of a list of occurrences (works only on meshes, fast method, not the Minimum Volume Box).

```csharp
[HandleProcessCorruptedStateExceptions]
public OBB GetOBB(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                              |
| ---------------------------------------- | ----------- | ---------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | List of occurrences to retrieve the OBB. |

Returns

| Type              | Description |
| ----------------- | ----------- |
| [OBB](./geom_obb) |             |

### GetOccurrenceActiveMaterial

Returns the active material on a given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetOccurrenceActiveMaterial(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                            |
| ------------------------------------------------------------ | ---------- | -------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to get the active material. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetOccurrenceName

Returns the name of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public string GetOccurrenceName(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                     |
| ------------------------------------------------------------ | ---------- | ------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence to get the name. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### GetOccurrencesWithComponent

Recursively get all the occurrences containing a component of the specified type.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetOccurrencesWithComponent(ComponentType componentType, uint fromOcc = 0)
```

Parameters

| Type                                                         | Name          | Description                         |
| ------------------------------------------------------------ | ------------- | ----------------------------------- |
| [ComponentType](./scene_componenttype)                       | componentType | The component type.                 |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | fromOcc       | Source occurrence of the recursion. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetPartActiveShape

Returns the active shape of a part.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetPartActiveShape(uint part)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part.   |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetPartLocalMatrix

Returns the local matrix on a part.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4 GetPartLocalMatrix(uint part)
```

Parameters

| Type                                                         | Name | Description                   |
| ------------------------------------------------------------ | ---- | ----------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | Part to get the local matrix. |

Returns

| Type                      | Description |
| ------------------------- | ----------- |
| [Matrix4](./geom_matrix4) |             |

### GetPartOccurrences

Recursively get all the occurrences containing a part component.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetPartOccurrences(uint fromOcc = 0)
```

Parameters

| Type                                                         | Name    | Description                         |
| ------------------------------------------------------------ | ------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetPartShapeType

Get the part's shape type.

```csharp
[HandleProcessCorruptedStateExceptions]
public ShapeType GetPartShapeType(uint part)
```

Parameters

| Type                                                         | Name | Description       |
| ------------------------------------------------------------ | ---- | ----------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part to test. |

Returns

| Type                           | Description |
| ------------------------------ | ----------- |
| [ShapeType](./scene_shapetype) |             |

### GetPolygonCount

Returns the number of polygon in the parts meshes.

```csharp
[HandleProcessCorruptedStateExceptions]
public ulong GetPolygonCount(OccurrenceList occurrences, bool asTriangleCount = false, bool countOnceEachInstance = false, bool countHidden = false)
```

Parameters

| Type                                                          | Name                  | Description                                                 |
| ------------------------------------------------------------- | --------------------- | ----------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences           | The part occurrences.                                       |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | asTriangleCount       | If true count the equivalent of triangles for each polygon. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countOnceEachInstance | If true ignore multiple instance of each tessellation.      |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countHidden           | If true, also count hidden components.                      |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) |             |

### GetSubTreeStats

Returns some stats of a sub tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public GetSubTreeStatsReturn GetSubTreeStats(OccurrenceList roots)
```

Parameters

| Type                                     | Name  | Description                           |
| ---------------------------------------- | ----- | ------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | roots | The root occurrences to get stats on. |

Returns

| Type                                                   | Description |
| ------------------------------------------------------ | ----------- |
| [GetSubTreeStatsReturn](./scene_getsubtreestatsreturn) |             |

### GetVertexCount

Returns the number of vertices in the parts meshes.

```csharp
[HandleProcessCorruptedStateExceptions]
public ulong GetVertexCount(OccurrenceList occurrences, bool countOnceEachInstance = false, bool countHidden = false, bool countPoints = false, bool countMergedVertices = false)
```

Parameters

| Type                                                          | Name                  | Description                                             |
| ------------------------------------------------------------- | --------------------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences           | The part occurrences.                                   |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countOnceEachInstance | If true ignore multiple instance of each tessellation.  |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countHidden           | If true, also count hidden components.                  |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countPoints           | If true, also count points (for points cloud).          |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | countMergedVertices   | If true count all merged vertices in each tessellation. |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) |             |

### GetViewpointsFromCavities

Returns viewpoints from model cavities.

```csharp
[HandleProcessCorruptedStateExceptions]
public GetViewpointsFromCavitiesReturn GetViewpointsFromCavities(double voxelSize, double minCavityVolume)
```

Parameters

| Type                                                           | Name            | Description                                 |
| -------------------------------------------------------------- | --------------- | ------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | voxelSize       | Precision for cavities detection.           |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | minCavityVolume | Minimum volume for a cavity to be returned. |

Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [GetViewpointsFromCavitiesReturn](./scene_getviewpointsfromcavitiesreturn) |             |

### GetVolume

Return the volume of the occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public double GetVolume(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description       |
| ------------------------------------------------------------ | ---------- | ----------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Entry occurrence. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) |             |

### GetVolumes

Return the volume of a set of root occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public DoubleList GetVolumes(OccurrenceList iRoots)
```

Parameters

| Type                                     | Name   | Description    |
| ---------------------------------------- | ------ | -------------- |
| [OccurrenceList](./scene_occurrencelist) | iRoots | List of roots. |

Returns

| Type                            | Description |
| ------------------------------- | ----------- |
| [DoubleList](./core_doublelist) |             |

### HasComponent

Returns True if the given occurrence has the given component type.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool HasComponent(uint occurrence, ComponentType componentType, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                                                                         |
| ------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence       | The occurrence.                                                                                     |
| [ComponentType](./scene_componenttype)                        | componentType    | Type of the component.                                                                              |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true and if the component is not set on the occurrence, try to find it on its prototyping chain. |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Hide

Hide the given occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Hide(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                      |
| ---------------------------------------- | ----------- | -------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list of occurrences to hide. |

### InverseVisibility

Inverse the visibility of the given occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void InverseVisibility(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description              |
| ---------------------------------------- | ----------- | ------------------------ |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list of occurrences. |

### IsAncestorOf

Test if an occurrence is an ancestor of another one.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool IsAncestorOf(uint maybeAncestor, uint occurrence)
```

Parameters

| Type                                                         | Name          | Description                               |
| ------------------------------------------------------------ | ------------- | ----------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | maybeAncestor | The potential ancestor of the occurrence. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence    | The occurrence to test.                   |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### KeepAncestors

Filter a list of occurrences by removing all occurrences which have an ancestor inside the list.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList KeepAncestors(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                      |
| ---------------------------------------- | ----------- | -------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list that shall be filtered. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### ListComponent

List all components on a type on the whole tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public ComponentList ListComponent(ComponentType componentType)
```

Parameters

| Type                                   | Name          | Description         |
| -------------------------------------- | ------------- | ------------------- |
| [ComponentType](./scene_componenttype) | componentType | The component type. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentList](./scene_componentlist) |             |

### ListComponents

List all components on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public ComponentList ListComponents(uint occurrence, bool followPrototypes = true)
```

Parameters

| Type                                                          | Name             | Description                                          |
| ------------------------------------------------------------- | ---------------- | ---------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence       | The occurrence to list the components.               |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | followPrototypes | If true list also components owned by the prototype. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [ComponentList](./scene_componentlist) |             |

### MergeImages

Merge all equivalent images (i.e. with same pixels).

```csharp
[HandleProcessCorruptedStateExceptions]
public int MergeImages(ImageList images = null)
```

Parameters

| Type                              | Name   | Description                                  |
| --------------------------------- | ------ | -------------------------------------------- |
| [ImageList](./material_imagelist) | images | Images to merge (merge all images if empty). |

Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### MergeMaterials

Merge all equivalent materials (i.e. with same appearance).

```csharp
[HandleProcessCorruptedStateExceptions]
public int MergeMaterials(MaterialList materials = null, bool evaluateNames = false)
```

Parameters

| Type                                                          | Name          | Description                                                                                                                                                                          |
| ------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [MaterialList](./material_materiallist)                       | materials     | Materials to merge (merge all materials if empty).                                                                                                                                   |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | evaluateNames | If true, materials names will be taken into consideration (on top of other properties). It means that materials having same properties but different names won't be merged together. |

Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### RemoveMaterials

Recursively remove all materials.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveMaterials(OccurrenceList roots = null)
```

Parameters

| Type                                     | Name  | Description                                                                           |
| ---------------------------------------- | ----- | ------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | roots | If specified, remove materials only from the given occurrences and their descendants. |

### RenameLongOccurrenceName

Truncate names of occurrence with too long names.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RenameLongOccurrenceName(int maxLength)
```

Parameters

| Type                                                       | Name      | Description          |
| ---------------------------------------------------------- | --------- | -------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | maxLength | Maximum name length. |

### ReplaceMaterial

Replace a material by another everywhere it is used.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ReplaceMaterial(uint originalMaterial, uint newMaterial, OccurrenceList occurrences = null)
```

Parameters

| Type                                                         | Name             | Description                                           |
| ------------------------------------------------------------ | ---------------- | ----------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | originalMaterial | The material to replace everywhere.                   |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | newMaterial      | The new material to set in place of originalMaterial. |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences      | The occurrences on which replacing the materials.     |

### ResizeTextures

Resizes the textures from a selection of occurrences (resizes all textures used by these occurrences), or from a selection of textures.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ResizeTextures(ResizeTexturesInputMode inputMode, ResizeTexturesResizeMode resizeMode, bool replaceTextures)
```

Parameters

| Type                                                          | Name            | Description                                                                                                                                           |
| ------------------------------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ResizeTexturesInputMode](./scene_resizetexturesinputmode)    | inputMode       | Defines if the textures to resize are textures used by a selection of Occurrences, or a selection among the textures available in the scene.          |
| [ResizeTexturesResizeMode](./scene_resizetexturesresizemode)  | resizeMode      | Defines if the textures are resized following a ratio or following a maximum size/resolution (only textures above the defined maximum are downsized). |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | replaceTextures | If True, overwrites textures from the selection.                                                                                                      |

### SetComponentOccurrence

Move a component to an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetComponentOccurrence(uint component, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component  | The component.  |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

### SetDefaultVariant

Set the default variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetDefaultVariant()
```

### SetOccurrenceMaterial

Set the material on a occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetOccurrenceMaterial(uint occurrence, uint material)
```

Parameters

| Type                                                         | Name       | Description                     |
| ------------------------------------------------------------ | ---------- | ------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to set the material. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material   | The new occurrence material.    |

### SetOccurrenceName

Returns the name of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetOccurrenceName(uint occurrence, string name)
```

Parameters

| Type                                                           | Name       | Description                     |
| -------------------------------------------------------------- | ---------- | ------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence | The occurrence to get the name. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name       | The occurrence name.            |

### Show

Show the given occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Show(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                   |
| ---------------------------------------- | ----------- | ----------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list occurrences to show. |

### ShowOnly

Show only the given occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ShowOnly(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                   |
| ---------------------------------------- | ----------- | ----------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list occurrences to show. |

### TransferCADMaterialsOnPartOccurrences

Set all materials on part occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void TransferCADMaterialsOnPartOccurrences(uint rootOccurrence = 0)
```

Parameters

| Type                                                         | Name           | Description      |
| ------------------------------------------------------------ | -------------- | ---------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | rootOccurrence | Root occurrence. |

### TransferMaterialsOnPatches

Take the first instance material and set it one the mesh patches.

```csharp
[HandleProcessCorruptedStateExceptions]
public void TransferMaterialsOnPatches(uint rootOccurrence = 0)
```

Parameters

| Type                                                         | Name           | Description      |
| ------------------------------------------------------------ | -------------- | ---------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | rootOccurrence | Root occurrence. |

### AddComponentChangedCallback

```csharp
public uint AddComponentChangedCallback(SceneInterface.ComponentChangedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                                 | Name     | Description |
| ------------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.ComponentChangedDelegate](./sceneinterface_componentchangeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                       | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveComponentChangedCallback

```csharp
public void RemoveComponentChangedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddSceneChangedCallback

```csharp
public uint AddSceneChangedCallback(SceneInterface.SceneChangedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                         | Name     | Description |
| ---------------------------------------------------------------------------- | -------- | ----------- |
| [SceneInterface.SceneChangedDelegate](./sceneinterface_scenechangeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)               | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveSceneChangedCallback

```csharp
public void RemoveSceneChangedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### CreateHierarchicalClusters

Reorganize a sub tree with hierarchical clustering.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateHierarchicalClusters(uint root, int childrenCountByNode = 2, double minFitting = -1)
```

Parameters

| Type                                                           | Name                | Description                                                          |
| -------------------------------------------------------------- | ------------------- | -------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | root                | Root of the sub-tree to reorganize.                                  |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | childrenCountByNode | Order of the hierarchical tree.                                      |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | minFitting          | Minimal fitting coefficient to allow 2 nodes to be merged/clustered. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GenerateOctree

Generate a loose octree from the given sub-tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GenerateOctree(uint occurrence, int maxDepth = 5, double looseFactor = 2)
```

Parameters

| Type                                                           | Name        | Description                              |
| -------------------------------------------------------------- | ----------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence  | Root occurrence of the sub-tree.         |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | maxDepth    | Defines the depth maximum of the octree. |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | looseFactor | Defines the loose factor of the octree.  |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetClusters

Get groups of occurrences based on spatial proximity.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceListList GetClusters(OccurrenceList occurrences, MergeByRegionsStrategy strategy)
```

Parameters

| Type                                                     | Name        | Description              |
| -------------------------------------------------------- | ----------- | ------------------------ |
| [OccurrenceList](./scene_occurrencelist)                 | occurrences | Input occurrences.       |
| [MergeByRegionsStrategy](./scene_mergebyregionsstrategy) | strategy    | Number: number of groups |
|                                                          |             |                          |

Returns

| Type                                             | Description |
| ------------------------------------------------ | ----------- |
| [OccurrenceListList](./scene_occurrencelistlist) |             |

### GetPartOccurrencesGroupedBySimilarity

Get groups of occurrences based on various criteria (see parameters). Returns a list of groups ; each group is either a list of parts considered similar (depending on criteria) or is a singleton that has no similar parts.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceListList GetPartOccurrencesGroupedBySimilarity(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
```

Parameters

| Type                                                           | Name                     | Description                                                                                                                   |
| -------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | root                     | Root occurrence for the process.                                                                                              |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptVolumeRatio        | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.                     |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptPolycountRatio     | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.           |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptAABBAxisRatio      | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.                 |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptAABBCenterDistance | If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated. |

Returns

| Type                                             | Description |
| ------------------------------------------------ | ----------- |
| [OccurrenceListList](./scene_occurrencelistlist) |             |

### CreateCapsule

Create a new capsule.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateCapsule(double radius, double height, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
```

Parameters

| Type                                                           | Name                 | Description                                                     |
| -------------------------------------------------------------- | -------------------- | --------------------------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | radius               | Radius of the Capsule.                                          |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | height               | Height of the Capsule (excluding the two size of half spheres). |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLatitude  | Subdivision of the Capsule on the Latitude.                     |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLongitude | Subdivision of the Capsule (two half spheres) on the Longitude. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV           | Generation of the UV.                                           |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateCone

Create a new cone.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateCone(double bottomRadius, double height, int sides = 16, bool generateUV = true)
```

Parameters

| Type                                                           | Name         | Description                       |
| -------------------------------------------------------------- | ------------ | --------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | bottomRadius | Radius of the bottom of the cone. |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | height       | Height of the cone.               |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | sides        | Number of sides of the cone.      |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV   | Generation of the UV.             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateCube

Create a new cube.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateCube(double sizeX, double sizeY, double sizeZ, int subdivision = 1, bool generateUV = true)
```

Parameters

| Type                                                           | Name        | Description                              |
| -------------------------------------------------------------- | ----------- | ---------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sizeX       | Size of the Cube on the x axis.          |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sizeY       | Size of the Cube on the y axis.          |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sizeZ       | Size of the Cube on the z axis.          |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivision | Subdivision of the Cube on all the axis. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV  | Generation of the UV.                    |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateCylinder

Create a new cylinder.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateCylinder(double radius, double height, int sides = 16, bool generateUV = true)
```

Parameters

| Type                                                           | Name       | Description                      |
| -------------------------------------------------------------- | ---------- | -------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | radius     | Radius of the Cylinder.          |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | height     | Height of the Cylinder.          |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | sides      | Number of Sides of the Cylinder. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV | Generation of the UV.            |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateImmersion

Create a new bagel klein.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateImmersion(double radius, int subdivisionX, int subdivisionY)
```

Parameters

| Type                                                           | Name         | Description                                    |
| -------------------------------------------------------------- | ------------ | ---------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | radius       | Radius of the Immersion.                       |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionX | Subdivision of the Immersion on the Latitude.  |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionY | Subdivision of the Immersion on the Longitude. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreatePlane

Create a  new plane.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreatePlane(double sizeX, double sizeY, int subdivisionX = 1, int subdivisionY = 1, bool generateUV = true)
```

Parameters

| Type                                                           | Name         | Description                             |
| -------------------------------------------------------------- | ------------ | --------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sizeX        | Size of the Plane on the x axis.        |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sizeY        | Size of the Plane on the y axis.        |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionX | Subdivision of the Plane on the x axis. |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionY | Subdivision of the Plane on the y axis. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV   | Generation of the UV.                   |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateSphere

Create a new sphere.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateSphere(double radius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
```

Parameters

| Type                                                           | Name                 | Description                                 |
| -------------------------------------------------------------- | -------------------- | ------------------------------------------- |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | radius               | Radius of the Sphere.                       |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLatitude  | Subdivision of the Sphere on the Latitude.  |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLongitude | Subdivision of the Sphere on the Longitude. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV           | Generation of the UV.                       |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateTorus

Create a new torus.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateTorus(double majorRadius, double minorRadius, int subdivisionLatitude = 16, int subdivisionLongitude = 16, bool generateUV = true)
```

Parameters

| Type                                                           | Name                 | Description                                |
| -------------------------------------------------------------- | -------------------- | ------------------------------------------ |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | majorRadius          | Major Radius.                              |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | minorRadius          | Minor Radius.                              |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLatitude  | Subdivision of the Torus on the Latitude.  |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)     | subdivisionLongitude | Subdivision of the Torus on the Longitude. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | generateUV           | Generation of the UV.                      |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### FindDuplicatedPartOccurrences

Get parts that are duplicated. This does not include each first occurrence of a set of duplicates.

```csharp
[Obsolete("Can be replaced by scene.getPartOccurrencesGroupedBySimilarity() + removal of each first element of a set of duplicates containing at least two occurrences.")]
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindDuplicatedPartOccurrences(uint root = 0, double acceptVolumeRatio = 0.01, double acceptPolycountRatio = 0.1, double acceptAABBAxisRatio = 0.01, double acceptAABBCenterDistance = 0.1)
```

Parameters

| Type                                                           | Name                     | Description                                                                                                                   |
| -------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | root                     | Root occurrence.                                                                                                              |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptVolumeRatio        | If the ratio of volumes of two parts is lower than acceptVolumeRatio, they will be considered duplicated.                     |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptPolycountRatio     | If the ratio of polygon counts of two parts is lower than acceptPolycountRatio, they will be considered duplicated.           |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptAABBAxisRatio      | If the ratio of AABB axis of two parts is lower than acceptAABBAxisRatio, they will be considered duplicated.                 |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | acceptAABBCenterDistance | If the distance between AABB centers of two parts is lower than acceptAABBCenterDistance, they will be considered duplicated. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindOccurrencesByMaterial

Get occurrences for which the property "Material" is the given material.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindOccurrencesByMaterial(uint material)
```

Parameters

| Type                                                         | Name     | Description |
| ------------------------------------------------------------ | -------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material | A material. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindOccurrencesByMetadata

Returns all occurrences which a metadata property value matches the given regular expression (ECMAScript).

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindOccurrencesByMetadata(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
```

Parameters

| Type                                                           | Name            | Description                                                      |
| -------------------------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | property        | Property name.                                                   |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_occurrencelist)                       | roots           | If specified, restrict the search from the given roots.          |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindOccurrencesByMetadataValue

Returns all occurrences with a metadata value matching the given regular expression (ECMAScript).

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindOccurrencesByMetadataValue(string regex, OccurrenceList roots = null, bool caseInsensitive = false)
```

Parameters

| Type                                                           | Name            | Description                                                      |
| -------------------------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_occurrencelist)                       | roots           | If specified, restrict the search from the given roots.          |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindOccurrencesByProperty

Returns all occurrences which a property value matches the given regular expression (ECMAScript).

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindOccurrencesByProperty(string property, string regex, OccurrenceList roots = null, bool caseInsensitive = false)
```

Parameters

| Type                                                           | Name            | Description                                                      |
| -------------------------------------------------------------- | --------------- | ---------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | property        | Property name.                                                   |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | regex           | Regular expression (ECMAScript).                                 |
| [OccurrenceList](./scene_occurrencelist)                       | roots           | If specified, restrict the search from the given roots.          |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | caseInsensitive | If True, the regex will be insensitive to upper and lower cases. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesByActiveMaterial

Find all part occurrence with a given material as active material (i.e. as seen in the rendering).

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesByActiveMaterial(uint material, OccurrenceList roots = null)
```

Parameters

| Type                                                         | Name     | Description                                             |
| ------------------------------------------------------------ | -------- | ------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material | A material.                                             |
| [OccurrenceList](./scene_occurrencelist)                     | roots    | If specified, restrict the search from the given roots. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesByMaximumSize

Get part occurrences by size.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesByMaximumSize(OccurrenceList roots, double maxDiagLength, double maxSize = -1, bool getHidden = false)
```

Parameters

| Type                                                           | Name          | Description                                                                                               |
| -------------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                       | roots         | Roots occurrences for the process.                                                                        |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | maxDiagLength | If the diagonal axis of the bounding box is less than maxDiagLength, part will be filtered. -1 to ignore. |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | maxSize       | If the longer axis of the box is less than maxLength, part will be filtered. -1 to ignore.                |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean)  | getHidden     | If true, hidden part occurrences meeting the criteria will be filtered as well.                           |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesByMinimumNumberOfInstances

Get part occurrences with more than "minInstanciationCount" occurrence on the scene.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesByMinimumNumberOfInstances(int minInstanciationCount)
```

Parameters

| Type                                                       | Name                  | Description           |
| ---------------------------------------------------------- | --------------------- | --------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | minInstanciationCount | Min occurrence count. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesByVisibleMaterial

Get part occurrences for which the given material is visible in the viewer.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesByVisibleMaterial(uint material)
```

Parameters

| Type                                                         | Name     | Description |
| ------------------------------------------------------------ | -------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material | A material. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesInAABB

Find part occurrences in the scene in a given axis aligned bounding box.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesInAABB(AABB aabb)
```

Parameters

| Type                | Name | Description                    |
| ------------------- | ---- | ------------------------------ |
| [AABB](./geom_aabb) | aabb | The axis aligned bounding box. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### FindPartOccurrencesInBox

Get part occurrences contained in a given box.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesInBox(ExtendedBox box, bool strictlyIncludes)
```

Parameters

| Type                                                          | Name             | Description                                                    |
| ------------------------------------------------------------- | ---------------- | -------------------------------------------------------------- |
| [ExtendedBox](./geom_extendedbox)                             | box              | The extension box.                                             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | strictlyIncludes | If false, parts only need to intersect the box to be selected. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### CreateSubTree

Create a complete scene tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList CreateSubTree(PackedTree tree, uint root = 0, bool replaceRoot = true)
```

Parameters

| Type                                                          | Name        | Description                                                                                                    |
| ------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------- |
| [PackedTree](./scene_packedtree)                              | tree        |                                                                                                                |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | root        | Specify the root occurrence of the scene.                                                                      |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | replaceRoot | If true, the root occurrence will be replaced by the root of the given tree, else it will be added as a child. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetChildren

Get the children of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetChildren(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetChildrenCount

Get the children count of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public int GetChildrenCount(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |

### GetCurrentVariantRoot

Get the current active root. Returns active variant's root if one or global root.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetCurrentVariantRoot()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetFirstChild

Get the children of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetFirstChild(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetNextSibling

Get the next occurrence in parent children.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetNextSibling(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetOccurrenceAncestors

Get all ancestors from occurrence until root (occurrence is not included).

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetOccurrenceAncestors(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                       |
| ------------------------------------------------------------ | ---------- | --------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence to find ancestors. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetOccurrencesAncestors

Batch version of getOccurrenceAncestors.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceListList GetOccurrencesAncestors(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                                |
| ---------------------------------------- | ----------- | ------------------------------------------ |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The list of occurrences to find ancestors. |

Returns

| Type                                             | Description |
| ------------------------------------------------ | ----------- |
| [OccurrenceListList](./scene_occurrencelistlist) |             |

### GetParent

Get the parent of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetParent(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetPreviousSibling

Get the previous occurrence in parent children.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetPreviousSibling(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetRoot

Get the root occurrence of the product structure.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetRoot()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetSubTree

Returns a packed version of the whole scene tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public PackedTree GetSubTree(uint root = 0, VisibilityMode visibilityMode = VisibilityMode.Hide, int depth = -1)
```

Parameters

| Type                                                         | Name           | Description                             |
| ------------------------------------------------------------ | -------------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root           | Specify the root of the returned scene. |
| [VisibilityMode](./scene_visibilitymode)                     | visibilityMode | The visibility mode.                    |
| [int](https://learn.microsoft.com/dotnet/api/system.int32)   | depth          | Maximum depth.                          |

Returns

| Type                             | Description |
| -------------------------------- | ----------- |
| [PackedTree](./scene_packedtree) |             |

### MoveOccurrences

Move an occurrence, adjusting the transformation to keep objects at the same place in the world space.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MoveOccurrences(OccurrenceList occurrences, uint destination, uint insertBefore = 0)
```

Parameters

| Type                                                         | Name         | Description                                                              |
| ------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------ |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences  | The occurrences to move.                                                 |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | destination  | Destination occurrence (the new parent).                                 |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | insertBefore | Occurrence before witch to move, if null append to destination children. |

### SetParent

Set the parent of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetParent(uint occurrence, uint parent, bool addInParentInstances = false, uint insertBefore = 0, bool worldPositionStays = false)
```

Parameters

| Type                                                          | Name                 | Description                                                                                                                                                    |
| ------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence           | The occurrence.                                                                                                                                                |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | parent               | The parent occurrence.                                                                                                                                         |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | addInParentInstances | If True, each occurrence whose prototype is the target parent will generate a child whose prototype is the occurrence itself.                                  |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | insertBefore         | Add before this child occurrence in the children list of the parent occurrence.                                                                                |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | worldPositionStays   | If true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before. |

### AddLightComponent

Add a light component to an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddLightComponent(uint occurrence, LightType lightType, Color color, double power = 1, double cutOff = 20)
```

Parameters

| Type                                                           | Name       | Description                              |
| -------------------------------------------------------------- | ---------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence | The occurrence to add the new component. |
| [LightType](./scene_lighttype)                                 | lightType  | The type of the light.                   |
| [Color](./core_color)                                          | color      | Color of the light.                      |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | power      | The power of the light.                  |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | cutOff     | The cutoff angle of the light.           |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateLight

Create an occurrence with a light component.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateLight(string name, LightType lightType, Color color, double power = 1, double cutOff = 20, uint parent = 0)
```

Parameters

| Type                                                           | Name      | Description                         |
| -------------------------------------------------------------- | --------- | ----------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name      | Name of the light.                  |
| [LightType](./scene_lighttype)                                 | lightType | The type of the light.              |
| [Color](./core_color)                                          | color     | Color of the light.                 |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | power     | The power of the light.             |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | cutOff    | The cutoff angle of the light.      |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | parent    | The parent of the light occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### AddMetadata

Add a new metadata property to a metadata component.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddMetadata(uint metadata, string name, string value)
```

Parameters

| Type                                                           | Name     | Description             |
| -------------------------------------------------------------- | -------- | ----------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | metadata | The metadata component. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name     | The new property name.  |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | value    | The new property value. |

### AddMetadataBlock

Add a new metadata property to a metadata component.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddMetadataBlock(uint metadata, StringList names, StringList values)
```

Parameters

| Type                                                         | Name     | Description                |
| ------------------------------------------------------------ | -------- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | metadata | The metadata component.    |
| [StringList](./core_stringlist)                              | names    | The new properties names.  |
| [StringList](./core_stringlist)                              | values   | The new properties values. |

### CreateMetadatasFromDefinitions

Create Metadata components from definitions.

```csharp
[HandleProcessCorruptedStateExceptions]
public MetadataList CreateMetadatasFromDefinitions(OccurrenceList occurrences, MetadataDefinitionList definitions)
```

Parameters

| Type                                                     | Name        | Description                                         |
| -------------------------------------------------------- | ----------- | --------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                 | occurrences | List of occurrences to add the metadata components. |
| [MetadataDefinitionList](./scene_metadatadefinitionlist) | definitions | List of metadata definition.                        |

Returns

| Type                                 | Description |
| ------------------------------------ | ----------- |
| [MetadataList](./scene_metadatalist) |             |

### GetMetadata

Get a metadata property value from a metadata component.

```csharp
[HandleProcessCorruptedStateExceptions]
public string GetMetadata(uint metadata, string name)
```

Parameters

| Type                                                           | Name     | Description                 |
| -------------------------------------------------------------- | -------- | --------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | metadata | The metadata component.     |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name     | The metadata property name. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### GetMetadatasDefinitions

Returns definition of Metadata components.

```csharp
[HandleProcessCorruptedStateExceptions]
public MetadataDefinitionList GetMetadatasDefinitions(MetadataList metadatas)
```

Parameters

| Type                                 | Name      | Description                                        |
| ------------------------------------ | --------- | -------------------------------------------------- |
| [MetadataList](./scene_metadatalist) | metadatas | List of metadata component to retrieve definition. |

Returns

| Type                                                     | Description |
| -------------------------------------------------------- | ----------- |
| [MetadataDefinitionList](./scene_metadatadefinitionlist) |             |

### RemoveMetadata

Remove a property from a metadata.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveMetadata(uint metadata, string name)
```

Parameters

| Type                                                           | Name     | Description               |
| -------------------------------------------------------------- | -------- | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | metadata | The occurrence.           |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name     | The name of the property. |

### GetMaterialsFromSubPart

Returns a list of all the materials in the set subPartMaterialComponent.

```csharp
[HandleProcessCorruptedStateExceptions]
public MaterialList GetMaterialsFromSubPart(uint component)
```

Parameters

| Type                                                         | Name      | Description                                          |
| ------------------------------------------------------------ | --------- | ---------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component | The subPartMaterial Component we want the materials. |

Returns

| Type                                    | Description |
| --------------------------------------- | ----------- |
| [MaterialList](./material_materiallist) |             |

### GetSubpartMaterial

Get a subpart material assignment according to overrides on the scene tree with SubpartMaterial components.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetSubpartMaterial(uint occurrence, uint subpartIndex)
```

Parameters

| Type                                                         | Name         | Description        |
| ------------------------------------------------------------ | ------------ | ------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence   | The Occurrence.    |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | subpartIndex | The subpart index. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### ListActiveShapeMaterials

List all the materials used in the part shape.

```csharp
[HandleProcessCorruptedStateExceptions]
public MaterialList ListActiveShapeMaterials(uint part)
```

Parameters

| Type                                                         | Name | Description                            |
| ------------------------------------------------------------ | ---- | -------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part which contains sub materials. |

Returns

| Type                                    | Description |
| --------------------------------------- | ----------- |
| [MaterialList](./material_materiallist) |             |

### ListSubpartMaterials

List all the materials used in the part shape or overrided with a SubpartMaterial component.

```csharp
[HandleProcessCorruptedStateExceptions]
public MaterialList ListSubpartMaterials(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                  |
| ------------------------------------------------------------ | ---------- | -------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence which contains sub materials. |

Returns

| Type                                    | Description |
| --------------------------------------- | ----------- |
| [MaterialList](./material_materiallist) |             |

### ListSubpartVariantMaterials

List all the materials variants in subpart.

```csharp
[HandleProcessCorruptedStateExceptions]
public VariantMaterialList ListSubpartVariantMaterials(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                             |
| ------------------------------------------------------------ | ---------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence which contains variants. |

Returns

| Type                                               | Description |
| -------------------------------------------------- | ----------- |
| [VariantMaterialList](./scene_variantmateriallist) |             |

### SetSubpartMaterial

Set a subpart material assignment using a SubpartMaterial component.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetSubpartMaterial(uint occurrence, uint subpartIndex, uint material)
```

Parameters

| Type                                                         | Name         | Description        |
| ------------------------------------------------------------ | ------------ | ------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence   | The Occurrence.    |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | subpartIndex | The subpart index. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material     | The material.      |

### SetSubpartMaterials

Set multiple subpart materials at once using a SubpartMaterial component.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetSubpartMaterials(uint occurrence, MaterialList materials, uint startIndex = 0)
```

Parameters

| Type                                                         | Name       | Description                                     |
| ------------------------------------------------------------ | ---------- | ----------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The Occurrence on which to apply the materials. |
| [MaterialList](./material_materiallist)                      | materials  | Materials to set.                               |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | startIndex | The subpart start index.                        |

### SetSubpartVariantMaterials

Set materials in variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetSubpartVariantMaterials(uint occurrence, VariantMaterialList variantMaterials)
```

Parameters

| Type                                                         | Name             | Description                             |
| ------------------------------------------------------------ | ---------------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence       | The occurrence which contains variants. |
| [VariantMaterialList](./scene_variantmateriallist)           | variantMaterials | List of variant and materials.          |

### SetSubpartVariantMaterialsList

Set all the materials list in variants.

```csharp
[HandleProcessCorruptedStateExceptions]
public VariantMaterialList SetSubpartVariantMaterialsList(VariantList variants, MaterialListList materialListList)
```

Parameters

| Type                                            | Name             | Description                                                |
| ----------------------------------------------- | ---------------- | ---------------------------------------------------------- |
| [VariantList](./scene_variantlist)              | variants         | The part which contains variants.                          |
| [MaterialListList](./material_materiallistlist) | materialListList | The part which contains the list of material variant list. |

Returns

| Type                                               | Description |
| -------------------------------------------------- | ----------- |
| [VariantMaterialList](./scene_variantmateriallist) |             |

### TransferSubpartMaterialsOnPatches

Assign SubpartMaterialComponent materials on the occurrence's part shapes. This might affect other Part in the scene if not singularized before.

```csharp
[HandleProcessCorruptedStateExceptions]
public void TransferSubpartMaterialsOnPatches(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                      |
| ------------------------------------------------------------ | ---------- | ------------------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence which has sub materials assigned. |

### CreateAlternativeTree

Create a new alternative tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateAlternativeTree(string name, uint root = 0)
```

Parameters

| Type                                                           | Name | Description                           |
| -------------------------------------------------------------- | ---- | ------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name | The name of the new alternative tree. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | root | The root occurrence.                  |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetAlternativeTreeRoot

Returns the root occurrence associated with the given AlternativeTree.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetAlternativeTreeRoot(uint tree)
```

Parameters

| Type                                                         | Name | Description                |
| ------------------------------------------------------------ | ---- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | tree | Targeted alternative tree. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### ListAlternativeTrees

Returns all the available alternative trees.

```csharp
[HandleProcessCorruptedStateExceptions]
public AlternativeTreeList ListAlternativeTrees()
```

Returns

| Type                                               | Description |
| -------------------------------------------------- | ----------- |
| [AlternativeTreeList](./scene_alternativetreelist) |             |

### AddAnimation

Add an animation in Animation library.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddAnimation(uint animation)
```

Parameters

| Type                                                         | Name      | Description       |
| ------------------------------------------------------------ | --------- | ----------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | Animation to add. |

### AddKeyframe

Adds a keyframe in the curve.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddKeyframe(uint channel, ulong time, double value)
```

Parameters

| Type                                                           | Name    | Description                                 |
| -------------------------------------------------------------- | ------- | ------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | channel | The channel one wants to add a keyframe in. |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64)  | time    | The time.                                   |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | value   | The value.                                  |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### AddKeyframeFromCurrentPosition

Adds keyframes in a given AnimChannel based on current position.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddKeyframeFromCurrentPosition(uint channel, ulong time)
```

Parameters

| Type                                                          | Name    | Description                                 |
| ------------------------------------------------------------- | ------- | ------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | channel | The channel one wants to add a keyframe in. |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | time    | The time.                                   |

### AnimatesThisOccurrence

Does this Animation animates this Occurrence - or one of its parents (thus animating it indirectly) ?.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool AnimatesThisOccurrence(uint animation, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                         |
| ------------------------------------------------------------ | ---------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation  | The Animation.                      |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The supposedly animated occurrence. |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### BakeAnimation

> **Important:**
>
> This function is tagged as experimental.

```csharp
[HandleProcessCorruptedStateExceptions]
public void BakeAnimation(uint animation, uint occurrence, uint end, ulong interval)
```

Parameters

| Type                                                          | Name       | Description            |
| ------------------------------------------------------------- | ---------- | ---------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | animation  | The Animation.         |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence | The occurrence.        |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | end        | The parent occurrence. |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | interval   | The interval.          |

### CreateAnimation

Creates an animation, need to use addAnimation when animation is filled.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateAnimation(string name)
```

Parameters

| Type                                                           | Name | Description            |
| -------------------------------------------------------------- | ---- | ---------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name | Name of the animation. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateSkeletonMesh

Create a skeleton mesh from a joint component tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateSkeletonMesh(uint root)
```

Parameters

| Type                                                         | Name | Description                |
| ------------------------------------------------------------ | ---- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root joint component node. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### DecimateAnimChannelBySegment

Decimates by segment a given AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DecimateAnimChannelBySegment(uint channel, double precision)
```

Parameters

| Type                                                           | Name      | Description    |
| -------------------------------------------------------------- | --------- | -------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | channel   | The channel.   |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | precision | The precision. |

### DeleteAnimation

Deletes an animation.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteAnimation(uint animation)
```

Parameters

| Type                                                         | Name      | Description            |
| ------------------------------------------------------------ | --------- | ---------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | The created animation. |

### DeleteEmptyAnimation

Delete all animation that contain 0 keyframes.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteEmptyAnimation()
```

### DisplayAllKeyframesFromAnimChannel

Displays info on the selected AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DisplayAllKeyframesFromAnimChannel(uint channel)
```

Parameters

| Type                                                         | Name    | Description  |
| ------------------------------------------------------------ | ------- | ------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel. |

### DisplayAllKeyframesFromAnimation

Displays info on the selected animation.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DisplayAllKeyframesFromAnimation(uint animation)
```

Parameters

| Type                                                         | Name      | Description    |
| ------------------------------------------------------------ | --------- | -------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | The animation. |

### DisplayValueFromAnimChannelAtTime

Displays the value.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DisplayValueFromAnimChannelAtTime(uint channel, ulong time, bool defaultValue = false)
```

Parameters

| Type                                                          | Name         | Description             |
| ------------------------------------------------------------- | ------------ | ----------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | channel      | The channel.            |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | time         | The time.               |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | defaultValue | Show default instead ?. |

### GetAnimChannelIfExists

Returns the main AnimChannel of an Occurrence according to a given Animation.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetAnimChannelIfExists(uint animation, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation  | The Animation.  |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The Occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetAnimChannelInfo

> **Important:**
>
> This function is tagged as experimental.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimChannelInfo GetAnimChannelInfo(uint channel)
```

Parameters

| Type                                                         | Name    | Description               |
| ------------------------------------------------------------ | ------- | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | Animation to get info of. |

Returns

| Type                                       | Description |
| ------------------------------------------ | ----------- |
| [AnimChannelInfo](./scene_animchannelinfo) |             |

### GetAnimChannelOccurrence

Returns the Occurrence related to a given AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetAnimChannelOccurrence(uint channel)
```

Parameters

| Type                                                         | Name    | Description  |
| ------------------------------------------------------------ | ------- | ------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetAnimationComponentPropertyBinderLists

> **Important:**
>
> This function is tagged as experimental.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimPropertyBinderList GetAnimationComponentPropertyBinderLists(uint animationComponent)
```

Parameters

| Type                                                         | Name               | Description               |
| ------------------------------------------------------------ | ------------------ | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animationComponent | Animation to get info of. |

Returns

| Type                                                     | Description |
| -------------------------------------------------------- | ----------- |
| [AnimPropertyBinderList](./scene_animpropertybinderlist) |             |

### GetAnimationInfo

> **Important:**
>
> This function is tagged as experimental.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimationInfo GetAnimationInfo(uint animation)
```

Parameters

| Type                                                         | Name      | Description               |
| ------------------------------------------------------------ | --------- | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | Animation to get info of. |

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [AnimationInfo](./scene_animationinfo) |             |

### GetAnimationPropertyBinderLists

> **Important:**
>
> This function is tagged as experimental.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimPropertyBinderList GetAnimationPropertyBinderLists(uint animation)
```

Parameters

| Type                                                         | Name      | Description               |
| ------------------------------------------------------------ | --------- | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | Animation to get info of. |

Returns

| Type                                                     | Description |
| -------------------------------------------------------- | ----------- |
| [AnimPropertyBinderList](./scene_animpropertybinderlist) |             |

### GetJointDefinition

Get joint definition from id.

```csharp
[HandleProcessCorruptedStateExceptions]
public JointDefinition GetJointDefinition(uint joint)
```

Parameters

| Type                                                         | Name  | Description      |
| ------------------------------------------------------------ | ----- | ---------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | joint | Id of the joint. |

Returns

| Type                                       | Description |
| ------------------------------------------ | ----------- |
| [JointDefinition](./scene_jointdefinition) |             |

### GetJointDefinitions

Get joint definition from id.

```csharp
[HandleProcessCorruptedStateExceptions]
public JointDefinitionList GetJointDefinitions(JointList joints)
```

Parameters

| Type                               | Name   | Description    |
| ---------------------------------- | ------ | -------------- |
| [JointList](./polygonal_jointlist) | joints | Ids of joints. |

Returns

| Type                                               | Description |
| -------------------------------------------------- | ----------- |
| [JointDefinitionList](./scene_jointdefinitionlist) |             |

### GetKeyframeParentAnimChannel

Returns the parent AnimChannel of a given Keyframe.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetKeyframeParentAnimChannel(uint keyframe)
```

Parameters

| Type                                                         | Name     | Description                           |
| ------------------------------------------------------------ | -------- | ------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | keyframe | The keyframe one wants the parent of. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetKeyframes

Returns a list of all keyframes of a simple animChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public KeyframeList GetKeyframes(uint channel)
```

Parameters

| Type                                                         | Name    | Description                                         |
| ------------------------------------------------------------ | ------- | --------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel one wants to extract the keyframs from. |

Returns

| Type                                 | Description |
| ------------------------------------ | ----------- |
| [KeyframeList](./scene_keyframelist) |             |

### GetMainChannel

Returns the main AnimChannel of a given AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetMainChannel(uint channel)
```

Parameters

| Type                                                         | Name    | Description                        |
| ------------------------------------------------------------ | ------- | ---------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel one wants the main of. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetOccurrenceJoint

Returns the Joint assigned to an occurrence if any.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetOccurrenceJoint(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetParentChannel

Returns (if exists) the parent AnimChannel of a given AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetParentChannel(uint channel)
```

Parameters

| Type                                                         | Name    | Description                          |
| ------------------------------------------------------------ | ------- | ------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel one wants the parent of. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetSubChannel

Returns the subchannel of a given name from an AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetSubChannel(uint channel, string name)
```

Parameters

| Type                                                           | Name    | Description                              |
| -------------------------------------------------------------- | ------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | channel | The channel one wants the subchannel of. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name    | The name of the subchannel.              |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetSubChannels

Returns all the sub channel of an AnimChannel.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimChannelList GetSubChannels(uint channel)
```

Parameters

| Type                                                         | Name    | Description                              |
| ------------------------------------------------------------ | ------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel one wants the subchannel of. |

Returns

| Type                                       | Description |
| ------------------------------------------ | ----------- |
| [AnimChannelList](./scene_animchannellist) |             |

### LinkPropertyToAnimation

Creates a Binder in an Animation stack to animate an entity's property.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint LinkPropertyToAnimation(uint animation, uint entity, string propertyName)
```

Parameters

| Type                                                           | Name         | Description                                           |
| -------------------------------------------------------------- | ------------ | ----------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | animation    | The Animation stack where to put a animated property. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | entity       | The entity object to animate.                         |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | propertyName | The name of the property to animate.                  |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### ListAnimations

List all Animations from the scene.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimationList ListAnimations()
```

Returns

| Type                                   | Description |
| -------------------------------------- | ----------- |
| [AnimationList](./scene_animationlist) |             |

### ListMainChannels

List all main AnimChannel from a given Animation.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnimChannelList ListMainChannels(uint animation)
```

Parameters

| Type                                                         | Name      | Description                                        |
| ------------------------------------------------------------ | --------- | -------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | animation | The Animation one wants to list the channels from. |

Returns

| Type                                       | Description |
| ------------------------------------------ | ----------- |
| [AnimChannelList](./scene_animchannellist) |             |

### MakeDefaultKeyframe

Creates keyframes with the default values of the channel at time 0.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MakeDefaultKeyframe(uint channel)
```

Parameters

| Type                                                         | Name    | Description  |
| ------------------------------------------------------------ | ------- | ------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | channel | The channel. |

### MoveAnimation

Moving animation.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MoveAnimation(uint animation, uint target, uint newParent, ulong interval)
```

Parameters

| Type                                                          | Name      | Description                |
| ------------------------------------------------------------- | --------- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | animation | The Animation.             |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | target    | The target occurrence.     |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | newParent | The new parent occurrence. |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | interval  | The interval.              |

### RemoveKeyframe

Removes a keyframe in the curve.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveKeyframe(uint channel, ulong time)
```

Parameters

| Type                                                          | Name    | Description                                      |
| ------------------------------------------------------------- | ------- | ------------------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | channel | The channel one wants to remove a keyframe from. |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) | time    | The time.                                        |

### UnlinkPropertyToAnimation

Unlinks a binder.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnlinkPropertyToAnimation(uint animation, uint entity, string propertyName)
```

Parameters

| Type                                                           | Name         | Description                                           |
| -------------------------------------------------------------- | ------------ | ----------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | animation    | The Animation stack where to put a animated property. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | entity       | The entity object to animate.                         |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | propertyName | The name of the property to animate.                  |

### AddAnimationAddedCallback

```csharp
public uint AddAnimationAddedCallback(SceneInterface.AnimationAddedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                             | Name     | Description |
| -------------------------------------------------------------------------------- | -------- | ----------- |
| [SceneInterface.AnimationAddedDelegate](./sceneinterface_animationaddeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                   | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveAnimationAddedCallback

```csharp
public void RemoveAnimationAddedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddAnimationChangedCallback

```csharp
public uint AddAnimationChangedCallback(SceneInterface.AnimationChangedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                                 | Name     | Description |
| ------------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.AnimationChangedDelegate](./sceneinterface_animationchangeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                       | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveAnimationChangedCallback

```csharp
public void RemoveAnimationChangedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddAnimationClearedCallback

```csharp
public uint AddAnimationClearedCallback(SceneInterface.AnimationClearedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                                 | Name     | Description |
| ------------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.AnimationClearedDelegate](./sceneinterface_animationcleareddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                       | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveAnimationClearedCallback

```csharp
public void RemoveAnimationClearedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddAnimationRemovedCallback

```csharp
public uint AddAnimationRemovedCallback(SceneInterface.AnimationRemovedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                                 | Name     | Description |
| ------------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.AnimationRemovedDelegate](./sceneinterface_animationremoveddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                       | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveAnimationRemovedCallback

```csharp
public void RemoveAnimationRemovedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### GetBRepInfos

Get BRep info.

```csharp
[HandleProcessCorruptedStateExceptions]
public GetBRepInfosReturn GetBRepInfos()
```

Returns

| Type                                             | Description |
| ------------------------------------------------ | ----------- |
| [GetBRepInfosReturn](./scene_getbrepinfosreturn) |             |

### GetTessellationInfos

Get tessellation info.

```csharp
[HandleProcessCorruptedStateExceptions]
public GetTessellationInfosReturn GetTessellationInfos(uint root = 0)
```

Parameters

| Type                                                         | Name | Description           |
| ------------------------------------------------------------ | ---- | --------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Occurrence tree root. |

Returns

| Type                                                             | Description |
| ---------------------------------------------------------------- | ----------- |
| [GetTessellationInfosReturn](./scene_gettessellationinfosreturn) |             |

### GetTessellationParameters

Get tessellation parameters.

```csharp
[HandleProcessCorruptedStateExceptions]
public GetTessellationParametersReturn GetTessellationParameters(uint part)
```

Parameters

| Type                                                         | Name | Description           |
| ------------------------------------------------------------ | ---- | --------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The tessellated part. |

Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [GetTessellationParametersReturn](./scene_gettessellationparametersreturn) |             |

### Print

Print an occurrence tree on log.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Print(uint root = 0)
```

Parameters

| Type                                                         | Name | Description           |
| ------------------------------------------------------------ | ---- | --------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Occurrence tree root. |

### AddFilterToLibrary

Add a filter to the filters library.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddFilterToLibrary(string name, string expr)
```

Parameters

| Type                                                           | Name | Description            |
| -------------------------------------------------------------- | ---- | ---------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name | Name of the filter.    |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | expr | The filter expression. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### EvaluateExpression

Evaluate the given filter expression.

```csharp
[HandleProcessCorruptedStateExceptions]
public string EvaluateExpression(string filter)
```

Parameters

| Type                                                           | Name   | Description            |
| -------------------------------------------------------------- | ------ | ---------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | filter | The filter expression. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### EvaluateExpressionOnOccurrences

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.

```csharp
[HandleProcessCorruptedStateExceptions]
public StringList EvaluateExpressionOnOccurrences(OccurrenceList occurrences, string filter)
```

Parameters

| Type                                                           | Name        | Description                                      |
| -------------------------------------------------------------- | ----------- | ------------------------------------------------ |
| [OccurrenceList](./scene_occurrencelist)                       | occurrences | Occurrences on which to evaluate the expression. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | filter      | The filter expression.                           |

Returns

| Type                            | Description |
| ------------------------------- | ----------- |
| [StringList](./core_stringlist) |             |

### EvaluateExpressionOnSubTree

Evaluate the given filter expression on all occurrences under the given occurrence and returns the result.

```csharp
[HandleProcessCorruptedStateExceptions]
public EvaluateExpressionOnSubTreeReturn EvaluateExpressionOnSubTree(string filter, uint fromOcc = 0)
```

Parameters

| Type                                                           | Name    | Description                         |
| -------------------------------------------------------------- | ------- | ----------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | filter  | The filter expression.              |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                                                           | Description |
| ------------------------------------------------------------------------------ | ----------- |
| [EvaluateExpressionOnSubTreeReturn](./scene_evaluateexpressiononsubtreereturn) |             |

### ExportFilterLibrary

Export filters from a given file.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ExportFilterLibrary(string file)
```

Parameters

| Type                                                           | Name | Description          |
| -------------------------------------------------------------- | ---- | -------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | file | File path to export. |

### FindFilterByName

Returns the first filter in the filter library with the given name.

```csharp
[HandleProcessCorruptedStateExceptions]
public Filter FindFilterByName(string name)
```

Parameters

| Type                                                           | Name | Description                                      |
| -------------------------------------------------------------- | ---- | ------------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name | Name of the filter to retrieve (case sensitive). |

Returns

| Type                     | Description |
| ------------------------ | ----------- |
| [Filter](./scene_filter) |             |

### GetFilterExpression

Returns the filter expression (string) from a filter id stored in the library.

```csharp
[HandleProcessCorruptedStateExceptions]
public string GetFilterExpression(uint filterId)
```

Parameters

| Type                                                         | Name     | Description                        |
| ------------------------------------------------------------ | -------- | ---------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | filterId | Identifier of the filter to fetch. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### GetFilterFromLibrary

Retrieve a filter from the library with its identifier.

```csharp
[HandleProcessCorruptedStateExceptions]
public Filter GetFilterFromLibrary(uint filterId)
```

Parameters

| Type                                                         | Name     | Description                           |
| ------------------------------------------------------------ | -------- | ------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | filterId | Identifier of the filter to retrieve. |

Returns

| Type                     | Description |
| ------------------------ | ----------- |
| [Filter](./scene_filter) |             |

### GetFilteredOccurrences

Recursively get all the occurrences validating the given filter expression.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetFilteredOccurrences(string filter, uint fromOcc = 0)
```

Parameters

| Type                                                           | Name    | Description                         |
| -------------------------------------------------------------- | ------- | ----------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | filter  | The filter expression.              |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | fromOcc | Source occurrence of the recursion. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### ImportFilterLibrary

Import filters from a given file.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ImportFilterLibrary(string file)
```

Parameters

| Type                                                           | Name | Description                         |
| -------------------------------------------------------------- | ---- | ----------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | file | File containing the filter library. |

### ListFilterLibrary

Returns all the filter stored in the filter library.

```csharp
[HandleProcessCorruptedStateExceptions]
public FilterList ListFilterLibrary()
```

Returns

| Type                             | Description |
| -------------------------------- | ----------- |
| [FilterList](./scene_filterlist) |             |

### RemoveFilterFromLibrary

Remove a filter from the filters library.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveFilterFromLibrary(uint filterId)
```

Parameters

| Type                                                         | Name     | Description                         |
| ------------------------------------------------------------ | -------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | filterId | Identifier of the filter to remove. |

### GetIsolatedOccurrences

Get Occurrences currently being isolated.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetIsolatedOccurrences()
```

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### IsIsolated

Is in isolate mode.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool IsIsolated()
```

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Isolate

Enter isolate mode by isolating a subset of the scene for process, export, viewer, ...

```csharp
[HandleProcessCorruptedStateExceptions]
public void Isolate(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description             |
| ---------------------------------------- | ----------- | ----------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | Occurrences to isolate. |

### Unisolate

Exit the isolate mode.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Unisolate()
```

### AddIsolateBeganCallback

```csharp
public uint AddIsolateBeganCallback(SceneInterface.IsolateBeganDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                         | Name     | Description |
| ---------------------------------------------------------------------------- | -------- | ----------- |
| [SceneInterface.IsolateBeganDelegate](./sceneinterface_isolatebegandelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)               | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveIsolateBeganCallback

```csharp
public void RemoveIsolateBeganCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddIsolateEndedCallback

```csharp
public uint AddIsolateEndedCallback(SceneInterface.IsolateEndedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                         | Name     | Description |
| ---------------------------------------------------------------------------- | -------- | ----------- |
| [SceneInterface.IsolateEndedDelegate](./sceneinterface_isolateendeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)               | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveIsolateEndedCallback

```csharp
public void RemoveIsolateEndedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### SceneReadLock

Lock the scene to prevent modification while allowing reading from other threads.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SceneReadLock()
```

### SceneReadUnlock

Unlock the scene for modification.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SceneReadUnlock()
```

### SceneTryReadLock

Try lock the scene to prevent modification while allowing reading from other threads.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool SceneTryReadLock()
```

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### SceneWriteLock

Lock the scene from being read/write by other threads.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SceneWriteLock()
```

### SceneWriteUnlock

Unlock the scene for modification and reading.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SceneWriteUnlock()
```

### FindPartOccurrencesWithUnstitchedOpenShells

Find Part occurrences containing multiple unstitched openShell entities.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList FindPartOccurrencesWithUnstitchedOpenShells(uint root)
```

Parameters

| Type                                                         | Name | Description      |
| ------------------------------------------------------------ | ---- | ---------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root occurrence. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### MergeOccurrencesByTreeLevel

Merge all parts over maxLevel level.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MergeOccurrencesByTreeLevel(OccurrenceList roots, int maxLevel, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
```

Parameters

| Type                                                       | Name                 | Description                                                                 |
| ---------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                   | roots                | Roots occurrences for the process.                                          |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | maxLevel             | Maximum tree level.                                                         |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode)       | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

### MergePartOccurrences

Merge a set of parts.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList MergePartOccurrences(OccurrenceList partOccurrences, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
```

Parameters

| Type                                                 | Name                 | Description                                                                 |
| ---------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)             | partOccurrences      | Occurrence of the parts to merge.                                           |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### MergePartOccurrencesByAssemblies

Merge all parts under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).

```csharp
[HandleProcessCorruptedStateExceptions]
public void MergePartOccurrencesByAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
```

Parameters

| Type                                                 | Name                 | Description                                                                 |
| ---------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)             | roots                | Roots occurrences for the process (will not be removed).                    |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode) | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

### MergePartOccurrencesByFinalAssemblies

Merge all final-level parts (ie occurrences having for children exclusively occurrences with part components) under each assembly together (grouped by shape type: BRep, Tesselled surface, Joint).

```csharp
[HandleProcessCorruptedStateExceptions]
public void MergePartOccurrencesByFinalAssemblies(OccurrenceList roots = null, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.Destroy, bool CollapseToParent = true)
```

Parameters

| Type                                                          | Name                 | Description                                                                 |
| ------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | roots                | Roots occurrences for the process (will not be removed).                    |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode)          | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | CollapseToParent     | If true, final level unique merged part will replace it's parent.           |

### MergePartOccurrencesByMaterials

Merge a set of parts by materials.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList MergePartOccurrencesByMaterials(OccurrenceList partOccurrences, bool mergeNoMaterials = true, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately, bool combineMeshes = true)
```

Parameters

| Type                                                          | Name                 | Description                                                                        |
| ------------------------------------------------------------- | -------------------- | ---------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | partOccurrences      | Occurrence of the parts to merge.                                                  |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | mergeNoMaterials     | If true, merge all parts with no active material together, else do not merge them. |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode)          | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately.        |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | combineMeshes        | If true, explode and remerge the input parts by visible materials.                 |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### MergePartOccurrencesByName

Merge all parts by occurrences names.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MergePartOccurrencesByName(uint root = 0, MergeHiddenPartsMode mergeHiddenPartsMode = MergeHiddenPartsMode.MergeSeparately)
```

Parameters

| Type                                                         | Name                 | Description                                                                 |
| ------------------------------------------------------------ | -------------------- | --------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root                 | Root occurrence of the subtree to process.                                  |
| [MergeHiddenPartsMode](./scene_mergehiddenpartsmode)         | mergeHiddenPartsMode | Hidden parts handling mode, Destroy them, make visible or merge separately. |

### MergePartOccurrencesByRegions

Merge all parts within the same area.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList MergePartOccurrencesByRegions(OccurrenceList roots, MergeByRegionsStrategy mergeBy, MergeStrategy strategy)
```

Parameters

| Type                                                     | Name     | Description                                              |
| -------------------------------------------------------- | -------- | -------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                 | roots    | Roots occurrences for the process (will not be removed). |
| [MergeByRegionsStrategy](./scene_mergebyregionsstrategy) | mergeBy  | Number: number of output parts (or regions of parts)     |
|                                                          |          |                                                          |
| [MergeStrategy](./scene_mergestrategy)                   | strategy | Choose the regions merging strategy.                     |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### MergePartOccurrencesWithSingleOpenShellByAssemblies

Merge Part occurrences containing a single openShell entity, by assemblies.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList MergePartOccurrencesWithSingleOpenShellByAssemblies(uint root)
```

Parameters

| Type                                                         | Name | Description                         |
| ------------------------------------------------------------ | ---- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root of the main assembly to merge. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### ApplyTransformation

Apply a transformation to the local matrix of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ApplyTransformation(uint occurrence, Matrix4 matrix)
```

Parameters

| Type                                                         | Name       | Description                        |
| ------------------------------------------------------------ | ---------- | ---------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to apply the matrix on. |
| [Matrix4](./geom_matrix4)                                    | matrix     | Transformation to matrix.          |

### CreateSymmetry

Create symmetries from selection.

```csharp
[HandleProcessCorruptedStateExceptions]
public void CreateSymmetry(OccurrenceList occurrences, AxisPlane plane)
```

Parameters

| Type                                     | Name        | Description               |
| ---------------------------------------- | ----------- | ------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | Selection of occurrences. |
| [AxisPlane](./geom_axisplane)            | plane       | Symmetry plane.           |

### Rotate

Modify the local matrix of the scene node to apply a rotation.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Rotate(uint occurrence, Point3 axis, double angle)
```

Parameters

| Type                                                           | Name       | Description           |
| -------------------------------------------------------------- | ---------- | --------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence | Occurrence to rotate. |
| [Point3](./geom_point3)                                        | axis       | Axis of rotation.     |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | angle      | Angle of rotation.    |

### SetLocalMatrices

Change the local matrices on a list of occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetLocalMatrices(OccurrenceList occurrencesIds, Matrix4List matrices, uint batchSize)
```

Parameters

| Type                                                         | Name           | Description                                             |
| ------------------------------------------------------------ | -------------- | ------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                     | occurrencesIds | List of occurrences on which to set the local matrices. |
| [Matrix4List](./geom_matrix4list)                            | matrices       | The occurrences' new local matrices.                    |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | batchSize      | Number of matrices to be set per thread.                |

### SetLocalMatrix

Change the local matrix on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetLocalMatrix(uint occurrence, Matrix4 matrix)
```

Parameters

| Type                                                         | Name       | Description                         |
| ------------------------------------------------------------ | ---------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence to set the local matrix. |
| [Matrix4](./geom_matrix4)                                    | matrix     | The new occurrence local matrix.    |

### GetPartMesh

Return the mesh of the TesselatedShape.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetPartMesh(uint part)
```

Parameters

| Type                                                         | Name | Description         |
| ------------------------------------------------------------ | ---- | ------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part component. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetPartModel

Return the model of the BRepShape.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetPartModel(uint part)
```

Parameters

| Type                                                         | Name | Description         |
| ------------------------------------------------------------ | ---- | ------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part component. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetPartsMeshes

Return the meshes of the TesselatedShape for each given parts if any.

```csharp
[HandleProcessCorruptedStateExceptions]
public MeshList GetPartsMeshes(PartList parts)
```

Parameters

| Type                         | Name  | Description                 |
| ---------------------------- | ----- | --------------------------- |
| [PartList](./scene_partlist) | parts | The list of part component. |

Returns

| Type                             | Description |
| -------------------------------- | ----------- |
| [MeshList](./polygonal_meshlist) |             |

### GetPartsModels

Return the models of the BRepShape for each given parts if any.

```csharp
[HandleProcessCorruptedStateExceptions]
public ModelList GetPartsModels(PartList parts)
```

Parameters

| Type                         | Name  | Description                 |
| ---------------------------- | ----- | --------------------------- |
| [PartList](./scene_partlist) | parts | The list of part component. |

Returns

| Type                         | Description |
| ---------------------------- | ----------- |
| [ModelList](./cad_modellist) |             |

### GetPartsTransforms

Returns the transform matrix of each given parts.

```csharp
[HandleProcessCorruptedStateExceptions]
public Matrix4List GetPartsTransforms(PartList parts)
```

Parameters

| Type                         | Name  | Description                      |
| ---------------------------- | ----- | -------------------------------- |
| [PartList](./scene_partlist) | parts | The parts to retrieve transform. |

Returns

| Type                              | Description |
| --------------------------------- | ----------- |
| [Matrix4List](./geom_matrix4list) |             |

### GetPartsTransformsIndexed

Returns the transform matrix of each given parts (indexed mode).

```csharp
[HandleProcessCorruptedStateExceptions]
public GetPartsTransformsIndexedReturn GetPartsTransformsIndexed(PartList parts)
```

Parameters

| Type                         | Name  | Description                      |
| ---------------------------- | ----- | -------------------------------- |
| [PartList](./scene_partlist) | parts | The parts to retrieve transform. |

Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [GetPartsTransformsIndexedReturn](./scene_getpartstransformsindexedreturn) |             |

### SetPartMesh

Add a mesh to a part (create a TessellatedShape on the part).

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPartMesh(uint part, uint mesh)
```

Parameters

| Type                                                         | Name | Description                  |
| ------------------------------------------------------------ | ---- | ---------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part | The part component.          |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | mesh | The mesh to add to the part. |

### SetPartModel

Add a model to a part (create a BRepShape on the part).

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPartModel(uint part, uint model)
```

Parameters

| Type                                                         | Name  | Description                   |
| ------------------------------------------------------------ | ----- | ----------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | part  | The part component.           |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | model | The model to add to the part. |

### SetPartsTransforms

Set the transform matrix of each given parts.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPartsTransforms(PartList parts, Matrix4List transforms)
```

Parameters

| Type                              | Name       | Description                        |
| --------------------------------- | ---------- | ---------------------------------- |
| [PartList](./scene_partlist)      | parts      | The parts to retrieve transform.   |
| [Matrix4List](./geom_matrix4list) | transforms | The transform matrix of each part. |

### SetPartsTransformsIndexed

Set the transform matrix of each given parts (indexed mode).

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPartsTransformsIndexed(PartList parts, IntList indices, Matrix4List transforms)
```

Parameters

| Type                              | Name       | Description                                |
| --------------------------------- | ---------- | ------------------------------------------ |
| [PartList](./scene_partlist)      | parts      | The parts to retrieve transform.           |
| [IntList](./core_intlist)         | indices    | The transform matrix index for each parts. |
| [Matrix4List](./geom_matrix4list) | transforms | The list of transform matrices.            |

### GetPartialLoadingStatus

Get the current status of a partial loading component.

```csharp
[HandleProcessCorruptedStateExceptions]
public PartialLoad_Status GetPartialLoadingStatus(uint component)
```

Parameters

| Type                                                         | Name      | Description                |
| ------------------------------------------------------------ | --------- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component | Referenced Data component. |

Returns

| Type                                              | Description |
| ------------------------------------------------- | ----------- |
| [PartialLoad\_Status](./scene_partialload_status) |             |

### SetReferencedDataComponentParent

Defines which referenced data is parent to the given component.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetReferencedDataComponentParent(uint component, uint parent)
```

Parameters

| Type                                                         | Name      | Description                             |
| ------------------------------------------------------------ | --------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | component | The referenced data component to alter. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | parent    | The parent.                             |

### SetReferencedDataComponentPath

Defines which path the referenced data is at.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetReferencedDataComponentPath(uint component, string filePath)
```

Parameters

| Type                                                           | Name      | Description                             |
| -------------------------------------------------------------- | --------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | component | The referenced data component to alter. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | filePath  | The filepath.                           |

### AlignPivotPointToWorld

Re-orient the Pivot Point straight to world origin (the grid).

```csharp
[HandleProcessCorruptedStateExceptions]
public void AlignPivotPointToWorld(OccurrenceList occurrences, bool applyToChildren)
```

Parameters

| Type                                                          | Name            | Description                                                                            |
| ------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences     | The occurrences to modify.                                                             |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

### MovePivotPointToOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of its bounding box (and of its children if the parameter is True).

```csharp
[HandleProcessCorruptedStateExceptions]
public void MovePivotPointToOccurrenceCenter(OccurrenceList occurrences, bool applyToChildren)
```

Parameters

| Type                                                          | Name            | Description                                                                            |
| ------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences     | Occurrences (or the roots occurrences if recursively=True).                            |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

### MovePivotPointToOrigin

Move the pivot point of an occurrence (and its descendants if recursively) to the origin (0,0,0).

```csharp
[HandleProcessCorruptedStateExceptions]
public void MovePivotPointToOrigin(uint occurrence, bool applyToChildren)
```

Parameters

| Type                                                          | Name            | Description                                                                            |
| ------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence      | The occurrence (or the root occurrence if recursively=True).                           |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

### MovePivotPointToSelectionCenter

Move the pivot point of all given occurrences to the center of all occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MovePivotPointToSelectionCenter(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description                |
| ---------------------------------------- | ----------- | -------------------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The occurrences to modify. |

### MovePivotPointToTargetedOccurrenceCenter

Move the pivot point of each occurrence listed in the function input, to the center of the targeted occurrence Center (and of its children if the parameter is True).

```csharp
[HandleProcessCorruptedStateExceptions]
public void MovePivotPointToTargetedOccurrenceCenter(OccurrenceList occurrences, uint target, bool applyToChildren)
```

Parameters

| Type                                                          | Name            | Description                                                                            |
| ------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences     | The occurrence (or the root occurrence if recursively=True).                           |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | target          | The target occurrence.                                                                 |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | applyToChildren | If True, all the pivot of the descending occurrences from occurrence will be affected. |

### SetPivotOnly

Set the pivot of an occurrence to the given transformation matrix, the geometry will not be moved (warning: do not confuse with property Transform which actually move the occurrence).

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPivotOnly(uint occurrence, Matrix4 pivot)
```

Parameters

| Type                                                         | Name       | Description                                               |
| ------------------------------------------------------------ | ---------- | --------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence to move the pivot.                         |
| [Matrix4](./geom_matrix4)                                    | pivot      | The new transformation matrix for the occurrence (pivot). |

### AddAnnotationGroup

Add a Annotation Group to the pmi component.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddAnnotationGroup(uint component, string name)
```

Parameters

| Type                                                           | Name      | Description                            |
| -------------------------------------------------------------- | --------- | -------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | component | Component to add the Annotation Group. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name      | Name of the annotation group.          |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### AddAnnotationToProductView

Add an annotation to a product view.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddAnnotationToProductView(uint productView, uint annotation)
```

Parameters

| Type                                                         | Name        | Description |
| ------------------------------------------------------------ | ----------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | productView |             |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | annotation  |             |

### AddMeshToAnnotation

Add a mesh and its material to a annotation.

```csharp
[HandleProcessCorruptedStateExceptions]
public void AddMeshToAnnotation(uint annotation, uint material, uint staticmesh)
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | annotation |             |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | material   |             |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | staticmesh |             |

### ConvertPMIToOccurrences

Convert each PMI component into a set of occurrences with mesh geometries.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ConvertPMIToOccurrences(OccurrenceList occurrences, bool convertVisibility = false)
```

Parameters

| Type                                                          | Name              | Description                                                                                                                 |
| ------------------------------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences       | Occurrence selection.                                                                                                       |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | convertVisibility | If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible. |

### CreateAnnotationFromDefinition

Create Annotation from definition.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateAnnotationFromDefinition(AnnotationDefinition definition)
```

Parameters

| Type                                                 | Name       | Description            |
| ---------------------------------------------------- | ---------- | ---------------------- |
| [AnnotationDefinition](./scene_annotationdefinition) | definition | Annotation definition. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateOccurrenceFromAnnotation

Convert a single annotation on an occurrence into an occurrence with mesh geometry.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateOccurrenceFromAnnotation(uint annotation, bool convertVisibility = false)
```

Parameters

| Type                                                          | Name              | Description                                                                                                                 |
| ------------------------------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | annotation        | Annotation that shall be converted to an occurrence with mesh geometry.                                                     |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | convertVisibility | If True, the visibility will be converted (useful to select a specific view/variant), else all occurrences will be visible. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateProductView

Create a productview from definition.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateProductView(ProductViewDefinition definition)
```

Parameters

| Type                                                   | Name       | Description |
| ------------------------------------------------------ | ---------- | ----------- |
| [ProductViewDefinition](./scene_productviewdefinition) | definition |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetAnnotationDefinition

Get definition of given annotation.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnnotationDefinition GetAnnotationDefinition(uint annotation)
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | annotation |             |

Returns

| Type                                                 | Description |
| ---------------------------------------------------- | ----------- |
| [AnnotationDefinition](./scene_annotationdefinition) |             |

### GetAnnotationGroups

Returns the list of the AnnotationGroup from a PMIComponent.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnnotationGroupList GetAnnotationGroups(uint pmiComponent)
```

Parameters

| Type                                                         | Name         | Description        |
| ------------------------------------------------------------ | ------------ | ------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | pmiComponent | The pmi component. |

Returns

| Type                                               | Description |
| -------------------------------------------------- | ----------- |
| [AnnotationGroupList](./scene_annotationgrouplist) |             |

### GetAnnotationListAABB

Get the AABB of the annotation list.

```csharp
[HandleProcessCorruptedStateExceptions]
public AABB GetAnnotationListAABB(AnnotationList annotationList)
```

Parameters

| Type                                     | Name           | Description |
| ---------------------------------------- | -------------- | ----------- |
| [AnnotationList](./scene_annotationlist) | annotationList |             |

Returns

| Type                | Description |
| ------------------- | ----------- |
| [AABB](./geom_aabb) |             |

### GetAnnotations

Returns the list of the Annotation from a AnnotationGroup.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnnotationList GetAnnotations(uint group)
```

Parameters

| Type                                                         | Name  | Description          |
| ------------------------------------------------------------ | ----- | -------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | group | The AnnotationGroup. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [AnnotationList](./scene_annotationlist) |             |

### GetOccurrenceAnnotationDefinitions

Get all annotations definition of given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public AnnotationDefinitionList GetOccurrenceAnnotationDefinitions(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [AnnotationDefinitionList](./scene_annotationdefinitionlist) |             |

### GetProductViewDefinition

Get productview definition.

```csharp
[HandleProcessCorruptedStateExceptions]
public ProductViewDefinition GetProductViewDefinition(uint view)
```

Parameters

| Type                                                         | Name | Description       |
| ------------------------------------------------------------ | ---- | ----------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | view | The product view. |

Returns

| Type                                                   | Description |
| ------------------------------------------------------ | ----------- |
| [ProductViewDefinition](./scene_productviewdefinition) |             |

### GetProductViewDefinitions

Get all productviews definitions.

```csharp
[HandleProcessCorruptedStateExceptions]
public ProductViewDefinitionList GetProductViewDefinitions()
```

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [ProductViewDefinitionList](./scene_productviewdefinitionlist) |             |

### SetAnnotationToGroup

Set Annotation to a Annotation Group.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetAnnotationToGroup(uint annotation, uint group)
```

Parameters

| Type                                                         | Name       | Description |
| ------------------------------------------------------------ | ---------- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | annotation |             |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | group      |             |

### CleanInstances

Clean prototypes and instances (lonely instances, overriding their prototypes hierarchies...).

```csharp
[HandleProcessCorruptedStateExceptions]
public void CleanInstances(bool removeUselessInstances, bool removeHierarchyOverridingInstances, uint occurrence = 0)
```

Parameters

| Type                                                          | Name                               | Description                                                                  |
| ------------------------------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | removeUselessInstances             | Remove instances where they are not needed (prototype referenced once, ...). |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | removeHierarchyOverridingInstances | Remove instances overriding their prototypes sub-hierarchies.                |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence                         | Root occurrence for the process.                                             |

### GetDirectInstances

Returns all the occurrences prototyping the given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetDirectInstances(uint prototype)
```

Parameters

| Type                                                         | Name      | Description               |
| ------------------------------------------------------------ | --------- | ------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | prototype | The prototype occurrence. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetFinalPrototype

Returns the final prototype of an occurrence (ie. The very first one of prototype tree).

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetFinalPrototype(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetInstances

Get occurrences sharing the same prototype as the given one.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetInstances(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                |
| ------------------------------------------------------------ | ---------- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Reference part occurrence. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetPrototype

Returns the prototype of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetPrototype(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### GetPrototypes

Returns the prototype for each given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetPrototypes(OccurrenceList occurrences)
```

Parameters

| Type                                     | Name        | Description     |
| ---------------------------------------- | ----------- | --------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The occurrence. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### PrototypeSubTree

Create occurrences that prototype the given occurrence and all its subtree.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint PrototypeSubTree(uint prototype)
```

Parameters

| Type                                                         | Name      | Description                                       |
| ------------------------------------------------------------ | --------- | ------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | prototype | The root occurrence of the sub-tree to prototype. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### SetPrototype

Sets the prototype of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPrototype(uint occurrence, uint prototype)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | prototype  | The prototype.  |

### SetPrototypes

Sets the prototype for each given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPrototypes(OccurrenceList occurrences, OccurrenceList prototypes)
```

Parameters

| Type                                     | Name        | Description      |
| ---------------------------------------- | ----------- | ---------------- |
| [OccurrenceList](./scene_occurrencelist) | occurrences | The occurrences. |
| [OccurrenceList](./scene_occurrencelist) | prototypes  | The prototypes.  |

### UpdateChildrenPrototypes

Update children prototypes of the given occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UpdateChildrenPrototypes(uint occurrence)
```

Parameters

| Type                                                         | Name       | Description     |
| ------------------------------------------------------------ | ---------- | --------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | The occurrence. |

### ClearSelection

Clear the current selection.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ClearSelection(uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                                  |
| ------------------------------------------------------------ | ----------- | ---------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to clear, or current selection (id = 1) will be cleared. |

### CreateSelectionSnapshot

Get the ID of a copy of the current selection to use it later.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateSelectionSnapshot()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### DeleteSelection

Delete all selected occurrences, and/or sub-occurrence elements.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteSelection(uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                                   |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to delete, or current selection (id = 1) will be deleted. |

### DeleteSelectionSnapshot

Delete a selection snapshot using its id.

```csharp
[HandleProcessCorruptedStateExceptions]
public void DeleteSelectionSnapshot(uint selectionId)
```

Parameters

| Type                                                         | Name        | Description                             |
| ------------------------------------------------------------ | ----------- | --------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | Selection ID of the snapshot to delete. |

### GetSelectedOccurrences

Returns all the selected occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetSelectedOccurrences(bool keepAncestors = false, uint selectionId = 1)
```

Parameters

| Type                                                          | Name          | Description                                                                |
| ------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | keepAncestors | If True, occurrences with ancestors selected will be remove from the list. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | selectionId   | ID of the selection to use, or current selection (id = 1) will be used.    |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetSelectedPolygonCount

Returns the number of selected polygons.

```csharp
[HandleProcessCorruptedStateExceptions]
public ulong GetSelectedPolygonCount(uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                             |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) |             |

### InvertOrientationSelection

Invert the orientation of each selected item (occurrences and/or sub-occurrence elements.

```csharp
[HandleProcessCorruptedStateExceptions]
public void InvertOrientationSelection(uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                                    |
| ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |

### InvertSelect

Invert occurrences to selection.

```csharp
[HandleProcessCorruptedStateExceptions]
public void InvertSelect(OccurrenceList occurrence, uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                             |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                     | occurrence  | Occurrences to invert from the selection.                               |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

### InvertSelection

Replace the selection by all unselected part occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public void InvertSelection(uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                                    |
| ------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to invert, or current selection (id = 1) will be inverted. |

### Select

Add occurrences to selection.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Select(OccurrenceList occurrences, uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                             |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences | Occurrences to add to the selection.                                    |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

### SeparateSelection

Separate all polygons from their original parts into a new one or new ones depending on the parameters.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList SeparateSelection(bool createSingleOccurrence = true, uint selectionId = 1)
```

Parameters

| Type                                                          | Name                   | Description                                                                                                                                                  |
| ------------------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | createSingleOccurrence | Only create a single occurrence, or create occurrences corresponding to every part containing selected elements, at the same place in the hierarchical tree. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | selectionId            | ID of the selection to separate, or current selection (id = 1) will be separated.                                                                            |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### Unselect

Remove occurrences to selection.

```csharp
[HandleProcessCorruptedStateExceptions]
public void Unselect(OccurrenceList occurrence, uint selectionId = 1)
```

Parameters

| Type                                                         | Name        | Description                                                             |
| ------------------------------------------------------------ | ----------- | ----------------------------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                     | occurrence  | Occurrences to remove from the selection.                               |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | selectionId | ID of the selection to use, or current selection (id = 1) will be used. |

### AddSelectionChangedCallback

```csharp
public uint AddSelectionChangedCallback(SceneInterface.SelectionChangedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                                 | Name     | Description |
| ------------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.SelectionChangedDelegate](./sceneinterface_selectionchangeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                       | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveSelectionChangedCallback

```csharp
public void RemoveSelectionChangedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddVariantChangedCallback

```csharp
public uint AddVariantChangedCallback(SceneInterface.VariantChangedDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                             | Name     | Description |
| -------------------------------------------------------------------------------- | -------- | ----------- |
| [SceneInterface.VariantChangedDelegate](./sceneinterface_variantchangeddelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                   | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveVariantChangedCallback

```csharp
public void RemoveVariantChangedCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### Compress

Compress a sub-tree by removing occurrence containing only one Child or empty, and by removing useless instances (see removeUselessInstances).

```csharp
[HandleProcessCorruptedStateExceptions]
public uint Compress(uint occurrence = 0)
```

Parameters

| Type                                                         | Name       | Description                      |
| ------------------------------------------------------------ | ---------- | -------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Root occurrence for the process. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### ConvertToOldSchoolVisibility

Modify the visible properties of the sub-tree to look like old school visibility (only hidden/inherited).

```csharp
[HandleProcessCorruptedStateExceptions]
public void ConvertToOldSchoolVisibility(uint root = 0)
```

Parameters

| Type                                                         | Name | Description      |
| ------------------------------------------------------------ | ---- | ---------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root occurrence. |

### GetHiddenPartOccurrences

Get hidden part occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetHiddenPartOccurrences(OccurrenceList roots = null)
```

Parameters

| Type                                     | Name  | Description                        |
| ---------------------------------------- | ----- | ---------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | roots | Roots occurrences for the process. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### GetVisiblePartOccurrences

Get visible part occurrences.

```csharp
[HandleProcessCorruptedStateExceptions]
public OccurrenceList GetVisiblePartOccurrences(OccurrenceList roots = null)
```

Parameters

| Type                                     | Name  | Description                        |
| ---------------------------------------- | ----- | ---------------------------------- |
| [OccurrenceList](./scene_occurrencelist) | roots | Roots occurrences for the process. |

Returns

| Type                                     | Description |
| ---------------------------------------- | ----------- |
| [OccurrenceList](./scene_occurrencelist) |             |

### MakeInstanceUnique

Singularize all instances on the sub-tree of an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void MakeInstanceUnique(OccurrenceList occurrences = null, bool keepOnlyPartInstances = false)
```

Parameters

| Type                                                          | Name                  | Description                                          |
| ------------------------------------------------------------- | --------------------- | ---------------------------------------------------- |
| [OccurrenceList](./scene_occurrencelist)                      | occurrences           | Root occurrence for the process.                     |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | keepOnlyPartInstances | If true, instances of part will not be singularized. |

### Rake

Set the same parent to all descending parts (all parts will be singularized).

```csharp
[HandleProcessCorruptedStateExceptions]
public void Rake(uint occurrence = 0, bool keepInstances = false)
```

Parameters

| Type                                                          | Name          | Description                              |
| ------------------------------------------------------------- | ------------- | ---------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | occurrence    | Root occurrence for the process.         |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | keepInstances | If false, the part will be singularized. |

### RemoveSymmetryMatrices

Remove symmetry matrices (apply matrices on geometries on nodes under an occurrence with a symmetry matrix.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveSymmetryMatrices(uint occurrence = 0)
```

Parameters

| Type                                                         | Name       | Description                      |
| ------------------------------------------------------------ | ---------- | -------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Root occurrence for the process. |

### ResetPartTransform

Set all part transformation matrices to identity in a sub-tree, transformation will be applied to the shapes.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ResetPartTransform(uint root = 0)
```

Parameters

| Type                                                         | Name | Description                      |
| ------------------------------------------------------------ | ---- | -------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | Root occurrence for the process. |

### ResetTransform

Set all transformation matrices to identity in a sub-tree.

```csharp
[HandleProcessCorruptedStateExceptions]
public void ResetTransform(uint root, bool recursive = true, bool keepInstantiation = true, bool keepPartTransform = false)
```

Parameters

| Type                                                          | Name              | Description                                                                                             |
| ------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)  | root              | Root occurrence for the process.                                                                        |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | recursive         | If False, transformation will be applied only on the root and its components.                           |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | keepInstantiation | If False, all occurrences will be singularized.                                                         |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | keepPartTransform | If False, transformation will be applied to the shapes (BRepShape points or TessellatedShape vertices). |

### CreateRayProber

Creates a ray prober.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateRayProber()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### CreateSphereProber

Creates a sphere prober.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint CreateSphereProber()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RayCast

```csharp
[HandleProcessCorruptedStateExceptions]
public RayHit RayCast(Ray ray, uint root)
```

Parameters

| Type                                                         | Name | Description                       |
| ------------------------------------------------------------ | ---- | --------------------------------- |
| [Ray](./geom_ray)                                            | ray  | The ray to cast.                  |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | The root occurrence to cast from. |

Returns

| Type                     | Description |
| ------------------------ | ----------- |
| [RayHit](./scene_rayhit) |             |

### RayCastAll

```csharp
[HandleProcessCorruptedStateExceptions]
public RayHitList RayCastAll(Ray ray, uint root)
```

Parameters

| Type                                                         | Name | Description                       |
| ------------------------------------------------------------ | ---- | --------------------------------- |
| [Ray](./geom_ray)                                            | ray  | The ray to cast.                  |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | root | The root occurrence to cast from. |

Returns

| Type                             | Description |
| -------------------------------- | ----------- |
| [RayHitList](./scene_rayhitlist) |             |

### UpdateRayProber

Updates the designed ray prober.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UpdateRayProber(uint proberID, Ray ray)
```

Parameters

| Type                                                         | Name     | Description                     |
| ------------------------------------------------------------ | -------- | ------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | proberID | The ray prober Id.              |
| [Ray](./geom_ray)                                            | ray      | Update the prober's ray values. |

### UpdateSphereProber

Updates the designed sphere prober.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UpdateSphereProber(uint proberID, Point3 sphereCenter, double sphereRadius)
```

Parameters

| Type                                                           | Name         | Description            |
| -------------------------------------------------------------- | ------------ | ---------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | proberID     | The sphere prober Id.  |
| [Point3](./geom_point3)                                        | sphereCenter | The new prober center. |
| [double](https://learn.microsoft.com/dotnet/api/system.double) | sphereRadius | The new prober radius. |

### AddonRayProbeCallback

```csharp
public uint AddonRayProbeCallback(SceneInterface.onRayProbeDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                     | Name     | Description |
| ------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.onRayProbeDelegate](./sceneinterface_onrayprobedelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)           | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveonRayProbeCallback

```csharp
public void RemoveonRayProbeCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### AddonSphereProbeCallback

```csharp
public uint AddonSphereProbeCallback(SceneInterface.onSphereProbeDelegate callback, IntPtr userData)
```

Parameters

| Type                                                                           | Name     | Description |
| ------------------------------------------------------------------------------ | -------- | ----------- |
| [SceneInterface.onSphereProbeDelegate](./sceneinterface_onsphereprobedelegate) | callback |             |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr)                 | userData |             |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### RemoveonSphereProbeCallback

```csharp
public void RemoveonSphereProbeCallback(uint id)
```

Parameters

| Type                                                         | Name | Description |
| ------------------------------------------------------------ | ---- | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | id   |             |

### GetMultipleOccurrenceUserData

Batch version of getOccurrenceUserData.

```csharp
[HandleProcessCorruptedStateExceptions]
public PtrList GetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
```

Parameters

| Type                                                         | Name        | Description                                                    |
| ------------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences | Occurrences that store the user data.                          |

Returns

| Type                      | Description |
| ------------------------- | ----------- |
| [PtrList](./core_ptrlist) |             |

### GetOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public IntPtr GetOccurrenceUserData(uint userDataId, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                                    |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence that store the user data.                           |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) |             |

### GetPartUserData

Set or replace a userdata stored on an Part.

```csharp
[HandleProcessCorruptedStateExceptions]
public IntPtr GetPartUserData(uint userDataId, uint Part)
```

Parameters

| Type                                                         | Name       | Description                                              |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | Part       | Part that store the user data.                           |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) |             |

### HasMultipleOccurrenceUserData

Batch version of hasOccurrenceUserData.

```csharp
[HandleProcessCorruptedStateExceptions]
public BoolList HasMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
```

Parameters

| Type                                                         | Name        | Description                                                    |
| ------------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences | Occurrences that potentially store the user data.              |

Returns

| Type                        | Description |
| --------------------------- | ----------- |
| [BoolList](./core_boollist) |             |

### HasOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool HasOccurrenceUserData(uint userDataId, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                                    |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence that potentially store the user data.               |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### HasPartUserData

Set or replace a userdata stored on an Part.

```csharp
[HandleProcessCorruptedStateExceptions]
public bool HasPartUserData(uint userDataId, uint Part)
```

Parameters

| Type                                                         | Name       | Description                                              |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | Part       | Part that potentially store the user data.               |

Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### SetMultipleOccurrenceUserData

Batch version of setOccurrenceUserData.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences, PtrList userDataList)
```

Parameters

| Type                                                         | Name         | Description                                                    |
| ------------------------------------------------------------ | ------------ | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId   | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences  | Occurrences that will store the user data.                     |
| [PtrList](./core_ptrlist)                                    | userDataList | User data to store on each occurrence.                         |

### SetOccurrenceUserData

Set or replace a userdata stored on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetOccurrenceUserData(uint userDataId, uint occurrence, IntPtr userData)
```

Parameters

| Type                                                           | Name       | Description                                                    |
| -------------------------------------------------------------- | ---------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | occurrence | Occurrence that will store the user data.                      |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) | userData   | User data to store in the given occurrence.                    |

### SetPartUserData

Set or replace a userdata stored on an Part.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetPartUserData(uint userDataId, uint Part, IntPtr userData)
```

Parameters

| Type                                                           | Name       | Description                                              |
| -------------------------------------------------------------- | ---------- | -------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | Part       | Part that will store the user data.                      |
| [IntPtr](https://learn.microsoft.com/dotnet/api/system.intptr) | userData   | User data to store in the given Part.                    |

### SubscribeToOccurrenceUserData

Subscribe to occurrence user data. multiple different userdata can be stored on the same occurrences if subscribeToOccurrenceUserData is called multiple times.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint SubscribeToOccurrenceUserData()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### SubscribeToPartUserData

Subscribe to Part user data. multiple different userdata can be stored on the same Parts if subscribeToPartUserData is called multiple times.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint SubscribeToPartUserData()
```

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### UnsetMultipleOccurrenceUserData

Batch version of unsetOccurrenceUserData.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnsetMultipleOccurrenceUserData(uint userDataId, OccurrenceList occurrences)
```

Parameters

| Type                                                         | Name        | Description                                                    |
| ------------------------------------------------------------ | ----------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId  | UserData identifier provided by subscribeToOccurrenceUserData. |
| [OccurrenceList](./scene_occurrencelist)                     | occurrences | Occurrences that will store the user data.                     |

### UnsetOccurrenceUserData

Unset the userdata stored on an occurrence.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnsetOccurrenceUserData(uint userDataId, uint occurrence)
```

Parameters

| Type                                                         | Name       | Description                                                    |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToOccurrenceUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | occurrence | Occurrence that will store the user data.                      |

### UnsetPartUserData

Unset the userdata stored on an Part.

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnsetPartUserData(uint userDataId, uint Part)
```

Parameters

| Type                                                         | Name       | Description                                              |
| ------------------------------------------------------------ | ---------- | -------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier provided by subscribeToPartUserData. |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | Part       | Part that will store the user data.                      |

### UnsubscribeFromOccurrenceUserData

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnsubscribeFromOccurrenceUserData(uint userDataId)
```

Parameters

| Type                                                         | Name       | Description                         |
| ------------------------------------------------------------ | ---------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier to unsubscribe. |

### UnsubscribeFromPartUserData

```csharp
[HandleProcessCorruptedStateExceptions]
public void UnsubscribeFromPartUserData(uint userDataId)
```

Parameters

| Type                                                         | Name       | Description                         |
| ------------------------------------------------------------ | ---------- | ----------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | userDataId | UserData identifier to unsubscribe. |

### AddVariant

Create a new variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint AddVariant(string name)
```

Parameters

| Type                                                           | Name | Description                  |
| -------------------------------------------------------------- | ---- | ---------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name | The name of the new variant. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### DuplicateVariant

Create a new variant which is a copy of an existing variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint DuplicateVariant(uint variant, string name)
```

Parameters

| Type                                                           | Name    | Description                |
| -------------------------------------------------------------- | ------- | -------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32)   | variant | The variant to duplicated. |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | name    | Name of the new variant.   |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### EndModifyAllVariants

Call this function to disable the modifications of all variants at the same time.

```csharp
[HandleProcessCorruptedStateExceptions]
public void EndModifyAllVariants()
```

### GetVariantComponentsDefinitions

Returns the definitions of multiple variant components.

```csharp
[HandleProcessCorruptedStateExceptions]
public VariantDefinitionListList GetVariantComponentsDefinitions(VariantComponentList variantComponents)
```

Parameters

| Type                                                 | Name              | Description                                             |
| ---------------------------------------------------- | ----------------- | ------------------------------------------------------- |
| [VariantComponentList](./scene_variantcomponentlist) | variantComponents | The list of variant components to retrieve definitions. |

Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [VariantDefinitionListList](./scene_variantdefinitionlistlist) |             |

### GetVariantTree

Get the alternative tree used by this variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public uint GetVariantTree(uint variant)
```

Parameters

| Type                                                         | Name    | Description  |
| ------------------------------------------------------------ | ------- | ------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | variant | The variant. |

Returns

| Type                                                         | Description |
| ------------------------------------------------------------ | ----------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) |             |

### ListVariants

Returns all the available variants.

```csharp
[HandleProcessCorruptedStateExceptions]
public VariantList ListVariants()
```

Returns

| Type                               | Description |
| ---------------------------------- | ----------- |
| [VariantList](./scene_variantlist) |             |

### RemoveVariant

Remove a variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public void RemoveVariant(uint variant)
```

Parameters

| Type                                                         | Name    | Description            |
| ------------------------------------------------------------ | ------- | ---------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | variant | The variant to remove. |

### SetCurrentVariant

Change the current variant used.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetCurrentVariant(uint variant = 0)
```

Parameters

| Type                                                         | Name    | Description                          |
| ------------------------------------------------------------ | ------- | ------------------------------------ |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | variant | The variant to enable (can be null). |

### SetVariantTree

Set the alternative tree to use for this variant.

```csharp
[HandleProcessCorruptedStateExceptions]
public void SetVariantTree(uint variant, uint tree)
```

Parameters

| Type                                                         | Name    | Description                                   |
| ------------------------------------------------------------ | ------- | --------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | variant | The variant to modify.                        |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | tree    | The alternative tree to use for this variant. |

### StartModifyAllVariants

Call this function to to enable the modifications of all variants at the same time.

```csharp
[HandleProcessCorruptedStateExceptions]
public void StartModifyAllVariants()
```
