Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Vertex Class Reference

Holds information about a Vertex. More...

#include <Vertex.h>

Inheritance diagram for Vertex::

Point List of all members.

Public Methods

 Vertex (float x, float y, float z, float w=1.0)
 Constructor. More...

GLfloat getDistance ()
 Get the distance of the Vertex to its neighbors' average plane.

bool isCorner ()
 Returns corner boolean.

GLvoid isCorner (bool b)
 Sets corner boolean.

GLvoid addNeighbor (Vertex *v)
 Add a Vertex to the list of neighboring Verticies.

GLvoid addTriangle (Triangle *t)
 Add a Triangle to the list of member Triangles.

bool removeNeighbor (Vertex *v)
 Remove a Vertex from the list of neighboring Vertices.

bool removeTriangle (Triangle *t)
 Remove a Triangle from the list of member Triangles.

GLvoid setColor (Color *c)
 Set the Color of this Vertex.

GLvoid setNormal (Normal *n)
 Set the Normal of this Vertex.

bool replace (Vertex *v1, Vertex *v2)
 Replace the Vertex v1 in the list of neigbors with Vertex v2.

bool contains (Vertex *v)
 See if Vertex v is a member of the list of neighbors for this Vertex.

bool contains (Triangle *t)
 See if Triangle t is a member of the list of triangles for this Vertex.

ColorgetColor ()
 Get the Color of the Vertex.

NormalgetNormal ()
 Get the Normal of the Vertex.

std::set< Triangle *> * getTriangles ()
 Get the list of Triangles this Vertex is a member of.

std::set< Vertex *> * getNeighbors ()
 Get the list of Vertices with are neighbors of this Vertex.

std::string toString ()
 Show key information about this Vertex in string form.

GLint getID ()
 Get the ID of this Vertex.

GLvoid setID (GLint id)
 Set the ID of this Vertex.

std::set< Triangle *> * getSharedTriangles (Vertex *v)
 Returns the Triangles (always two) shared by this Vertex and v (passed).


Detailed Description

Holds information about a Vertex.


Constructor & Destructor Documentation

Vertex::Vertex float    x,
float    y,
float    z,
float    w = 1.0
 

Constructor.

Parameters:
x  The x coordinate of the Vertex
y  The y coordinate of the Vertex
z  The z coordinate of the Vertex
w  The w coordinate (space) of the Vertex (should remain 1.0 - need to normalize if not)


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 00:16:49 2001 for Mesh Decimation by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001