QuadTriangulationToolLogic.Triangle
A private struct in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Private triangle used by QuadTriangulationToolLogic, holding vertex indices and positions plus its normal and centroid.
- Listed in Global namespace: Q to R
- Nested in
QuadTriangulationToolLogic
Constructors
| Member | What it is |
|---|---|
Triangle(Vector3[] vertices, int[] triangles, int start) | Creates a QuadTriangulationToolLogic.Triangle from sharedVertices, uniqueVertices, sharedIndices, uniqueIndices and index. |
Triangle(List<Vector3> sharedVertices, List<Vector3> uniqueVertices, List<int> sharedIndices, List<int> uniqueIndices, int index) | Creates a QuadTriangulationToolLogic.Triangle from sharedVertices, uniqueVertices, sharedIndices, uniqueIndices and index. |
Fields
| Member | What it is |
|---|---|
Vector3 centroid | Centre point of the triangle. |
int[] indices | The three vertex indices. |
Vector3 normal | Face normal from the winding order. |
Vector3[] vertices | The three vertex positions. |
Methods
| Member | What it is |
|---|---|
static void GetInverted(ref QuadTriangulationToolLogic.Triangle abc, ref QuadTriangulationToolLogic.Triangle def) | Re-splits a quad's two triangles along the other diagonal and makes them face outward. |
2 private and internal methods
| Member | What it is |
|---|---|
private static QuadTriangulationToolLogic.Triangle Flip(QuadTriangulationToolLogic.Triangle original) | Returns the triangle with reversed winding and normal. |
private static void Split(QuadTriangulationToolLogic.Triangle from, QuadTriangulationToolLogic.Triangle other, List<int> sharedIndices, List<int> uniqueIndices, List<Vector3> sharedVertices, List<Vector3> uniqueVertices) | Sorts the other triangle's vertices into ones shared with this triangle and ones unique to it. |