![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsAdvSimConstraint_VertexIdVsVertexId.hpp 00003 ******************************************************************************/ 00008 /****************************************************************************** 00009 SUKITTI PUNAK (09/17/2010) 00010 UPDATE (09/29/2010) 00011 ******************************************************************************/ 00012 #ifndef TAPs_ADV_SIM_CONSTRAINT_VERTEXID_VS_VERTEXID_HPP 00013 #define TAPs_ADV_SIM_CONSTRAINT_VERTEXID_VS_VERTEXID_HPP 00014 00015 #include "TAPsAdvSimConstraint_Base_AvsB.hpp" 00016 00017 BEGIN_NAMESPACE_TAPs 00018 //============================================================================= 00019 template <typename T> 00020 class AdvSimConstraint_VertexIdVsVertexId : public AdvSimConstraint_Base_AvsB<T> { 00021 //============================================================================= 00022 public: 00023 // Member Functions ------------------------------------------------------- 00025 friend std::ostream & operator<< ( std::ostream &output, AdvSimConstraint_VertexIdVsVertexId<T> const &obj ) 00026 { 00027 output << obj.StrInfo(); 00028 return output; 00029 } 00030 //------------------------------------------------------------------------- 00032 AdvSimConstraint_VertexIdVsVertexId ( 00033 unsigned int vertexID1 = 0, 00034 unsigned int vertexID2 = 0, 00035 T forceRatio = 0.5, 00036 T forceScaleForModel1 = 1, 00037 T forceScaleForModel2 = 1, 00038 T forceThresholdForModel1 = 1, 00039 T forceThresholdForModel2 = 1, 00040 bool bEnforceVertexOfModel1 = true, 00041 bool bEnforceVertexOfModel2 = true 00042 ); 00044 AdvSimConstraint_VertexIdVsVertexId ( AdvSimConstraint_VertexIdVsVertexId<T> const &orig ); 00046 virtual ~AdvSimConstraint_VertexIdVsVertexId (); 00047 //------------------------------------------------------------------------- 00049 virtual std::string StrInfo () const; 00050 //------------------------------------------------------------------------- 00052 inline virtual AdvSimConstraint_VertexIdVsVertexId<T> & operator= ( AdvSimConstraint_VertexIdVsVertexId<T> const &orig ); 00053 00054 //------------------------------------------------------------------------- 00055 // Get/Set Functions 00056 00058 unsigned int GetVertexIDFromModel_1 () const { return m_uiVertexID_Model1; } 00060 unsigned int GetVertexIDFromModel_2 () const { return m_uiVertexID_Model2; } 00062 void SetVertexIDFromModel_1 ( unsigned int id ) { m_uiVertexID_Model1 = id; } 00064 void SetVertexIDFromModel_2 ( unsigned int id ) { m_uiVertexID_Model2 = id; } 00065 00066 //------------------------------------------------------------------------- 00067 // Functions for Advanced Simulation 00068 00070 inline virtual void EnforceConstraint (); 00071 00073 inline virtual void ClearConstraint (); 00074 00075 // Data Members ----------------------------------------------------------- 00076 //============================================================================= 00077 protected: 00078 // Member Functions ------------------------------------------------------- 00079 // Data Members ----------------------------------------------------------- 00080 unsigned int m_uiVertexID_Model1; 00081 unsigned int m_uiVertexID_Model2; 00082 //============================================================================= 00083 private: 00084 // Member Functions ------------------------------------------------------- 00085 // Data Members ----------------------------------------------------------- 00086 //============================================================================= 00087 00088 #if defined(__gl_h_) || defined(__GL_H__) 00089 public: 00091 virtual void Draw () const; 00092 #endif 00093 00094 //============================================================================= 00095 }; // END CLASS AdvSimConstraint_VertexIdVsVertexId 00096 //============================================================================= 00097 END_NAMESPACE_TAPs 00098 //----------------------------------------------------------------------------- 00100 #include "TAPsAdvSimConstraint_VertexIdVsVertexId.cpp" 00101 00103 // Include definition if TAPs_USE_EXPORT is not defined 00104 //#if !defined( TAPs_USE_EXPORT ) 00105 // #include "TAPsAdvSimConstraint_VertexIdVsVertexId.cpp" 00106 //#endif 00107 //----------------------------------------------------------------------------- 00108 #endif 00109 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00110 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----