HEVertex< T > Class Template Reference

#include <TAPsHEVertex.hpp>

List of all members.

Public Member Functions

void Delete ()
Vector3< T > const & GetNormal () const
Vector3< T > const & GetPosition () const
Vector3< T > & GetProtectedNormal ()
Vector3< T > & GetProtectedPosition ()
 HEVertex (T position[3], T normal[3], HEHalfEdge< T > *const incidentHalfEdge=NULL)
 HEVertex (T position[3], HEHalfEdge< T > *const incidentHalfEdge=NULL)
 HEVertex (Vector3< T > position, HEHalfEdge< T > *const incidentHalfEdge=NULL)
 HEVertex (Vector3< T > position, Vector3< T > normal, HEHalfEdge< T > *const incidentHalfEdge=NULL)
 HEVertex (T x, T y, T z, T u, T v, T w, HEHalfEdge< T > *const incidentHalfEdge=NULL)
void IncidentHalfEdge (HEHalfEdge< T > *const incidentHalfEdge)
HEHalfEdge< T > * IncidentHalfEdge () const
HEVertex< T > * Insert (HEVertex< T > *const n)
void Next (HEVertex< T > *const v)
HEVertex< T > * Next () const
T const & operator[] (int i) const
T & operator[] (int i)
void Prev (HEVertex< T > *const v)
HEVertex< T > * Prev () const
HEVertex< T > * Remove ()
void SetNormal (T x, T y, T z)
void SetNormal (Vector3< T > const &normal)
void SetPosition (T x, T y, T z)
void SetPosition (Vector3< T > const &position)
HEVertex< T > * Splice (HEVertex< T > *const n)
virtual ~HEVertex ()

Protected Attributes

Vector3< T > m_vNormal
 normal vector
Vector3< T > m_vPosition
 position vector
HEHalfEdge< T > * nIncidentHalfEdge
 incident half-edge
HEVertex< T > * nNext
 next vertex in a doubly linked list
HEVertex< T > * nPrev
 previous vertex in a doubly linked list

Private Member Functions

 HEVertex (HEVertex< T > const &v)

Friends

std::ostream & operator<< (std::ostream &output, HEVertex< T > const &v)


Detailed Description

template<typename T>
class HEVertex< T >

Definition at line 30 of file TAPsHEVertex.hpp.


Constructor & Destructor Documentation

template<typename T>
BEGIN_NAMESPACE_TAPs HEVertex< T >::HEVertex ( x,
y,
z,
u,
v,
w,
HEHalfEdge< T > *const   incidentHalfEdge = NULL 
) [inline]

Definition at line 28 of file TAPsHEVertex.cpp.

00033     : 
00034 #ifdef  TAPs_USE_DATA_POOL
00035       m_paPosition( pPosition ),
00036       m_paNormal( pNormal ),
00037 #else //TAPs_USE_DATA_POOL
00038       m_vPosition( x, y, z ),
00039       m_vNormal( u, v, w ),
00040 #endif//TAPs_USE_DATA_POOL
00041       nIncidentHalfEdge( incidentHalfEdge ),
00042       nPrev( NULL ),
00043       nNext( NULL )
00044 {
00045 #ifdef  TAPs_USE_DATA_POOL
00046     m_paPosition[0] = x;
00047     m_paPosition[1] = y;
00048     m_paPosition[2] = z;
00049     m_paNormal[0] = u;
00050     m_paNormal[1] = v;
00051     m_paNormal[2] = w;
00052 #endif//TAPs_USE_DATA_POOL
00053 }

template<typename T>
HEVertex< T >::HEVertex ( Vector3< T >  position,
Vector3< T >  normal,
HEHalfEdge< T > *const   incidentHalfEdge = NULL 
) [inline]

Definition at line 56 of file TAPsHEVertex.cpp.

00061     : 
00062 #ifdef  TAPs_USE_DATA_POOL
00063       m_paPosition( pPosition ),
00064       m_paNormal( pNormal ),
00065 #else //TAPs_USE_DATA_POOL
00066       m_vPosition( position ),
00067       m_vNormal( normal ),
00068 #endif//TAPs_USE_DATA_POOL
00069       nIncidentHalfEdge( incidentHalfEdge ),
00070       nPrev( NULL ),
00071       nNext( NULL )
00072 {
00073 #ifdef  TAPs_USE_DATA_POOL
00074     m_paPosition[0] = position[0];
00075     m_paPosition[1] = position[1];
00076     m_paPosition[2] = position[2];
00077     m_paNormal[0] = normal[0];
00078     m_paNormal[1] = normal[1];
00079     m_paNormal[2] = normal[2];
00080 #endif//TAPs_USE_DATA_POOL
00081 }

template<typename T>
HEVertex< T >::HEVertex ( Vector3< T >  position,
HEHalfEdge< T > *const   incidentHalfEdge = NULL 
) [inline]

Definition at line 84 of file TAPsHEVertex.cpp.

00089     : 
00090 #ifdef  TAPs_USE_DATA_POOL
00091       m_paPosition( v.m_paPosition ),
00092       m_paNormal( v.m_paNormal ),
00093 #else //TAPs_USE_DATA_POOL
00094       m_vPosition( position ),
00095       m_vNormal(),
00096 #endif//TAPs_USE_DATA_POOL
00097       nIncidentHalfEdge( incidentHalfEdge ),
00098       nPrev( NULL ),
00099       nNext( NULL )
00100 {
00101 #ifdef  TAPs_USE_DATA_POOL
00102     m_paPosition[0] = position[0];
00103     m_paPosition[1] = position[1];
00104     m_paPosition[2] = position[2];
00105     m_paNormal[0] = m_paNormal[1] = m_paNormal[2] = T(0);
00106 #endif//TAPs_USE_DATA_POOL
00107 }

template<typename T>
HEVertex< T >::HEVertex ( position[3],
HEHalfEdge< T > *const   incidentHalfEdge = NULL 
) [inline]

Definition at line 110 of file TAPsHEVertex.cpp.

00115     : 
00116 #ifdef  TAPs_USE_DATA_POOL
00117       m_paPosition( v.m_paPosition ),
00118       m_paNormal( v.m_paNormal ),
00119 #else //TAPs_USE_DATA_POOL
00120       m_vPosition( a[0], a[1], a[2] ),
00121       m_vNormal(),
00122 #endif//TAPs_USE_DATA_POOL
00123       nIncidentHalfEdge( incidentHalfEdge ),
00124       nPrev( NULL ),
00125       nNext( NULL )
00126 {
00127 #ifdef  TAPs_USE_DATA_POOL
00128     m_paPosition[0] = a[0];
00129     m_paPosition[1] = a[1];
00130     m_paPosition[2] = a[2];
00131     m_paNormal[0] = m_paNormal[1] = m_paNormal[2] = T(0);
00132 #endif//TAPs_USE_DATA_POOL
00133 }

template<typename T>
HEVertex< T >::HEVertex ( position[3],
normal[3],
HEHalfEdge< T > *const   incidentHalfEdge = NULL 
) [inline]

Definition at line 136 of file TAPsHEVertex.cpp.

00141     : 
00142 #ifdef  TAPs_USE_DATA_POOL
00143       m_paPosition( v.m_paPosition ),
00144       m_paNormal( v.m_paNormal ),
00145 #else //TAPs_USE_DATA_POOL
00146       m_vPosition( a[0], a[1], a[2] ),
00147       m_vNormal( b[0], b[1], b[2] ),
00148 #endif//TAPs_USE_DATA_POOL
00149       nIncidentHalfEdge( incidentHalfEdge ),
00150       nPrev( NULL ),
00151       nNext( NULL )
00152 {
00153 #ifdef  TAPs_USE_DATA_POOL
00154     m_paPosition[0] = a[0];
00155     m_paPosition[1] = a[1];
00156     m_paPosition[2] = a[2];
00157     m_paNormal[0] = b[0];
00158     m_paNormal[1] = b[1];
00159     m_paNormal[2] = b[2];
00160 #endif//TAPs_USE_DATA_POOL
00161 }

