public void Copy(DMesh3 copy, bool bNormals = true, bool bColors = true, bool bUVs = true) { vertices = new DVector <double>(copy.vertices); normals = (bNormals && copy.normals != null) ? new DVector <float>(copy.normals) : null; colors = (bColors && copy.colors != null) ? new DVector <float>(copy.colors) : null; uv = (bUVs && copy.uv != null) ? new DVector <float>(copy.uv) : null; vertices_refcount = new RefCountVector(copy.vertices_refcount); vertex_edges = new DVector <List <int> >(copy.vertex_edges); int N = vertex_edges.Length; for (int i = 0; i < N; ++i) { if (vertices_refcount.isValid(i)) { vertex_edges[i] = new List <int>(copy.vertex_edges[i]); } else { vertex_edges[i] = null; } } triangles = new DVector <int>(copy.triangles); triangle_edges = new DVector <int>(copy.triangle_edges); triangles_refcount = new RefCountVector(copy.triangles_refcount); if (copy.triangle_groups != null) { triangle_groups = new DVector <int>(copy.triangle_groups); } edges = new DVector <int>(copy.edges); edges_refcount = new RefCountVector(copy.edges_refcount); }
public bool IsEdge(int eID) { return(edges_refcount.isValid(eID)); }
public bool IsVertex(int vID) { return(vertices_refcount.isValid(vID)); }
public bool IsTriangle(int tID) { return(triangles_refcount.isValid(tID)); }