//-----------------------------------OVERRIDES----------------------------------// /** * Clones the vertex object * * @return cloned vertex object */ public Vertex Clone() { Vertex clone = new Vertex(); clone.x = x; clone.y = y; clone.z = z; clone.color = color.Clone(); clone.status = status; clone.adjacentVertices = new List <Vertex>(); for (int i = 0; i < adjacentVertices.Count; i++) { clone.adjacentVertices.Add(adjacentVertices[i].Clone()); } return(clone); }
/** * Constructs a vertex with definite status * * @param position vertex position * @param color vertex color * @param status vertex status - UNKNOWN, BOUNDARY, INSIDE or OUTSIDE */ public Vertex(Point3d position, Color3f color, int status) { this.color = color.Clone(); x = position.x; y = position.y; z = position.z; adjacentVertices = new List <Vertex>(); this.status = status; }
/** * Constructs a vertex with unknown status * * @param x coordinate on the x axis * @param y coordinate on the y axis * @param z coordinate on the z axis * @param color vertex color */ public Vertex(double x, double y, double z, Color3f color) { this.color = color.Clone(); this.x = x; this.y = y; this.z = z; adjacentVertices = new List <Vertex>(); status = UNKNOWN; }
//----------------------------------CONSTRUCTORS--------------------------------// /** * Constructs a vertex with unknown status * * @param position vertex position * @param color vertex color */ public Vertex(Point3d position, Color3f color) { this.color = color.Clone(); x = position.x; y = position.y; z = position.z; adjacentVertices = new List <Vertex>(); status = UNKNOWN; }
/** * Constructs a vertex with a definite status * * @param x coordinate on the x axis * @param y coordinate on the y axis * @param z coordinate on the z axis * @param color vertex color * @param status vertex status - UNKNOWN, BOUNDARY, INSIDE or OUTSIDE */ public Vertex(double x, double y, double z, Color3f color, int status) { this.color = color.Clone(); this.x = x; this.y = y; this.z = z; adjacentVertices = new List <Vertex>(); this.status = status; }