TAPs 0.7.7.3
TAPsModelSurgicalSutureThread.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsModelSurgicalSutureThread.hpp
00003 ******************************************************************************/
00010 /******************************************************************************
00011 SUKITTI PUNAK   (07/27/2010)
00012 UPDATE          (10/29/2010)
00013 ******************************************************************************/
00014 #ifndef TAPs_MODEL_SURGICAL_SUTURE_THREAD_HPP
00015 #define TAPs_MODEL_SURGICAL_SUTURE_THREAD_HPP
00016 
00017 #include "../Model/TAPsModelElasticRod.hpp"
00018 
00019 BEGIN_NAMESPACE_TAPs
00020 //=============================================================================
00021 template <typename T>
00022 class ModelSurgicalSutureThread : public ModelElasticRod<T> {
00023 //=============================================================================
00024 public:
00025     // Member Functions -------------------------------------------------------
00027     friend std::ostream & operator<< ( std::ostream &output, ModelSurgicalSutureThread<T> const &obj )
00028     {
00029         output << obj.StrInfo();
00030         return output;
00031     }
00032     //-------------------------------------------------------------------------
00034     ModelSurgicalSutureThread (
00035         int iNoLinks,               
00036         T tRadius,                  
00037         T tTotalLength,             
00038         T tTotalMass,               
00039         Vector3<T> & posOfVertex0 = Vector3<T>(),   
00040         ShapeInitializationParameters ShapeParameters = ShapeInitializationParameters() 
00041     );
00043     //ModelSurgicalSutureThread ( ModelSurgicalSutureThread<T> const &orig );
00045     virtual ~ModelSurgicalSutureThread ();
00046     //-------------------------------------------------------------------------
00048     virtual std::string StrInfo () const;
00049 
00051     virtual void    Reset ();
00052     
00053     //-------------------------------------------------------------------------
00054     // Get/Set Functions
00055 
00057     inline virtual int  GetNumberOfSutureThreadPoints () const  { return m_Parameters.NumOfNodes; }
00059     inline virtual int  GetNumberOfSutureThreadLinks () const   { return m_Parameters.NumOfNodes-1; }
00060 
00061     //-------------------------------------------------------------------------
00074     virtual void    AdvanceSimulation ()    { ModelElasticRod<T>::AdvanceSimulation(); }
00075 
00076     //-------------------------------------------------------------------------
00077     // Data Members -----------------------------------------------------------
00078 //=============================================================================
00079 protected:
00080     // Member Functions -------------------------------------------------------
00081     // Data Members -----------------------------------------------------------
00082 //=============================================================================
00083 private:
00084     // Member Functions -------------------------------------------------------
00089     inline virtual int  GetNumberOfPoints () const  { return m_Parameters.NumOfNodes; }
00094     inline virtual int  GetNumberOfLinks () const   { return m_Parameters.NumOfNodes-1; }
00095     // Data Members -----------------------------------------------------------
00096 //=============================================================================
00097 
00098 #if defined(__gl_h_) || defined(__GL_H__)
00099 public:
00101     virtual void Draw ();
00102 
00104     virtual void DrawForDebugging ()
00105     {
00106         ModelElasticRod<T>::DrawForDebugging();
00107     }
00108 #endif
00109 
00110 //=============================================================================
00111 }; // END CLASS ModelSurgicalSutureThread
00112 //=============================================================================
00113 END_NAMESPACE_TAPs
00114 //-----------------------------------------------------------------------------
00116 #include "TAPsModelSurgicalSutureThread.cpp"
00117 
00119 // Include definition if TAPs_USE_EXPORT is not defined
00120 //#if !defined( TAPs_USE_EXPORT )
00121 //  #include "TAPsModelSurgicalSutureThread.cpp"
00122 //#endif
00123 //-----------------------------------------------------------------------------
00124 #endif
00125 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00126 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines