TAPs 0.7.7.3
TAPsElasticRodParameters.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsElasticRodParameters.hpp
00003 ******************************************************************************/
00007 /******************************************************************************
00008 SUKITTI PUNAK   (07/07/2009)
00009 UPDATE          (12/17/2010)
00010 ******************************************************************************/
00011 #ifndef TAPs_ELASTIC_ROD_PARAMETERS_HPP
00012 #define TAPs_ELASTIC_ROD_PARAMETERS_HPP
00013 
00014 #include "../../Core/TAPsLib.hpp"
00015 
00016 BEGIN_NAMESPACE_TAPs
00017 //=============================================================================
00018 template <typename T>
00019 class ElasticRodParameters {
00020 public:
00021     // Member Functions -------------------------------------------------------
00023     friend std::ostream & operator<< ( std::ostream &output, ElasticRodParameters<T> const &obj )
00024     {
00025         output << obj.StrInfo();
00026         return output;
00027     }
00028 
00030     ElasticRodParameters ();
00031 
00033     ElasticRodParameters & operator= (  ElasticRodParameters const & orig );
00034 
00036     std::string StrInfo () const;
00037 
00039     inline void CalDependentParameters ();
00040 
00041 
00043     //void ScaleAllSimConstsByTimeStep ();
00044 
00045     // Data Members -----------------------------------------------------------
00046     std::string Name;   
00047 
00048     // Physical properties
00049     int NumOfNodes;     
00050     T   Radius;         
00051     T   TotalMass;      
00052     T   TotalLength;    
00053     T   LinkLength;     
00054     T   MassOfPoint;    
00055 
00056     // Material and Moduli
00057     T Kstretch_modulus;     
00058     T Kbend_modulus;        
00059     T Kshear_modulus;       
00060     T MaterialDensity;      
00061 
00062     // K constants
00063     T Kt;           
00064     T Kr[3];        
00065     T Dt;           
00066     T Dr[3];        
00067     T Kconstraint_3rdDirAlignTangent;       
00068     T Kconstraint_ScaleIntrinsicStrainRate; 
00069     T Kvdamping;    
00070 
00071     T Kgravity;     
00072 #ifdef  TAPs_ADD_RESTING_LEVEL_Y
00073     T RestingLevel; 
00074 #endif//TAPs_ADD_RESTING_LEVEL_Y
00075 
00076     // These two below will be set by the values of moduli
00077     T Ps;           
00078     T Pb[3];        
00079 
00080     // For collision detection and response
00081     bool    EnableSelfCDR;  
00082     T       KselfCDR;       
00083     T       KselfCDR_ScaleDistance;     
00084     T       KselfStick;     
00085 
00086     // For collision detection and response with objects
00087     T   K_CDRwBV_Cylinder;  
00088     T   K_CDRwBV_Sphere;    
00089     T   K_CDRwTriangle;     
00090 
00091     // For collision detection and response with implicit objects
00092     T   K_CDRwImpObj_Sphere;    
00093     T   K_CDRwImpObj_Torus;     
00094     T   Offset_CD_ImpObj_Sphere;    
00095     T   Offset_CD_ImpObj_Torus;     
00096 
00097     // Simulation time step and iterations
00098     T   TimeStep;                   
00099     unsigned int SimIterationTimes; 
00100 
00101     // Offsets
00102     T   Offset_CD_Self;         
00103     T   Offset_CD_SelfStick;    
00104     T   Offset_CD_Triangle;     
00105     T   Offset_CD_BV_Sphere;    
00106     T   Offset_CD_BV_Cylinder;  
00107 
00108 #ifdef  TAPs_ADD_KNOT_RECOGNITION
00109     // For knot recognition
00110     bool    EnableKR;           
00111     bool    EnableKR_LockKnots; 
00112     T       KstickPair;         
00113 #endif//#ifdef  TAPs_ADD_KNOT_RECOGNITION
00114 
00115 #ifdef  TAPs_USE_CUDA
00116     bool    EnableCUDA;                 
00117     bool    EnableCUDA_GenDrawData;     
00118 #endif//TAPs_USE_CUDA
00119 
00120 //=============================================================================
00121 }; // CLASS END: ElasticRodParameters
00122 //=============================================================================
00123 END_NAMESPACE_TAPs
00124 //-----------------------------------------------------------------------------
00125 #include "TAPsElasticRodParameters.cpp"
00126 //-----------------------------------------------------------------------------
00127 #endif
00128 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00129 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines