Question about triangles and vectors,Question about getting triangle pairs from a mesh
Hello, currently i'm using unity to develop a game in c#... Basically i have 2 triangles with random positions in a 3d space... These triangles have and index and array of their vertices positions, so...
public class Triangle
{
public int index;
public Vector3[] _transform = new Vector3[3];
}
when i create the 2 triangle objects i would like to check if they are neighbours, meaning if they have 2 vertices in commun, then i would like to save their indexes and the 2 coincident points so...
public class TriPairs
{
public Vector2Int pair;
public Vector3[] points = new Vector3[2];
}
i tried making a nested for loop for comparison but it just increases in complexity when trying to compare and extract the points, any ideas? Thanks in advance
Your answer
Follow this Question
Related Questions
Why built-in Plane has so many tris? 3 Answers
Triangles become black when flipping triangles 0 Answers
Triangles for sphere 0 Answers
Seperating isolated triangles into mesh 0 Answers
How to correctly assign triangles to a "Procedural Mesh" 4 Answers