Class SimpleTriangulator
Basic implementation of ITriangulator. Not optimized.
Implements
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core.Triangulator
Assembly: cs.temp.dll.dll
Syntax
public class SimpleTriangulator : ITriangulator
Remarks
This has been written for simplicity for triangulating a small number of vertices. It lacks optimizations such as a full Delaunay triangulation on setup or hierarchical search (e.g. quadtree) on search.
Properties
Triangles
SpacePinMeshVisualizer uses this dto as reference.
Declaration
public int[] Triangles { get; }
Property Value
| Type | Description |
|---|---|
| Int32[] |
Vertices
SpacePinMeshVisualizer uses this dto as reference.
Declaration
public List<Vector3> Vertices { get; }
Property Value
| Type | Description |
|---|---|
| List<Vector3> |
Methods
Add(Vector3[])
Add vertices to further triangulate.
Declaration
public bool Add(Vector3[] vertices)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3[] | vertices | The new vertices to add. |
Returns
| Type | Description |
|---|---|
| Boolean | True on success. |
Remarks
Bounds should already be set. Also, the bounds should be big enough to contain all vertices being added.
Clear()
Reset to original state, discarding all.
Declaration
public void Clear()
Remarks
Note this discards the bounds as well, so they must be set again after each clear.
Find(Vector3)
Declaration
public Interpolant Find(Vector3 pos)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | pos |
Returns
| Type | Description |
|---|---|
| Interpolant |
SetBounds(Vector3, Vector3)
Declaration
public void SetBounds(Vector3 minPos, Vector3 maxPos)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | minPos | |
| Vector3 | maxPos |