Tetrahedralize(Vector3[], out int[], out Vector3[])
Calculates tetrahderons from positions using Delaunay Tetrahedralization.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
Tetrahedralize(Vector3[], int[], Vector3[])
public static void Tetrahedralize(Vector3[] positions, out int[] outIndices, out Vector3[] outPositions)
Parameters
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:
outIndicesoutPositionsoutIndicesUnity 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, might have fewer elements than .
outPositionspositionsNote 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, LightProbes.TetrahedralizeAsync, Light Probes and Scene loading.