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

This class represents a half-edge (i.e., an oriented line segment) from a triangle surface mesh represented by the DCEL data structure. More...

#include <halfedge.h>

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

List of all members.

Public Types

typedef dcel::Vertex< VAttrib,
FAttrib, EAttrib, HAttrib > 
Vertex
 Defines Vertex as an alias for dcel::Vertex< VAttrib, FAttrib , EAttrib , HAttrib >.
typedef dcel::Edge< VAttrib,
FAttrib, EAttrib, HAttrib > 
Edge
 Defines Edge as an alias for dcel::Edge< VAttrib, FAttrib , EAttrib , HAttrib >.
typedef dcel::Face< VAttrib,
FAttrib, EAttrib, HAttrib > 
Face
 Defines Face as an alias for dcel::Face< VAttrib, FAttrib , EAttrib , HAttrib >.

Public Member Functions

 Halfedge (Vertex *vertex, Edge *edge, Face *face, Halfedge *next, Halfedge *prev)
 Creates an instance of this class.
 ~Halfedge ()
 Destroys an instance of this class.
Vertexget_origin () const
 Returns a pointer to the origin vertex of this half-edge.
void set_origin (Vertex *vertex)
 Assigns an address to the pointer to the origin vertex of this half-edge.
Edgeget_edge () const
 Returns a pointer to the edge this half-edge belongs to.
void set_edge (Edge *edge)
 Assigns an address to the pointer to the edge this half-edge belongs to.
Faceget_face () const
 Returns a pointer to the face whose half-edge cycle this half-edge belongs to.
void set_face (Face *face)
 Assigns an address to the pointer to the face whose half-edge cycle this half-edge belongs to.
Halfedgeget_next () const
 Returns a pointer to the next half-edge in the half-edge cycle this half-edge belongs to.
void set_next (Halfedge *next)
 Assigns an address to the pointer to the next half-edge in the face half-edge cycle this half-edge belongs to.
Halfedgeget_prev () const
 Returns a pointer to the previous half-edge in the half-edge cycle this half-edge belongs to.
void set_prev (Halfedge *prev)
 Assigns an address to the pointer to the previous half-edge in the face half-edge cycle this half-edge belongs to.
Halfedgeget_mate () const
 Returns a pointer to the mate of this half-edge (if any).
HAttrib & get_attributes ()
 Returns the set of attributes associated with this halfedge.

Private Attributes

Vertex_vertex
 Pointer to the origin vertex of this half-edge.
Edge_edge
 Pointer to the edge this half-edge belongs to.
Face_face
 Pointer to the face whose half-edge cycle this half-edge belongs to.
Halfedge_next
 Pointer to the next half-edge in the cycle this half-edge belongs to.
Halfedge_prev
 Pointer to the previous half-edge in the cycle this half-edge belongs to.
HAttrib _attributes
 Set of attributes associated with this halfedge.

Detailed Description

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

This class represents a half-edge (i.e., an oriented line segment) from a triangle surface mesh represented by the DCEL data structure.

Definition at line 75 of file halfedge.h.


Constructor & Destructor Documentation

template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge ( Vertex vertex,
Edge edge,
Face face,
Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > *  next,
Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > *  prev 
) [inline]

Creates an instance of this class.

Parameters:
vertexA pointer to the origin vertex of this halfedge.
edgeA pointer to the edge this halfedge belongs to.
faceA pointer to the face whose half-edge cycle this halfedge belongs to.
nextA pointer to the next halfedge in the half-edge cycle containing this halfedge.
prevA pointer to the previous halfedge in the half-edge cycle containing this halfedge.

Definition at line 128 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_edge(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_face(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_next(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_origin(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_prev().

    {
      set_origin( vertex ) ;
      set_edge( edge ) ;
      set_face( face ) ;
      set_next( next ) ;
      set_prev( prev ) ;
    }

Member Function Documentation

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

Returns the set of attributes associated with this halfedge.

Returns:
A reference to the set of attributes associated with this halfedge.

Definition at line 331 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_attributes.

    {
      return _attributes ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Edge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_edge ( ) const [inline]

Returns a pointer to the edge this half-edge belongs to.

Returns:
A pointer to the edge this half-edge belongs to.

Definition at line 195 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_edge.

Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().

    {
      return _edge ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Face * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_face ( ) const [inline]

Returns a pointer to the face whose half-edge cycle this half-edge belongs to.

Returns:
A pointer to the face whose half-edge cycle this half-edge belongs to.

Definition at line 224 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_face.

Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().

    {
      return _face ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_mate ( ) const [inline]
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_next ( ) const [inline]

Returns a pointer to the next half-edge in the half-edge cycle this half-edge belongs to.

Returns:
A pointer to the next half-edge in the half-edge cycle this half-edge belongs to.

Definition at line 254 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_next.

Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().

    {
      return _next ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Vertex * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_origin ( ) const [inline]

Returns a pointer to the origin vertex of this half-edge.

Returns:
A pointer to the origin vertex of this half-edge.

Definition at line 167 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_vertex.

Referenced by ppsfrompnt::HalfedgeAttribute::compute_pps_id(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().

    {
      return _vertex ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
Halfedge * dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::get_prev ( ) const [inline]

Returns a pointer to the previous half-edge in the half-edge cycle this half-edge belongs to.

Returns:
A pointer to the previous half-edge in the half-edge cycle this half-edge belongs to.

Definition at line 284 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_prev.

Referenced by ppsfrompnt::HalfedgeAttribute::compute_origin_vertex_degree(), ppsfrompnt::HalfedgeAttribute::compute_pps_id(), and dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::is_consistent().

    {
      return _prev ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_edge ( Edge edge) [inline]

Assigns an address to the pointer to the edge this half-edge belongs to.

Parameters:
edgeThe address of the edge this half-edge belongs to.

Definition at line 209 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_edge.

Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().

    {
      _edge = edge ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_face ( Face face) [inline]

Assigns an address to the pointer to the face whose half-edge cycle this half-edge belongs to.

Parameters:
faceThe address of the face whose half-edge cycle this half-edge belongs to.

Definition at line 239 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_face.

Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().

    {
      _face = face ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_next ( Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > *  next) [inline]

Assigns an address to the pointer to the next half-edge in the face half-edge cycle this half-edge belongs to.

Parameters:
nextThe address of the next half-edge in the face half-edge cycle this half-edge belongs to.

Definition at line 269 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_next.

Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::create_faces(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().

    {
      _next = next ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_origin ( Vertex vertex) [inline]

Assigns an address to the pointer to the origin vertex of this half-edge.

Parameters:
vertexThe address of the origin vertex of this half-edge.

Definition at line 182 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_vertex.

Referenced by dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().

    {
      _vertex = vertex ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::set_prev ( Halfedge< VAttrib, FAttrib, EAttrib, HAttrib > *  prev) [inline]

Assigns an address to the pointer to the previous half-edge in the face half-edge cycle this half-edge belongs to.

Parameters:
prevThe address of the previous half-edge in the face half-edge cycle this half-edge belongs to.

Definition at line 300 of file halfedge.h.

References dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::_prev.

Referenced by dcel::Surface< VAttrib, FAttrib, EAttrib, HAttrib >::create_faces(), dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::Halfedge(), and dcel::Halfedge< VAttrib, FAttrib, EAttrib, HAttrib >::~Halfedge().

    {
      _prev = prev ; 
    }

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