![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsMarchingCube.hpp 00003 ******************************************************************************/ 00007 /****************************************************************************** 00008 SUKITTI PUNAK (10/11/2006) 00009 UPDATE (10/12/2006) 00010 ******************************************************************************/ 00011 #ifndef TAPs_MARCHING_CUBE_HPP 00012 #define TAPs_MARCHING_CUBE_HPP 00013 00014 #include "../Core/TAPsLib.hpp" 00015 #include "TAPsGridGenerator_ForTheDefModBasedOnMSS.hpp" // input grid volume data 00016 00017 BEGIN_NAMESPACE_TAPs 00018 //============================================================================= 00019 // Forward Declaration 00020 //----------------------------------------------------------------------------- 00021 //----------------------------------------------------------------------------- 00022 //============================================================================= 00023 00024 //============================================================================= 00025 // Class MarchingCube 00026 //----------------------------------------------------------------------------- 00027 // Define a new frame type 00028 template <typename T> 00029 class MarchingCube { 00030 public: 00031 //--------------------------------------------------------------- 00032 // Constructor(s) and Destructor 00033 MarchingCube ( GridGenerator<T> * pGridGenerator ); 00034 ~MarchingCube (); 00035 //--------------------------------------------------------------- 00036 // Operation(s) 00037 bool GenerateIsosurface ( GridGenerator<T> * pGridGenerator ); 00038 //--------------------------------------------------------------- 00039 // Accessor(s) 00040 //--------------------------------------------------------------- 00041 private: 00042 //=============================================================== 00043 // MEMBER FUNCTION(s) 00044 //--------------------------------------------------------------- 00045 void DeleteIsosurface (); 00046 //--------------------------------------------------------------- 00047 //=============================================================== 00048 // DATA MEMBERs 00049 //--------------------------------------------------------------- 00050 // Unmanaged Pointer(s) 00051 // GridGenerator<T> * m_pGridGenerator; // pointer to a grid generator 00052 //--------------------------------------------------------------- 00053 // Managed Pointer(s) 00054 //----------------------------------------------------- 00055 // Isosurface Info 00056 std::vector< XVertex<T> > m_vXVertex; // XVertices 00057 std::vector< Face<T> > m_vFace; // Faces 00058 std::vector< std::vector<int> > m_vviVertexRing1List; // neighbor vertices in ring 1 00059 //--------------------------------------------------------------- 00060 //============================================================================= 00061 //----------------------------------------------------------------------------- 00062 // With OpenGL 00063 #if defined(__gl_h_) || defined(__GL_H__) 00064 public: 00065 //--------------------------------------------------------------- 00066 // DrawByOpenGL 00067 // GLenum drawStyle; GLU_FILL, GLU_LINE, GLU_SILHOUETTE, and GLU_POINT 00068 // Expensive Drawing, since it draws each particles using sphere. 00069 virtual void DrawByOpenGL ( GLenum drawStyle = GLU_LINE ); 00070 //--------------------------------------------------------------- 00071 #endif 00072 //----------------------------------------------------------------------------- 00073 //============================================================================= 00074 }; // End Class MarchingCube 00075 //============================================================================= 00076 END_NAMESPACE_TAPs 00077 //----------------------------------------------------------------------------- 00078 // Include definition if TAPs_USE_EXPORT is not defined 00079 //#if !defined( TAPs_USE_EXPORT ) 00080 #include "TAPsMarchingCube.cpp" 00081 //#endif 00082 //----------------------------------------------------------------------------- 00083 #endif 00084 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00085 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----