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(); } }
public Edge(Vertex v1, Vertex v2) { ends = new Vertex[2]; ends[0] = v1; ends[1] = v2; label = 0; faces = new FaceSet(); faces.reserve(2); }
public Edge() { ends = new Vertex[2]; ends[0] = ends[1] = null; label = 0; faces = new FaceSet(); faces.reserve(2); }
public FaceSet Clone() { FaceSet f = new FaceSet(); f.set = (object[])set.Clone(); f.n = n; f.size = size; return(f); }
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(); }