TAPs 0.7.7.3
TAPsAdvSimConstraint_VertexIdVsHEVertex.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsAdvSimConstraint_VertexIdVsHEVertex.hpp
00003 ******************************************************************************/
00008 /******************************************************************************
00009 SUKITTI PUNAK   (04/30/2010)
00010 UPDATE          (10/06/2010)
00011 ******************************************************************************/
00012 #ifndef TAPs_ADV_SIM_CONSTRAINT_VERTEXID_VS_HEVERTEX_HPP
00013 #define TAPs_ADV_SIM_CONSTRAINT_VERTEXID_VS_HEVERTEX_HPP
00014 
00015 #include "TAPsAdvSimConstraint_Base_AvsB.hpp"
00016 
00017 BEGIN_NAMESPACE_TAPs
00018 //=============================================================================
00019 template <typename T>
00020 class AdvSimConstraint_VertexIdVsHEVertex : public AdvSimConstraint_Base_AvsB<T> {
00021 //=============================================================================
00022 public:
00023     // Member Functions -------------------------------------------------------
00025     friend std::ostream & operator<< ( std::ostream &output, AdvSimConstraint_VertexIdVsHEVertex<T> const &obj )
00026     {
00027         output << obj.StrInfo();
00028         return output;
00029     }
00030     //-------------------------------------------------------------------------
00032     AdvSimConstraint_VertexIdVsHEVertex (
00033         unsigned int    vertexID = 0,       
00034         HEVertex<T> *   pHEVertex = NULL,   
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_VertexIdVsHEVertex ( AdvSimConstraint_VertexIdVsHEVertex<T> const &orig );
00046     virtual ~AdvSimConstraint_VertexIdVsHEVertex ();
00047     //-------------------------------------------------------------------------
00049     virtual std::string StrInfo () const;
00050     //-------------------------------------------------------------------------
00052     inline virtual AdvSimConstraint_VertexIdVsHEVertex<T> & operator= ( AdvSimConstraint_VertexIdVsHEVertex<T> const &orig );
00053 
00054     //-------------------------------------------------------------------------
00055     // Get/Set Functions
00056 
00058     unsigned int GetVertexIDFromModel_1 () const    { return m_uiVertexID_Model1; }
00060     HEVertex<T> *   GetPtrToVertexFromModel_2 ()    { return m_pHEVertex_Model2; }
00062     HEVertex<T> * const GetPtrToVertexFromModel_2 () const  { return m_pHEVertex_Model2; }
00064     void SetVertexIDFromModel_1 ( unsigned int id ) { m_uiVertexID_Model1 = id; }
00066     void SetPtrToVertexFromModel_2 ( HEVertex<T> * pVertex )    { m_pHEVertex_Model2 = pVertex; }
00067 
00068     //-------------------------------------------------------------------------
00069     // Functions for Advanced Simulation
00070 
00072     inline virtual void EnforceConstraint ();
00073 
00075     inline virtual void ClearConstraint ();
00076 
00077     // Data Members -----------------------------------------------------------
00078 //=============================================================================
00079 protected:
00080     // Member Functions -------------------------------------------------------
00081     // Data Members -----------------------------------------------------------
00082     unsigned int    m_uiVertexID_Model1;    
00083     HEVertex<T> *   m_pHEVertex_Model2;     
00084 //=============================================================================
00085 private:
00086     // Member Functions -------------------------------------------------------
00087     // Data Members -----------------------------------------------------------
00088 //=============================================================================
00089 
00090 #if defined(__gl_h_) || defined(__GL_H__)
00091 public:
00093     virtual void Draw () const;
00094 #endif
00095 
00096 //=============================================================================
00097 }; // END CLASS AdvSimConstraint_VertexIdVsHEVertex
00098 //=============================================================================
00099 END_NAMESPACE_TAPs
00100 //-----------------------------------------------------------------------------
00102 #include "TAPsAdvSimConstraint_VertexIdVsHEVertex.cpp"
00103 
00105 // Include definition if TAPs_USE_EXPORT is not defined
00106 //#if !defined( TAPs_USE_EXPORT )
00107 //  #include "TAPsAdvSimConstraint_VertexIdVsHEVertex.cpp"
00108 //#endif
00109 //-----------------------------------------------------------------------------
00110 #endif
00111 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00112 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines