vclip
Class Vertex

java.lang.Object
  extended byvclip.Feature
      extended byvclip.Vertex

public class Vertex
extends Feature

A vertex of a polyhedron.

Author:
Brian Mirtich (C++ version), Eddy Boxerman, John E. Lloyd (Java port)
See Also:
Copyright information

Field Summary
 
Fields inherited from class vclip.Feature
EDGE, FACE, VERTEX
 
Constructor Summary
Vertex(java.lang.String name, double x, double y, double z)
          Constructs a Vertex with a given name and coordinate values.
Vertex(java.lang.String name, javax.vecmath.Point3d p)
          Constructs a Vertex with a given name and coordinates.
 
Method Summary
 javax.vecmath.Point3d getCoords()
          Gets the coordinates of this vertex.
 Feature promote(javax.vecmath.Vector3d nrm, double angtol)
           
 void setCoords(javax.vecmath.Point3d coords)
          Sets the coordinates of this vertex.
 java.lang.String toString()
          Produces a string representation of this vertex.
 
Methods inherited from class vclip.Feature
getName, getType, isHidden, setHidden, typeName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vertex

public Vertex(java.lang.String name,
              javax.vecmath.Point3d p)
Constructs a Vertex with a given name and coordinates.

Parameters:
name - vertex name
p - coordinate values

Vertex

public Vertex(java.lang.String name,
              double x,
              double y,
              double z)
Constructs a Vertex with a given name and coordinate values.

Parameters:
name - vertex name
x - the x coordinate
y - the y coordinate
z - the z coordinate
Method Detail

setCoords

public void setCoords(javax.vecmath.Point3d coords)
Sets the coordinates of this vertex.

Parameters:
coords - coordinates of this vertex

getCoords

public javax.vecmath.Point3d getCoords()
Gets the coordinates of this vertex.

Returns:
coordinates of this vertex

toString

public final java.lang.String toString()
Produces a string representation of this vertex.

Returns:
string representation

promote

public Feature promote(javax.vecmath.Vector3d nrm,
                       double angtol)
Overrides:
promote in class Feature