public SoftwareEdge(int index, SoftwareVertex vertex1, SoftwareVertex vertex2) { Index = index; Verticies = new SoftwareVertex[2] { vertex1, vertex2 }; Triangles = new List <SoftwareTriangle>(); }
public SoftwareTriangle(int index, SoftwareVertex vertex1, SoftwareVertex vertex2, SoftwareVertex vertex3) { Index = index; Verticies = new SoftwareVertex[3] {vertex1, vertex2, vertex3}; vertex1.Triangles.Add(this); vertex2.Triangles.Add(this); vertex3.Triangles.Add(this); vertex1.TraingleIndex.Add(0); vertex2.TraingleIndex.Add(1); vertex3.TraingleIndex.Add(2); }
public SoftwareTriangle(int index, SoftwareVertex vertex1, SoftwareVertex vertex2, SoftwareVertex vertex3) { Index = index; Verticies = new SoftwareVertex[3] { vertex1, vertex2, vertex3 }; vertex1.Triangles.Add(this); vertex2.Triangles.Add(this); vertex3.Triangles.Add(this); vertex1.TraingleIndex.Add(0); vertex2.TraingleIndex.Add(1); vertex3.TraingleIndex.Add(2); }
public VertexProcessor(SoftwareVertex vertex, Vector4[] colors, Vector3[] normals, Vector2[] uvs, HardwareMeshProcessor mesh) { Positions = new Vector3[mesh.positions.Count]; for (int i = 0; i != Positions.Length; ++i) { Positions[i] = mesh.positions[i][vertex.Index]; } Colors = colors; Normals = normals; UVs = uvs; mesh.Verticies.AddLast(this); }
public SoftwareEdge(int index, SoftwareVertex vertex1, SoftwareVertex vertex2) { Index = index; Verticies = new SoftwareVertex[2] {vertex1, vertex2}; Triangles = new List<SoftwareTriangle>(); }