The Parametric Pseudo-Manifold (PPS) Library 1.0
dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib > Class Template Reference

This class represents a vertex (i.e., a point in $R^3$) from a triangle surface mesh represented by the DCEL data structure. More...

#include <vertex.h>

Collaboration diagram for dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >:

List of all members.

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.
Halfedgeget_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.

Detailed Description

template<typename VAttrib, typename FAttrib, typename EAttrib, typename HAttrib>
class dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >

This class represents a vertex (i.e., a point in $R^3$) from a triangle surface mesh represented by the DCEL data structure.

Definition at line 72 of file vertex.h.


Constructor & Destructor Documentation

template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::Vertex ( double  x,
double  y,
double  z,
Halfedge h 
) [inline]

Creates an instance of this class.

Parameters:
xThe first Cartesian coordinate of the vertex location.
yThe second Cartesian coordinate of the vertex location.
zThe third Cartesian coordinate of the vertex location.
hA 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 ) ;
    }

Member Function Documentation

template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
VAttrib & dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::get_attributes ( ) [inline]

Returns the set of attributes associated with this vertex.

Returns:
A reference to 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 ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Halfedge * dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::get_halfedge ( ) const [inline]

Returns a pointer to a half-edge whose origin vertex is this vertex.

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 ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::set_halfedge ( Halfedge h) [inline]

Assigns an address to the halfedge pointer of this vertex.

Parameters:
hThe 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 ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
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.

Parameters:
xThe 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().

    {
      _x = x ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
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.

Parameters:
yThe 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().

    {
      _y = y ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
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.

Parameters:
zThe 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().

    {
      _z = z ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::x ( ) const [inline]

Returns the first Cartesian coordinate of the location of this vertex.

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 ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::y ( ) const [inline]

Returns the second Cartesian coordinate of the location of this vertex.

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 ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
double dcel::Vertex< VAttrib, FAttrib, EAttrib, HAttrib >::z ( ) const [inline]

Returns the third Cartesian coordinate of the location of this vertex.

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 ;
    }

The documentation for this class was generated from the following file: