#include <TAPsHEFace.hpp>
Public Member Functions | |
| void | AppendTexCoord (T s, T t) |
| int | CountNumberOfVertices () const |
| void | Delete () |
| std::vector< Vector3< T > > | GetCopyOfVertexPositions (int i) const |
| std::vector< Vector3< T > > | GetCopyOfVertexPositions () const |
| Vector3< T > const & | GetNormal () const |
| int | GetNoTexCoords () const |
| int | GetNumTexCoords () const |
| std::vector< HEVertex< T > const *const > | GetPtrsToVertices (int i) const |
| std::vector< HEVertex< T > *const > | GetPtrsToVertices (int i) |
| std::vector< HEVertex< T > const *const > | GetPtrsToVertices () const |
| std::vector< HEVertex< T > *const > | GetPtrsToVertices () |
| std::vector< HEVertex< T > const *const > | GetPtrsToVerticesAndNumberOfVertices (int &numberOfVertices) const |
| std::vector< HEVertex< T > *const > | GetPtrsToVerticesAndNumberOfVertices (int &numberOfVertices) |
| void | GetTexCoordHalfNo (int i, T &v) const |
| T | GetTexCoordHalfNo (int i) const |
| void | GetTexCoordNo (int i, T &s, T &t) const |
| void | GetTexCoordNoS (int i, T &s) const |
| T | GetTexCoordNoS (int i) const |
| void | GetTexCoordNoT (int i, T &t) const |
| T | GetTexCoordNoT (int i) const |
| HEFace (HEFace< T > const &he) | |
| HEFace (HEHalfEdge< T > *const incidentHalfEdge) | |
| HEFace (Vector3< T > normal=Vector3< T >()) | |
| HEHalfEdge< T > * | IncidentHalfEdge () const |
| void | IncidentHalfEdge (HEHalfEdge< T > *const incidentHalfEdge) |
| HEFace< T > * | Insert (HEFace< T > *const n) |
| void | InsertTexCoordNo (int i, T s, T t) |
| void | Next (HEFace< T > *const v) |
| HEFace< T > * | Next () const |
| void | Prev (HEFace< T > *const v) |
| HEFace< T > * | Prev () const |
| HEFace< T > * | Remove () |
| void | RemoveTexCoordNo (int i) |
| void | SetNormal (T x, T y, T z) |
| void | SetNormal (Vector3< T > normal) |
| void | SetTexCoordHalfNo (int i, T v) |
| void | SetTexCoordNo (int i, T s, T t) |
| void | SetTexCoordNoS (int i, T s) |
| void | SetTexCoordNoT (int i, T t) |
| HEFace< T > * | Splice (HEFace< T > *const n) |
| virtual | ~HEFace () |
Protected Attributes | |
| std::vector< T > | m_2DTexCoordsVector |
| texture coordinate list | |
| Vector3< T > | m_vNormal |
| normal vector | |
| HEHalfEdge< T > * | nIncidentHalfEdge |
| incident half-edge | |
| HEFace< T > * | nNext |
| next face in a doubly linked list | |
| HEFace< T > * | nPrev |
| previous face in a doubly linked list | |
Friends | |
| std::ostream & | operator<< (std::ostream &output, HEFace< T > const &f) |
Definition at line 41 of file TAPsHEFace.hpp.
| BEGIN_NAMESPACE_TAPs HEFace< T >::HEFace | ( | Vector3< T > | normal = Vector3<T>() |
) | [inline] |
Definition at line 39 of file TAPsHEFace.cpp.
00040 : m_vNormal( normal ), 00041 nIncidentHalfEdge( NULL ), 00042 nPrev( NULL ), 00043 nNext( NULL ) 00044 {}
| HEFace< T >::HEFace | ( | HEHalfEdge< T > *const | incidentHalfEdge | ) | [inline] |
Definition at line 47 of file TAPsHEFace.cpp.
00048 : m_vNormal(), 00049 nIncidentHalfEdge( incidentHalfEdge ), 00050 nPrev( NULL ), 00051 nNext( NULL ) 00052 {}
Definition at line 55 of file TAPsHEFace.cpp.
00056 : m_2DTexCoordsVector( he.m_2DTexCoordsVector ), 00057 m_vNormal( normal ), 00058 nIncidentHalfEdge( he.nIncidentHalfEdge ), 00059 nPrev( he.nPrev ), 00060 nNext( he.nNext ) 00061 {}
| void HEFace< T >::AppendTexCoord | ( | T | s, | |
| T | t | |||
| ) | [inline] |
Definition at line 169 of file TAPsHEFace.cpp.
00170 { 00171 m_2DTexCoordsVector.push_back( s ); 00172 m_2DTexCoordsVector.push_back( t ); 00173 }
| int HEFace< T >::CountNumberOfVertices | ( | ) | const [inline] |
Definition at line 235 of file TAPsHEFace.cpp.
00236 { 00237 int numberOfVertices = 0; 00238 if ( nIncidentHalfEdge == NULL ) return 0; 00239 //-------------------------------------------------------------------- 00240 HEHalfEdge<T> firstHalfEdge = nIncidentHalfEdge; 00241 HEHalfEdge<T> currentHalfEdge = nIncidentHalfEdge; 00242 do { 00243 ++numberOfVertices; 00244 currentHalfEdge = currentHalfEdge->Next(); 00245 } while ( firstHalfEdge != currentHalfEdge ); 00246 //-------------------------------------------------------------------- 00247 return numberOfVertices; 00248 }
| void HEFace< T >::Delete | ( | ) | [inline] |
| std::vector< Vector3< T > > HEFace< T >::GetCopyOfVertexPositions | ( | int | i | ) | const [inline] |
Definition at line 374 of file TAPsHEFace.cpp.
00375 { 00376 std::vector< Vector3<T> > vertexPositions; 00377 if ( nIncidentHalfEdge == NULL ) return vertexPositions; 00378 //-------------------------------------------------------------------- 00379 int count = 0; 00380 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00381 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00382 do { 00383 ++count; 00384 vertexPositions.push_back( currentHalfEdge->Vertex()->GetPosition() ); 00385 currentHalfEdge = currentHalfEdge->Next(); 00386 } while ( firstHalfEdge != currentHalfEdge && count < i ); 00387 //-------------------------------------------------------------------- 00388 return vertexPositions; 00389 }
| std::vector< Vector3< T > > HEFace< T >::GetCopyOfVertexPositions | ( | ) | const [inline] |
Definition at line 357 of file TAPsHEFace.cpp.
00358 { 00359 std::vector< Vector3<T> > vertexPositions; 00360 if ( nIncidentHalfEdge == NULL ) return vertexPositions; 00361 //-------------------------------------------------------------------- 00362 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00363 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00364 do { 00365 ++count; 00366 vertexPositions.push_back( currentHalfEdge->Vertex()->GetPosition() ); 00367 currentHalfEdge = currentHalfEdge->Next(); 00368 } while ( firstHalfEdge != currentHalfEdge ); 00369 //-------------------------------------------------------------------- 00370 return vertexPositions; 00371 }
| int HEFace< T >::GetNoTexCoords | ( | ) | const [inline] |
Definition at line 78 of file TAPsHEFace.cpp.
00079 { return static_cast<int>(m_2DTexCoordsVector.size()) / 2; }
| int HEFace< T >::GetNumTexCoords | ( | ) | const [inline] |
| std::vector< HEVertex< T > const *const > HEFace< T >::GetPtrsToVertices | ( | int | i | ) | const [inline] |
Definition at line 339 of file TAPsHEFace.cpp.
00340 { 00341 std::vector< HEVertex<T> const * const > ptrsToVertices; 00342 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00343 //-------------------------------------------------------------------- 00344 int count = 0; 00345 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00346 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00347 do { 00348 ++count; 00349 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00350 currentHalfEdge = currentHalfEdge->Next(); 00351 } while ( firstHalfEdge != currentHalfEdge && count < i ); 00352 //-------------------------------------------------------------------- 00353 return ptrsToVertices; 00354 }
| std::vector< HEVertex< T > *const > HEFace< T >::GetPtrsToVertices | ( | int | i | ) | [inline] |
Definition at line 321 of file TAPsHEFace.cpp.
00322 { 00323 std::vector< HEVertex<T> * const > ptrsToVertices; 00324 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00325 //-------------------------------------------------------------------- 00326 int count = 0; 00327 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00328 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00329 do { 00330 ++count; 00331 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00332 currentHalfEdge = currentHalfEdge->Next(); 00333 } while ( firstHalfEdge != currentHalfEdge && count < i ); 00334 //-------------------------------------------------------------------- 00335 return ptrsToVertices; 00336 }
| std::vector< HEVertex< T > const *const > HEFace< T >::GetPtrsToVertices | ( | ) | const [inline] |
Definition at line 267 of file TAPsHEFace.cpp.
00268 { 00269 std::vector< HEVertex<T> const * const > ptrsToVertices; 00270 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00271 //-------------------------------------------------------------------- 00272 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00273 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00274 do { 00275 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00276 currentHalfEdge = currentHalfEdge->Next(); 00277 } while ( firstHalfEdge != currentHalfEdge ); 00278 //-------------------------------------------------------------------- 00279 return ptrsToVertices; 00280 }
| std::vector< HEVertex< T > *const > HEFace< T >::GetPtrsToVertices | ( | ) | [inline] |
Definition at line 251 of file TAPsHEFace.cpp.
00252 { 00253 std::vector< HEVertex<T> * const > ptrsToVertices; 00254 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00255 //-------------------------------------------------------------------- 00256 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00257 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00258 do { 00259 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00260 currentHalfEdge = currentHalfEdge->Next(); 00261 } while ( firstHalfEdge != currentHalfEdge ); 00262 //-------------------------------------------------------------------- 00263 return ptrsToVertices; 00264 }
| std::vector< HEVertex< T > const *const > HEFace< T >::GetPtrsToVerticesAndNumberOfVertices | ( | int & | numberOfVertices | ) | const [inline] |
Definition at line 303 of file TAPsHEFace.cpp.
00304 { 00305 numberOfVertices = 0; 00306 std::vector< HEVertex<T> const * const > ptrsToVertices; 00307 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00308 //-------------------------------------------------------------------- 00309 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00310 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00311 do { 00312 ++numberOfVertices; 00313 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00314 currentHalfEdge = currentHalfEdge->Next(); 00315 } while ( firstHalfEdge != currentHalfEdge ); 00316 //-------------------------------------------------------------------- 00317 return ptrsToVertices; 00318 }
| std::vector< HEVertex< T > *const > HEFace< T >::GetPtrsToVerticesAndNumberOfVertices | ( | int & | numberOfVertices | ) | [inline] |
Definition at line 284 of file TAPsHEFace.cpp.
00285 { 00286 numberOfVertices = 0; 00287 std::vector< HEVertex<T> * const > ptrsToVertices; 00288 if ( nIncidentHalfEdge == NULL ) return ptrsToVertices; 00289 //-------------------------------------------------------------------- 00290 HEHalfEdge<T> * firstHalfEdge = nIncidentHalfEdge; 00291 HEHalfEdge<T> * currentHalfEdge = nIncidentHalfEdge; 00292 do { 00293 ++numberOfVertices; 00294 ptrsToVertices.push_back( currentHalfEdge->Vertex() ); 00295 currentHalfEdge = currentHalfEdge->Next(); 00296 } while ( firstHalfEdge != currentHalfEdge ); 00297 //-------------------------------------------------------------------- 00298 return ptrsToVertices; 00299 }
| void HEFace< T >::GetTexCoordHalfNo | ( | int | i, | |
| T & | v | |||
| ) | const [inline] |
Definition at line 147 of file TAPsHEFace.cpp.
00148 { 00149 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size()) ); 00150 v = m_2DTexCoordsVector[i]; 00151 }
| T HEFace< T >::GetTexCoordHalfNo | ( | int | i | ) | const [inline] |
Definition at line 140 of file TAPsHEFace.cpp.
00141 { 00142 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size()) ); 00143 return m_2DTexCoordsVector[i]; 00144 }
| void HEFace< T >::GetTexCoordNo | ( | int | i, | |
| T & | s, | |||
| T & | t | |||
| ) | const [inline] |
Definition at line 124 of file TAPsHEFace.cpp.
00125 { 00126 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00127 s = m_2DTexCoordsVector[i*2 ]; 00128 t = m_2DTexCoordsVector[i*2 + 1]; 00129 }
| void HEFace< T >::GetTexCoordNoS | ( | int | i, | |
| T & | s | |||
| ) | const [inline] |
Definition at line 96 of file TAPsHEFace.cpp.
00097 { 00098 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00099 s = m_2DTexCoordsVector[i*2]; 00100 }
| T HEFace< T >::GetTexCoordNoS | ( | int | i | ) | const [inline] |
Definition at line 82 of file TAPsHEFace.cpp.
00083 { 00084 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00085 return m_2DTexCoordsVector[i*2]; 00086 }
| void HEFace< T >::GetTexCoordNoT | ( | int | i, | |
| T & | t | |||
| ) | const [inline] |
Definition at line 103 of file TAPsHEFace.cpp.
00104 { 00105 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00106 t = m_2DTexCoordsVector[i*2 + 1]; 00107 }
| T HEFace< T >::GetTexCoordNoT | ( | int | i | ) | const [inline] |
Definition at line 89 of file TAPsHEFace.cpp.
00090 { 00091 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00092 return m_2DTexCoordsVector[i*2 + 1]; 00093 }
| HEHalfEdge<T>* HEFace< T >::IncidentHalfEdge | ( | ) | const [inline] |
| void HEFace< T >::IncidentHalfEdge | ( | HEHalfEdge< T > *const | incidentHalfEdge | ) | [inline] |
| void HEFace< T >::InsertTexCoordNo | ( | int | i, | |
| T | s, | |||
| T | t | |||
| ) | [inline] |
Definition at line 161 of file TAPsHEFace.cpp.
00162 { 00163 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00164 m_2DTexCoordsVector.insert( i*2, s ); 00165 m_2DTexCoordsVector.insert( i*2+1, t ); 00166 }
| void HEFace< T >::RemoveTexCoordNo | ( | int | i | ) | [inline] |
Definition at line 176 of file TAPsHEFace.cpp.
00177 { 00178 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00179 m_2DTexCoordsVector.erase(i*2, i*2+2); 00180 }
| void HEFace< T >::SetNormal | ( | T | x, | |
| T | y, | |||
| T | z | |||
| ) | [inline] |
| void HEFace< T >::SetTexCoordHalfNo | ( | int | i, | |
| T | v | |||
| ) | [inline] |
Definition at line 154 of file TAPsHEFace.cpp.
00155 { 00156 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size()) ); 00157 m_2DTexCoordsVector[i] = v; 00158 }
| void HEFace< T >::SetTexCoordNo | ( | int | i, | |
| T | s, | |||
| T | t | |||
| ) | [inline] |
Definition at line 132 of file TAPsHEFace.cpp.
00133 { 00134 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00135 m_2DTexCoordsVector[i*2 ] = s; 00136 m_2DTexCoordsVector[i*2 + 1] = t; 00137 }
| void HEFace< T >::SetTexCoordNoS | ( | int | i, | |
| T | s | |||
| ) | [inline] |
Definition at line 110 of file TAPsHEFace.cpp.
00111 { 00112 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00113 m_2DTexCoordsVector[i*2] = s; 00114 }
| void HEFace< T >::SetTexCoordNoT | ( | int | i, | |
| T | t | |||
| ) | [inline] |
Definition at line 117 of file TAPsHEFace.cpp.
00118 { 00119 assert( 0 <= i && i < static_cast<int>(m_2DTexCoordsVector.size())/2 ); 00120 m_2DTexCoordsVector[i*2 + 1] = t; 00121 }
| std::ostream& operator<< | ( | std::ostream & | output, | |
| HEFace< T > const & | f | |||
| ) | [friend] |
Definition at line 70 of file TAPsHEFace.hpp.
00071 { 00072 output << "HEFace<" << typeid(T).name() << "> has "; 00073 // << f.m_ptrVertexLoopVector.size() << " vertices:"; 00074 //------------------------------------------------------------ 00075 // Output vertex loop 00076 // for ( int i = 0; i < f.m_ptrVertexLoopVector.size(); ++i ) 00077 // { 00078 // output << " " << *(f.m_ptrVertexLoopVector[i]); 00079 // } 00080 //------------------------------------------------------------ 00081 // Output normal 00082 output << " with Normal:" << f.m_vNormal; 00083 //------------------------------------------------------------ 00084 // Output texture coordinates 00085 output << "\n and 2-D Texture Coordinates (" 00086 << static_cast<int>(f.m_2DTexCoordsVector.size()) << "):"; 00087 for ( int i = 0; i < static_cast<int>(f.m_2DTexCoordsVector.size()); ++i ) 00088 { 00089 output << " " << f.m_2DTexCoordsVector[i]; 00090 } 00091 //------------------------------------------------------------ 00092 // Output incident half-edge 00093 output << " and Incident half-edge:" << f.nIncidentHalfEdge; 00094 return output; 00095 }
std::vector<T> HEFace< T >::m_2DTexCoordsVector [protected] |
HEHalfEdge<T>* HEFace< T >::nIncidentHalfEdge [protected] |
1.5.6