TAPs 0.7.7.3
TAPsModelSurgicalSutureWithHeadNeedle_CD.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsModelSurgicalSutureWithHeadNeedle_CD.hpp
00003 ******************************************************************************/
00009 /******************************************************************************
00010 SUKITTI PUNAK   (08/12/2010)
00011 UPDATE          (08/12/2010)
00012 ******************************************************************************/
00013 #ifndef TAPs_MODEL_SURGICAL_SUTURE_WITH_HEAD_NEEDLE__CD_HPP
00014 #define TAPs_MODEL_SURGICAL_SUTURE_WITH_HEAD_NEEDLE__CD_HPP
00015 
00016 // For collision detection
00017 #include "../../CD/TAPsBVHTree.hpp"
00018 #include "../../CD/TAPsMultiBoundingVolume.hpp" // for collision detection by bounding volumes
00019 
00020 
00021 BEGIN_NAMESPACE_TAPs
00022 //=============================================================================
00023 template <typename T>
00024 class ModelSurgicalSutureWithHeadNeedle_CD {
00025 
00026 public:
00027     //-------------------------------------------------------------------------
00029     ModelSurgicalSutureWithHeadNeedle_CD ();
00030 
00032     virtual ~ModelSurgicalSutureWithHeadNeedle_CD ();
00033 
00035     void CreateCD ( 
00036         RigidBodyDynamics<T> *  pHeadNeedle,                
00037         InteractionPoint<T> *   pNeedleSharpPt,             
00038         InteractionPoint<T> *   pNeedleSutureConnectingPt   
00039     );
00040 
00042     void DeleteCD ();
00043 
00045     void BuildBVHTree ();
00046 
00048     //bool CDRwith (
00049     //  MultiBoundingVolume<T> * const pMBVObj,     //!< a multi bounding volume object
00050     //  TransformationSupport<T> * const pTransform //!< an extra transformation for the MBV object
00051     //);
00052 
00054     //inline virtual bool CDRwith (
00055     //  TAPs::OpenGL::HETriMeshOneModelMultiParts<T> * pObj,    //!< a HETriMeshOneModelMultiParts object
00056     //  TransformationSupport<T> * const pTransform = NULL      //!< an extra transformation for the HETriMeshOneModelMultiParts object
00057     //);
00058 
00059     //-------------------------------------------------------------------------
00060     // Operations
00061 
00063     BVHTree<T> * GetBVHTree ()  { return m_BVHTree; }
00064 
00065     // Data Members -----------------------------------------------------------
00066 //=============================================================================
00067 protected:
00068     // Member Functions -------------------------------------------------------
00069 
00071     BVHTree<T> * BuildBVHTreeRecursively (
00072         int startID,                    
00073         BVHNode<T> ** childNodeList,    
00074         int numOfChildNodes             
00075     );
00076 
00078     void UpdateBVHTree ();
00080     void UpdateBVHNodeRecursively ( BVHNode<T> * node );
00081 
00082     // Data Members -----------------------------------------------------------
00083 
00084     BVHTree<T> *    m_BVHTree;  
00085 
00086     TransformationSupport<T>    m_DummyTransform;   
00087 
00088     RigidBodyDynamics<T> *      m_pHeadNeedle;                  
00089     InteractionPoint<T> *   m_pNeedleSharpPt;               
00090     InteractionPoint<T> *   m_pNeedleSutureConnectingPt;    
00091 
00092     Vector3<T> *    m_pHeadNeedleTranslation;   
00093     Quaternion<T> * m_pHeadNeedleRotation;      
00094 
00095 //=============================================================================
00096 private:
00097     // Member Functions -------------------------------------------------------
00098 //=============================================================================
00099 
00100 //OpenGL
00101 //-----------------------------------------------------------------------------
00102 //#define __GL_H__
00103 //#define   TAPs_USE_GLSL
00104 //-----------------------------------------------------------------------------
00105 #if defined(__gl_h_) || defined(__GL_H__)
00106 public:
00108     inline virtual void Draw () const;
00109     
00110     //OpenGL::OpenGLObj Rendering;  //!< OpenGL Object has material color properties
00111 #endif//defined(__gl_h_) || defined(__GL_H__)
00112 //-----------------------------------------------------------------------------
00113 //=============================================================================
00114 }; // CLASS END: ModelSurgicalSutureWithHeadNeedle_CD
00115 //=============================================================================
00116 END_NAMESPACE_TAPs
00117 //-----------------------------------------------------------------------------
00118 #include "TAPsModelSurgicalSutureWithHeadNeedle_CD.cpp"
00119 //-----------------------------------------------------------------------------
00120 #endif
00121 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00122 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines