The Parametric Pseudo-Manifold (PPS) Library 1.0
|
This class represents a vertex (i.e., a point in ) from a triangle surface mesh represented by the DCEL data structure.
More...
#include <vertex.h>
Public Types | |
typedef dcel::Halfedge < VAttrib, FAttrib, EAttrib, HAttrib > | Halfedge |
Defines Halfedge as an alias for dcel::Halfedge< VAttrib, FAttrib , EAttrib , HAttrib >. | |
Public Member Functions | |
Vertex (double x, double y, double z, Halfedge *h) | |
Creates an instance of this class. | |
~Vertex () | |
Destroys an instance of this class. | |
double | x () const |
Returns the first Cartesian coordinate of the location of this vertex. | |
void | set_x_coord (double x) |
Assigns a value to the first Cartesian coordinate of the location to this vertex. | |
double | y () const |
Returns the second Cartesian coordinate of the location of this vertex. | |
void | set_y_coord (double y) |
Assigns a value to the second Cartesian coordinate of the location to this vertex. | |
double | z () const |
Returns the third Cartesian coordinate of the location of this vertex. | |
void | set_z_coord (double z) |
Assigns a value to the third Cartesian coordinate of the location to this vertex. | |
Halfedge * | get_halfedge () const |
Returns a pointer to a half-edge whose origin vertex is this vertex. | |
void | set_halfedge (Halfedge *h) |
Assigns an address to the halfedge pointer of this vertex. | |
VAttrib & | get_attributes () |
Returns the set of attributes associated with this vertex. | |
Private Attributes | |
double | _x |
First Cartesian coordinate of the location of this vertex. | |
double | _y |
Second Cartesian coordinate of the location of this vertex. | |
double | _z |
Third Cartesian coordinate of the location of this vertex. | |
Halfedge * | _halfedge |
Pointer to a half-edge with origin at this vertex. | |
VAttrib | _attributes |
Set of attributes associated with this vertex. |
This class represents a vertex (i.e., a point in ) from a triangle surface mesh represented by the DCEL data structure.
dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex | ( | double | x, |
double | y, | ||
double | z, | ||
Halfedge * | h | ||
) | [inline] |
Creates an instance of this class.
x | The first Cartesian coordinate of the vertex location. |
y | The second Cartesian coordinate of the vertex location. |
z | The third Cartesian coordinate of the vertex location. |
h | A pointer to a half-edge with origin at this vertex. |
Definition at line 108 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_halfedge(), dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_x_coord(), dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_y_coord(), and dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_z_coord().
{ set_x_coord( x ) ; set_y_coord( y ) ; set_z_coord( z ) ; set_halfedge( h ) ; }
VAttrib & dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::get_attributes | ( | ) | [inline] |
Returns the set of attributes associated with this vertex.
Definition at line 261 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_attributes.
{ return _attributes ; }
Halfedge * dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::get_halfedge | ( | ) | const [inline] |
Returns a pointer to a half-edge whose origin vertex is this vertex.
Definition at line 233 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_halfedge.
{ return _halfedge ; }
void dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_halfedge | ( | Halfedge * | h | ) | [inline] |
Assigns an address to the halfedge pointer of this vertex.
h | The address of a halfedge with origin at this vertex. |
Definition at line 246 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_halfedge.
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex(), and dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::~Vertex().
{ _halfedge = h ; }
void dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_x_coord | ( | double | x | ) | [inline] |
Assigns a value to the first Cartesian coordinate of the location to this vertex.
x | The value to be assigned to the first Cartesian coordinate of the location to this vertex. |
Definition at line 158 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_x, and dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::x().
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex().
void dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_y_coord | ( | double | y | ) | [inline] |
Assigns a value to the second Cartesian coordinate of the location to this vertex.
y | The value to be assigned to the second Cartesian coordinate of the location to this vertex. |
Definition at line 188 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_y, and dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::y().
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex().
void dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_z_coord | ( | double | z | ) | [inline] |
Assigns a value to the third Cartesian coordinate of the location to this vertex.
z | The value to be assigned to the third Cartesian coordinate of the location to this vertex. |
Definition at line 218 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_z, and dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::z().
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex().
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::x | ( | ) | const [inline] |
Returns the first Cartesian coordinate of the location of this vertex.
Definition at line 143 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_x.
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_x_coord().
{ return _x ; }
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::y | ( | ) | const [inline] |
Returns the second Cartesian coordinate of the location of this vertex.
Definition at line 173 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_y.
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_y_coord().
{ return _y ; }
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::z | ( | ) | const [inline] |
Returns the third Cartesian coordinate of the location of this vertex.
Definition at line 203 of file vertex.h.
References dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::_z.
Referenced by dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_z_coord().
{ return _z ; }