예제 #1
0
 public SoftwareEdge(int index, SoftwareVertex vertex1, SoftwareVertex vertex2)
 {
     Index     = index;
     Verticies = new SoftwareVertex[2] {
         vertex1, vertex2
     };
     Triangles = new List <SoftwareTriangle>();
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
        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 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);
        }
예제 #6
0
 public SoftwareEdge(int index, SoftwareVertex vertex1, SoftwareVertex vertex2)
 {
     Index = index;
     Verticies = new SoftwareVertex[2] {vertex1, vertex2};
     Triangles = new List<SoftwareTriangle>();
 }