template<typename T>
HEVertex< T >::HEVertex ( HEVertex< T > const &  v  )  [inline, private]

Definition at line 164 of file TAPsHEVertex.cpp.

00165     : 
00166 #ifdef  TAPs_USE_DATA_POOL
00167       m_paPosition( v.m_paPosition ),
00168       m_paNormal( v.m_paNormal ),
00169 #else //TAPs_USE_DATA_POOL
00170       m_vPosition( v.m_vPosition ),
00171       m_vNormal( v.m_vNormal ),
00172 #endif//TAPs_USE_DATA_POOL
00173       nIncidentHalfEdge( v.nIncidentHalfEdge ),
00174       nPrev( v.nPrev ),
00175       nNext( v.nNext )
00176 {}

template<typename T>
HEVertex< T >::~HEVertex (  )  [inline, virtual]

Definition at line 179 of file TAPsHEVertex.cpp.

00180 {}  


Member Function Documentation

template<typename T>
void HEVertex< T >::Delete (  )  [inline]

Definition at line 236 of file TAPsHEVertex.cpp.

00237 {
00238     delete Remove();
00239 }

template<typename T>
Vector3<T> const& HEVertex< T >::GetNormal (  )  const [inline]

Definition at line 132 of file TAPsHEVertex.hpp.

00132 { return m_vNormal; }

template<typename T>
Vector3<T> const& HEVertex< T >::GetPosition (  )  const [inline]

Definition at line 127 of file TAPsHEVertex.hpp.

00127 { return m_vPosition; }

template<typename T>
Vector3<T>& HEVertex< T >::GetProtectedNormal (  )  [inline]

Definition at line 133 of file TAPsHEVertex.hpp.

00133 { return m_vNormal; }

template<typename T>
Vector3<T>& HEVertex< T >::GetProtectedPosition (  )  [inline]

Definition at line 128 of file TAPsHEVertex.hpp.

00128 { return m_vPosition; }

template<typename T>
void HEVertex< T >::IncidentHalfEdge ( HEHalfEdge< T > *const   incidentHalfEdge  )  [inline]

Definition at line 140 of file TAPsHEVertex.hpp.

00141     { nIncidentHalfEdge = incidentHalfEdge; }

template<typename T>
HEHalfEdge<T>* HEVertex< T >::IncidentHalfEdge (  )  const [inline]

Definition at line 138 of file TAPsHEVertex.hpp.

00139     { return nIncidentHalfEdge; }

template<typename T>
HEVertex< T > * HEVertex< T >::Insert ( HEVertex< T > *const   n  )  [inline]

Definition at line 211 of file TAPsHEVertex.cpp.

00212 {
00213     HEVertex<T> *c = nNext;
00214     n->nNext = c;
00215     n->nPrev = this;
00216     nNext    = n;
00217     c->nPrev = n;
00218     return n;
00219 }

template<typename T>
void HEVertex< T >::Next ( HEVertex< T > *const   v  )  [inline]

Definition at line 151 of file TAPsHEVertex.hpp.

00151 { nNext = v; }

template<typename T>
HEVertex<T>* HEVertex< T >::Next (  )  const [inline]

Definition at line 149 of file TAPsHEVertex.hpp.

00149 { return nNext; }

template<typename T>
T const & HEVertex< T >::operator[] ( int  i  )  const [inline]

Definition at line 197 of file TAPsHEVertex.cpp.

00198 {   
00199     //assert( 0 <= i && i < 3 );
00200 #ifdef  TAPs_USE_DATA_POOL
00201     return m_paPosition[i];
00202 #else //TAPs_USE_DATA_POOL
00203     return m_vPosition[i];
00204 #endif//TAPs_USE_DATA_POOL
00205 }

template<typename T>
T & HEVertex< T >::operator[] ( int  i  )  [inline]

Definition at line 186 of file TAPsHEVertex.cpp.

