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

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

#include <edge.h>

Collaboration diagram for dcel::Edge< 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

 Edge (Halfedge *h1, Halfedge *h2)
 Creates an instance of this class.
 ~Edge ()
 Destroys an instance of this class.
Halfedgeget_first_halfedge () const
 Returns a pointer to the first half-edge of this edge.
Halfedgeget_second_halfedge () const
 Returns a pointer to the second half-edge of this edge.
bool is_boundary_edge () const
 Returns the logic value true if this edge belongs to the boundary of the surface and the logic value false otherwise.
void set_first_halfedge (Halfedge *h)
 Assigns a given address to the pointer to the first half-edge of this edge.
void set_second_halfedge (Halfedge *h)
 Assigns a given address to the pointer to the second half-edge of this edge.
EAttrib & get_attributes ()
 Returns the set of attributes associated with this edge.

Private Attributes

Halfedge_h1
 Pointer to the first half-edge of this edge.
Halfedge_h2
 Pointer to the second half-edge of this edge.
EAttrib _attributes
 Set of attributes associated with this edge.

Detailed Description

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

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

Definition at line 72 of file edge.h.


Constructor & Destructor Documentation

template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::Edge ( Halfedge h1,
Halfedge h2 
) [inline]

Creates an instance of this class.

Parameters:
h1A pointer to one half-edge of this edge.
h2A pointer to the other half-edge of this edge.

Definition at line 104 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_first_halfedge(), and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_second_halfedge().


Member Function Documentation

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

Returns the set of attributes associated with this edge.

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

Definition at line 203 of file edge.h.

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

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

Returns a pointer to the first half-edge of this edge.

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

Definition at line 133 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1.

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

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

Returns a pointer to the second half-edge of this edge.

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

Definition at line 146 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.

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

    {
      return _h2 ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
bool dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::is_boundary_edge ( ) const [inline]

Returns the logic value true if this edge belongs to the boundary of the surface and the logic value false otherwise.

Returns:
The logic value true if this edge belongs to the boundary of the surface and the logic value false otherwise.

Definition at line 161 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1, and dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.

    {
      return ( _h1 == 0 ) || ( _h2 == 0 ) ;
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_first_halfedge ( Halfedge h) [inline]

Assigns a given address to the pointer to the first half-edge of this edge.

Parameters:
hThe address of the first half-edge of this edge.

Definition at line 175 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h1.

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

    {
      _h1 = h ; 
    }
template<typename VAttrib , typename FAttrib , typename EAttrib , typename HAttrib >
void dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::set_second_halfedge ( Halfedge h) [inline]

Assigns a given address to the pointer to the second half-edge of this edge.

Parameters:
hThe address of the second half-edge of this edge.

Definition at line 189 of file edge.h.

References dcel::Edge< VAttrib, FAttrib, EAttrib, HAttrib >::_h2.

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

    {
      _h2 = h ; 
    }

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