# Tetrahedralize(Vector3[], out int[], out Vector3[])

> Calculates tetrahderons from positions using Delaunay Tetrahedralization.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## Tetrahedralize(Vector3\[], int\[], Vector3\[])

```csharp
public static void Tetrahedralize(Vector3[] positions, out int[] outIndices, out Vector3[] outPositions)
```

### Parameters

**** (\[Vector3\[]]\(/engine/6000.6/script-reference/unityengine/vector3)): An array of Light Probe positions.**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): An array that Unity populates with updated Light Probe indices.**** (\[Vector3\[]]\(/engine/6000.6/script-reference/unityengine/vector3)): An array that Unity populates with updated Light Probe positions.

### Remarks

This is an Editor-only method for visualizing the tetrahedrons that Unity uses for blending probe lighting.

When you pass an array of Light Probe positions, Unity performs the same calculations as it does when regenerating the tetrahedrons, and populates the out parameters with the results of those calculations:

`outIndices`: every four entries correspond to the vertices of a tetrahedron `outPositions`: indexed in the same order as `outIndices`, containing the positions of the corresponding probes

Unity considers Light Probes at the same position (within some tolerance) as duplicates, and does not include them in the tetrahedralization. When this happens, only the first element is included. As a result, `outPositions` might have fewer elements than `positions`.

Note that this method does not cause Unity to update the tetrahedrons that it uses for Light Probes; use this method only for visualizing the results of such an operation.

Additional Resources: [LightProbes.Tetrahedralize](/engine/6000.6/script-reference/unityengine/lightprobes/tetrahedralize.md), [LightProbes.TetrahedralizeAsync](/engine/6000.6/script-reference/unityengine/lightprobes/tetrahedralizeasync.md), [Light Probes and Scene loading](/engine/6000.6/manual/lighting-overview/direct-and-indirect-lighting/light-probes/and-scene-loading.md).