00187 {   
00188     //assert( 0 <= i && i < 3 );
00189 #ifdef  TAPs_USE_DATA_POOL
00190     return m_paPosition[i];
00191 #else //TAPs_USE_DATA_POOL
00192     return m_vPosition[i];
00193 #endif//TAPs_USE_DATA_POOL
00194 }

template<typename T>
void HEVertex< T >::Prev ( HEVertex< T > *const   v  )  [inline]

Definition at line 150 of file TAPsHEVertex.hpp.

00150 { nPrev = v; }

template<typename T>
HEVertex<T>* HEVertex< T >::Prev (  )  const [inline]

Definition at line 148 of file TAPsHEVertex.hpp.

00148 { return nPrev; }

template<typename T>
HEVertex< T > * HEVertex< T >::Remove (  )  [inline]

Definition at line 222 of file TAPsHEVertex.cpp.

00223 {
00224     if ( nPrev ) {
00225         nPrev->nNext = nNext;
00226         nPrev = NULL;
00227     }
00228     if ( nNext ) {
00229         nNext->nPrev = nPrev;
00230         nNext = NULL;
00231     }
00232     return this;
00233 }

template<typename T>
void HEVertex< T >::SetNormal ( x,
y,
z 
) [inline]

Definition at line 131 of file TAPsHEVertex.hpp.

00131 { m_vNormal.SetXYZ( x, y, z ); }

template<typename T>
void HEVertex< T >::SetNormal ( Vector3< T > const &  normal  )  [inline]

Definition at line 130 of file TAPsHEVertex.hpp.

00130 { m_vNormal = normal; }

template<typename T>
void HEVertex< T >::SetPosition ( x,
y,
z 
) [inline]

Definition at line 126 of file TAPsHEVertex.hpp.

00126 { m_vPosition.SetXYZ( x, y, z ); }

template<typename T>
void HEVertex< T >::SetPosition ( Vector3< T > const &  position  )  [inline]

Definition at line 125 of file TAPsHEVertex.hpp.

00125 { m_vPosition = position; }

template<typename T>
HEVertex< T > * HEVertex< T >::Splice ( HEVertex< T > *const   n  )  [inline]

Definition at line 242 of file TAPsHEVertex.cpp.

00243 {
00244     HEVertex<T> *a  = this;
00245     HEVertex<T> *an = a->nNext;
00246     HEVertex<T> *bn = b->nNext;
00247     a->nNext = bn;
00248     b->nNext = an;
00249     an->nPrev = b;
00250     bn->nPrev = a;
00251 }


Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  output,
HEVertex< T > const &  v 
) [friend]

Definition at line 56 of file TAPsHEVertex.hpp.

00057     {
00058         output  << "HEVertex<" << typeid(T).name() << ">( "
00059                 << " with Position:" << v.GetPosition()
00060                 << " Normal:" << v.GetNormal()
00061                 << " and Incident Edge:" << v.nIncidentHalfEdge;
00062         return output;
00063     }


Member Data Documentation

template<typename T>
Vector3<T> HEVertex< T >::m_vNormal [protected]

normal vector

Definition at line 40 of file TAPsHEVertex.hpp.

template<typename T>
Vector3<T> HEVertex< T >::m_vPosition [protected]

position vector

Definition at line 39 of file TAPsHEVertex.hpp.

template<typename T>
HEHalfEdge<T>* HEVertex< T >::nIncidentHalfEdge [protected]

incident half-edge

Definition at line 43 of file TAPsHEVertex.hpp.

template<typename T>
HEVertex<T>* HEVertex< T >::nNext [protected]

next vertex in a doubly linked list

Definition at line 45 of file TAPsHEVertex.hpp.

template<typename T>
HEVertex<T>* HEVertex< T >::nPrev [protected]

previous vertex in a doubly linked list

Definition at line 44 of file TAPsHEVertex.hpp.


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

Generated on Mon Oct 13 11:45:03 2008 for TAPs by  doxygen 1.5.6