TAPs 0.7.7.3
TAPsAdvSimConstraint_ERSutureVsHEVertex.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsAdvSimConstraint_ERSutureVsHEVertex.hpp
00003 ******************************************************************************/
00008 /******************************************************************************
00009 SUKITTI PUNAK   (04/30/2010)
00010 UPDATE          (08/30/2010)
00011 ******************************************************************************/
00012 #ifndef TAPs_ADV_SIM_CONSTRAINT_ERSUTURE_VS_HEVERTEX_HPP
00013 #define TAPs_ADV_SIM_CONSTRAINT_ERSUTURE_VS_HEVERTEX_HPP
00014 
00015 #include "TAPsAdvSimConstraint.hpp"
00016 
00017 BEGIN_NAMESPACE_TAPs
00018 //=============================================================================
00019 template <typename T>
00020 class AdvSimConstraint_ERSutureVsHEVertex : public AdvSimConstraint<T> {
00021 //=============================================================================
00022 public:
00023     // Member Functions -------------------------------------------------------
00025     friend std::ostream & operator<< ( std::ostream &output, AdvSimConstraint_ERSutureVsHEVertex<T> const &obj )
00026     {
00027         output << obj.StrInfo();
00028         return output;
00029     }
00030     //-------------------------------------------------------------------------
00032     AdvSimConstraint_ERSutureVsHEVertex (
00033         //SutureAdvSimID    S,      //!< suture's advanced simulation ID
00034         unsigned int    SVID,   
00035         //Vector3<T> *  pSV,    //!< pointer to vertex from suture
00036         //ObjectAdvSimID    O,      //!< model's advanced simulation ID
00037         HEVertex<T> *   pOV,    
00038         T forceRatio,           
00039         T forceScaleForSuture,  
00040         T forceScaleForModel,   
00041         T forceThresholdForSuture = 1,  
00042         T forceThresholdForModel = 1    
00043     );
00045     AdvSimConstraint_ERSutureVsHEVertex ( AdvSimConstraint_ERSutureVsHEVertex<T> const &orig );
00047     virtual ~AdvSimConstraint_ERSutureVsHEVertex ();
00048     //-------------------------------------------------------------------------
00050     virtual std::string StrInfo () const;
00051     //-------------------------------------------------------------------------
00053     inline virtual AdvSimConstraint_ERSutureVsHEVertex<T> & operator= ( AdvSimConstraint_ERSutureVsHEVertex<T> const &orig );
00054 
00055     //-------------------------------------------------------------------------
00056     // Get/Set Functions
00057 
00059     unsigned int GetVertexIDFromSuture () const { return m_SVID; }
00061     //Vector3<T> *  GetPtrToVertexFromSuture () { return m_pSV; }
00063     HEVertex<T> *   GetPtrToVertexFromModel ()  { return m_pOV; }
00065     void SetVertexIDFromSuture ( unsigned int id )  { m_SVID = id; }
00067     void SetPtrToVertexFromModel ( HEVertex<T> * pVertex )  { m_pOV = pVertex; }
00068 
00069     //-------------------------------------------------------------------------
00070     // Functions for Advanced Simulation
00071 
00073     inline virtual void EnforceConstraint ();
00074 
00076     inline virtual void ClearConstraint ();
00077 
00079     //bool GetEnforceSuturePositionStatus () const  { return m_bEnforceSuturePosition; }
00081     //void SetEnforceSuturePositionStatus ( bool b )    { m_bEnforceSuturePosition = b; }
00082 
00083     // Data Members -----------------------------------------------------------
00084 //=============================================================================
00085 protected:
00086     // Member Functions -------------------------------------------------------
00087     // Data Members -----------------------------------------------------------
00088     //SutureAdvSimID    m_S;    //!< ERSuture's advanced simulation ID
00089     unsigned int    m_SVID; 
00090     //Vector3<T> *  m_pSV;  //!< a pointer to vertex from ERSuture
00091     //ObjectAdvSimID    m_O;    //!< model's advanced simulation ID
00092     HEVertex<T> *   m_pOV;  
00093 
00094     //bool m_bEnforceSuturePosition;    //!< Enforce position -- properties are defined in ERSuture
00095 //=============================================================================
00096 private:
00097     // Member Functions -------------------------------------------------------
00098     // Data Members -----------------------------------------------------------
00099 //=============================================================================
00100 
00101 #if defined(__gl_h_) || defined(__GL_H__)
00102 public:
00104     virtual void Draw () const;
00105 #endif
00106 
00107 //=============================================================================
00108 }; // END CLASS AdvSimConstraint_ERSutureVsHEVertex
00109 //=============================================================================
00110 END_NAMESPACE_TAPs
00111 //-----------------------------------------------------------------------------
00113 #include "TAPsAdvSimConstraint_ERSutureVsHEVertex.cpp"
00114 
00116 // Include definition if TAPs_USE_EXPORT is not defined
00117 //#if !defined( TAPs_USE_EXPORT )
00118 //  #include "TAPsAdvSimConstraint_ERSutureVsHEVertex.cpp"
00119 //#endif
00120 //-----------------------------------------------------------------------------
00121 #endif
00122 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00123 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines