Пример #1
0
        public void MeshInitialize()
        {
            // store mesh data
            vertexCount = mesh.vertexCount();

            vertices = new Vector[vertexCount];
            normals  = new Vector[vertexCount];
            Vector mean = Vector.zero;

            for (int i = 0; i < vertexCount; i++)
            {
                vertices[i] = mesh.vertices[i].v;
                normals[i]  = mesh.vertices[i].normal;
                mean       += vertices[i];
            }

            wsVerts   = mesh.vertices;
            triangles = mesh.faces;
            //normals = mesh.no;


            if (vertices.Length != 0)
            {
                vertsUp = new VertexSet();
            }
            if (vertices.Length != 0)
            {
                vertsDown = new VertexSet();
            }
        }
Пример #2
0
 public Edge(Vertex v1, Vertex v2)
 {
     ends    = new Vertex[2];
     ends[0] = v1;  ends[1] = v2;
     label   = 0;
     faces   = new FaceSet();
     faces.reserve(2);
 }
Пример #3
0
 public Edge()
 {
     ends    = new Vertex[2];
     ends[0] = ends[1] = null;
     label   = 0;
     faces   = new FaceSet();
     faces.reserve(2);
 }
Пример #4
0
        public FaceSet Clone()
        {
            FaceSet f = new FaceSet();

            f.set  = (object[])set.Clone();
            f.n    = n;
            f.size = size;
            return(f);
        }
Пример #5
0
 public Vertex()
 {
     label  = 0;
     pos    = 0;
     dist   = 1e15;
     next   = null;
     edges  = new EdgeSet();
     faces  = new FaceSet();
     normal = new Vector();
     tex    = new Vector();
     n      = new Vector();
     v      = new Vector();
 }