![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsModelDefBasedOnFEMTet_CD.hpp 00003 ******************************************************************************/ 00007 /****************************************************************************** 00008 SUKITTI PUNAK (04/15/2010) 00009 UPDATE (11/29/2010) 00010 ******************************************************************************/ 00011 #ifndef TAPs_MODEL_DEF_BASED_ON_FEM_TET_CD_HPP 00012 #define TAPs_MODEL_DEF_BASED_ON_FEM_TET_CD_HPP 00013 00014 #include "TAPsModelDefBasedOnFEM_CD.hpp" 00015 #include <TAPs/CD/TAPsColDetFns.hpp> 00016 00017 BEGIN_NAMESPACE_TAPs__FEM 00018 //============================================================================= 00019 template <typename T> 00020 class ModelDefBasedOnFEMTet_CD : public ModelDefBasedOnFEM_CD<T> { 00021 //============================================================================= 00022 public: 00023 // Member Functions ------------------------------------------------------- 00025 friend std::ostream & operator<< ( std::ostream &output, ModelDefBasedOnFEMTet_CD<T> const &obj ) 00026 { 00027 output << obj.StrInfo(); 00028 return output; 00029 } 00030 //------------------------------------------------------------------------- 00032 ModelDefBasedOnFEMTet_CD (); 00034 //ModelDefBasedOnFEMTet_CD ( ModelDefBasedOnFEMTet_CD<T,DATA> const &orig ); 00036 virtual ~ModelDefBasedOnFEMTet_CD (); 00037 //------------------------------------------------------------------------- 00039 virtual std::string StrInfo () const; 00040 //------------------------------------------------------------------------- 00042 //inline ModelDefBasedOnFEMTet_CD<T,DATA> & operator= ( ModelDefBasedOnFEMTet_CD<T,DATA> const &orig ); 00043 //------------------------------------------------------------------------- 00044 00046 virtual bool Init ( 00047 OpenGL::OpenGLHalfEdgeTrigonalModel<T> * pHEModel, 00048 FEM::MeshTetrahedra<T> * pFEMMesh 00049 ); 00050 00054 inline virtual void ClearCollidedParts (); 00055 00057 inline virtual bool CDRwith ( 00058 MultiBoundingVolume<T> * const pMBVObj 00059 ); 00060 00062 inline virtual bool CDRwith ( 00063 MultiBoundingVolume<T> * const pMBVObj, 00064 TransformationSupport<T> * const pTransform 00065 ); 00066 00068 inline void AdjustSurfaceMeshByCDObjs (); 00069 00070 //========================================================================= 00071 // Grabbing 00072 //------------------------------------------------------------------------- 00073 00078 inline virtual void MoveGrabbedPart ( int grabbedPartID ); 00079 00081 inline virtual void MoveAllGrabbedParts (); 00082 00084 inline void AdjustSurfaceMeshDueToGrabbedParts (); 00085 00086 //------------------------------------------------------------------------- 00087 // Grabbing 00088 //========================================================================= 00089 00090 // Data Members ----------------------------------------------------------- 00091 //============================================================================= 00092 protected: 00093 // Member Functions ------------------------------------------------------- 00094 00098 inline virtual bool CORE_CDwith ( 00099 MultiBoundingVolume<T> * const pMBVObj 00100 ); 00101 00103 inline void CORE_CR (); 00104 00106 inline void GenCDForcesOnFEMMeshByCDObj ( CDObj<T> & cdObj ); 00107 00111 inline void GenGrabbedForcesOnFEMMeshByCDObj ( 00112 CDObj<T> & cdObj, 00113 Vector3<T> const & grabbingObjPos_LS 00114 ); 00115 00117 inline void AdjustSurfaceMeshVertexPositionByCDObj ( CDObj<T> & cdObj ); 00118 00120 inline void AdjustSurfaceMeshVertexPositionDueToGrabbedVertex ( CDObj<T> & cdObj ); 00121 00123 //inline void ClearFEMMeshAdjustmentFromCDObj ( CDObj<T> & cdObj ); 00124 00125 // Data Members ----------------------------------------------------------- 00126 FEM::MeshTetrahedra<T> * m_pFEMMesh; 00127 00128 //============================================================================= 00129 private: 00130 // Member Functions ------------------------------------------------------- 00131 // Data Members ----------------------------------------------------------- 00132 //============================================================================= 00133 00134 #if defined(__gl_h_) || defined(__GL_H__) 00135 public: 00136 #endif 00137 00138 //============================================================================= 00139 }; // END CLASS ModelDefBasedOnFEMTet_CD 00140 //============================================================================= 00141 END_NAMESPACE_TAPs__FEM 00142 //----------------------------------------------------------------------------- 00144 #include "TAPsModelDefBasedOnFEMTet_CD.cpp" 00145 00147 // Include definition if TAPs_USE_EXPORT is not defined 00148 //#if !defined( TAPs_USE_EXPORT ) 00149 // #include "TAPsModelDefBasedOnFEMTet_CD.cpp" 00150 //#endif 00151 //----------------------------------------------------------------------------- 00152 #endif 00153 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00154 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----