![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsHelpCreateHalfEdgeModel.hpp 00003 00004 Help create HalfEdgeModel called by Read Model Classes. 00005 00006 SUKITTI PUNAK (08/31/2005) 00007 ******************************************************************************/ 00008 #ifndef TAPs_HELP_CREATE_HALF_EDGE_MODEL_HPP 00009 #define TAPs_HELP_CREATE_HALF_EDGE_MODEL_HPP 00010 00011 // The necessary headers are included in TAPsReadModel.hpp before including 00012 // this header. 00013 #include "../../GeometricDataStructure/HalfEdge/TAPsHalfEdgeDataStructure.hpp" 00014 #include "../../DataStructure/TAPsHashTableBySTLVector.hpp" 00015 00016 BEGIN_NAMESPACE_TAPs 00017 //============================================================================= 00018 template <typename T> class ReadModels; 00019 //============================================================================= 00020 template <typename T> 00021 class HelpCreateHalfEdgeModel { 00022 public: 00023 // Create a half-edge model from this class data that has been setup 00024 // (allocated and initialized) by an external program and delete 00025 // (deallocate the memory of) the data after finishing creating the model 00026 static void CreateHalfEdgeModel ( OpenGL::HalfEdgeModel<T> * const prModel ); 00027 //------------------------------------------------------------------------- 00028 // Clear Allocated Memory 00029 static void ClearAllocatedMemory ( OpenGL::HalfEdgeModel<T> * const prModel ); 00030 //------------------------------------------------------------------------- 00031 // Create a half-edge from vertex1 to vertex2 incident to face 00032 // with prev and next half-edges 00033 static HEHalfEdge<T> * const CreateHalfEdgeFrom ( HEVertex<T> * const v1, 00034 HEVertex<T> * const v2, 00035 HEFace<T> * const face, 00036 HEHalfEdge<T> * const hePrev = NULL, 00037 HEHalfEdge<T> * const heNext = NULL ); 00038 //------------------------------------------------------------------------- 00039 // Pair all (non-boundary) half-edges 00040 static void PairAllHalfEdges (); 00041 //------------------------------------------------------------------------- 00042 // Create boundary half-edges 00043 static void CreateBoundaryHalfEdges (); 00044 //------------------------------------------------------------------------- 00045 // Create hole faces 00046 static void CreateHoleFaces ( OpenGL::HalfEdgeModel<T> * const prModel ); 00047 //------------------------------------------------------------------------- 00048 // Create a hole face from model's boundary half-edge list 00049 static void CreateAHoleFace ( OpenGL::HalfEdgeModel<T> * const prModel ); 00050 //------------------------------------------------------------------------- 00051 //----------------------------------------------------------------------------- 00052 // Data Members -------------------------------------------------------------- 00053 public: 00054 // for half-edge originated vertex look up 00055 static HEVertex<T> ** vertexList; 00056 // hash table for vertex ring list 00057 // used for half-edge pair look up 00058 static DS::HashTableBySTLVector<int> * vertexRingList; 00059 // hash table for halfedge ring list 00060 // used for half-edge pair look up 00061 static DS::HashTableBySTLVector< HEHalfEdge<T>* > * halfEdgeRingList; 00062 // (bounday) half-edges on hole faces 00063 static HEHalfEdge<T> * boundaryHalfEdgePtr; 00064 }; 00065 //============================================================================= 00066 END_NAMESPACE_TAPs 00067 //----------------------------------------------------------------------------- 00068 // Include definition if TAPs_USE_EXPORT is not defined 00069 //#if !defined( TAPs_USE_EXPORT ) 00070 #include "TAPsHelpCreateHalfEdgeModel.cpp" 00071 //#endif 00072 //----------------------------------------------------------------------------- 00073 #endif 00074 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00075 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----