TAPs 0.7.7.3
TAPsAdvSimConstraint_HEVertexVsHEVertex.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsAdvSimConstraint_HEVertexVsHEVertex.hpp
00003 ******************************************************************************/
00008 /******************************************************************************
00009 SUKITTI PUNAK   (04/30/2010)
00010 UPDATE          (10/06/2010)
00011 ******************************************************************************/
00012 #ifndef TAPs_ADV_SIM_CONSTRAINT_HEVERTEX_VS_HEVERTEX_HPP
00013 #define TAPs_ADV_SIM_CONSTRAINT_HEVERTEX_VS_HEVERTEX_HPP
00014 
00015 #include "TAPsAdvSimConstraint_Base_AvsB.hpp"
00016 
00017 BEGIN_NAMESPACE_TAPs
00018 //=============================================================================
00019 template <typename T>
00020 class AdvSimConstraint_HEVertexVsHEVertex : public AdvSimConstraint_Base_AvsB<T> {
00021 //=============================================================================
00022 public:
00023     // Member Functions -------------------------------------------------------
00025     friend std::ostream & operator<< ( std::ostream &output, AdvSimConstraint_HEVertexVsHEVertex<T> const &obj )
00026     {
00027         output << obj.StrInfo();
00028         return output;
00029     }
00030     //-------------------------------------------------------------------------
00032     AdvSimConstraint_HEVertexVsHEVertex (
00033         HEVertex<T> *   pV1 = NULL, 
00034         HEVertex<T> *   pV2 = NULL, 
00035         T forceRatio = 0.5,         
00036         T forceScaleForModelA = 1,  
00037         T forceScaleForModelB = 1,  
00038         T forceThresholdForModelA = 1,  
00039         T forceThresholdForModelB = 1,  
00040         bool bEnforceVertexOfModel1 = true, 
00041         bool bEnforceVertexOfModel2 = true  
00042     );
00044     AdvSimConstraint_HEVertexVsHEVertex ( AdvSimConstraint_HEVertexVsHEVertex<T> const &orig );
00046     virtual ~AdvSimConstraint_HEVertexVsHEVertex ();
00047     //-------------------------------------------------------------------------
00049     virtual std::string StrInfo () const;
00050     //-------------------------------------------------------------------------
00052     inline virtual AdvSimConstraint_HEVertexVsHEVertex<T> & operator= ( AdvSimConstraint_HEVertexVsHEVertex<T> const &orig );
00053 
00054     //-------------------------------------------------------------------------
00055     // Get/Set Functions
00056 
00058     HEVertex<T> *   GetPtrToVertexFromModel_1 ()    { return m_pV1; }
00060     HEVertex<T> *   GetPtrToVertexFromModel_2 ()    { return m_pV2; }
00062     HEVertex<T> const * GetPtrToVertexFromModel_1 () const  { return m_pV1; }
00064     HEVertex<T> const * GetPtrToVertexFromModel_2 () const  { return m_pV2; }
00066     void SetPtrToVertexFromObj_1 ( HEVertex<T> * pVertex )  { m_pV1 = pVertex; }
00068     void SetPtrToVertexFromObj_2 ( HEVertex<T> * pVertex )  { m_pV2 = pVertex; }
00069 
00070     //-------------------------------------------------------------------------
00071     // Functions for Advanced Simulation
00072 
00074     inline virtual void EnforceConstraint ();
00075 
00077     inline virtual void ClearConstraint ();
00078 
00079     // Data Members -----------------------------------------------------------
00080 //=============================================================================
00081 protected:
00082     // Member Functions -------------------------------------------------------
00083     // Data Members -----------------------------------------------------------
00084     HEVertex<T> *   m_pV1;  
00085     HEVertex<T> *   m_pV2;  
00086 //=============================================================================
00087 private:
00088     // Member Functions -------------------------------------------------------
00089     // Data Members -----------------------------------------------------------
00090 //=============================================================================
00091 
00092 #if defined(__gl_h_) || defined(__GL_H__)
00093 public:
00095     virtual void Draw () const;
00096 #endif
00097 
00098 //=============================================================================
00099 }; // END CLASS AdvSimConstraint_HEVertexVsHEVertex
00100 //=============================================================================
00101 END_NAMESPACE_TAPs
00102 //-----------------------------------------------------------------------------
00104 #include "TAPsAdvSimConstraint_HEVertexVsHEVertex.cpp"
00105 
00107 // Include definition if TAPs_USE_EXPORT is not defined
00108 //#if !defined( TAPs_USE_EXPORT )
00109 //  #include "TAPsAdvSimConstraint_HEVertexVsHEVertex.cpp"
00110 //#endif
00111 //-----------------------------------------------------------------------------
00112 #endif
00113 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00114 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines