![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsSimPropForMultiPartMeshModel.cpp 00003 00004 SimPropForMultiPartMeshModel class (cpp file). 00005 00006 SUKITTI PUNAK (07/25/2008) 00007 UPDATE (10/07/2009) 00008 ******************************************************************************/ 00009 #include "TAPsSimPropForMultiPartMeshModel.hpp" 00010 // Using Inclusion Model (i.e. definitions are included in declarations) 00011 // (this name.cpp is included in name.hpp) 00012 // Each friend is defined directly inside its declaration. 00013 00014 BEGIN_NAMESPACE_TAPs 00015 //============================================================================= 00016 //----------------------------------------------------------------------------- 00017 00018 //----------------------------------------------------------------------------- 00020 template <typename T> 00021 SimPropForMultiPartMeshModel<T>::SimPropForMultiPartMeshModel ( 00022 T springStiffness, 00023 T springDamper, 00024 T massOfPoint, 00025 TAPs::Enum::ModelType modelType, 00026 T predefinedTimeStep, 00027 int numSimSubSteps, 00028 bool enableColDet, 00029 bool enableSimulation 00030 ) 00031 : m_tKStiffness( springStiffness ), 00032 m_tKDamper( springDamper ), 00033 m_tPtMass( massOfPoint ), 00034 m_eModelType( modelType ), 00035 m_tPredefinedTimeStep( predefinedTimeStep ), 00036 m_iNumSimSubSteps( numSimSubSteps ), 00037 m_bColDetOn( enableColDet ), 00038 m_bSimOn( enableSimulation ) 00039 {} 00040 00041 //----------------------------------------------------------------------------- 00043 template <typename T> 00044 SimPropForMultiPartMeshModel<T>::SimPropForMultiPartMeshModel ( 00045 SimPropForMultiPartMeshModel<T> const &obj ) 00046 { 00047 m_tKStiffness = obj.m_tKStiffness; 00048 m_tKDamper = obj.m_tKDamper; 00049 m_tPtMass = obj.m_tPtMass; 00050 m_eModelType = obj.m_eModelType; 00051 m_tPredefinedTimeStep = obj.m_tPredefinedTimeStep; 00052 m_iNumSimSubSteps = obj.m_iNumSimSubSteps; 00053 m_bColDetOn = obj.m_bColDetOn; 00054 m_bSimOn = obj.m_bSimOn; 00055 } 00056 00057 //----------------------------------------------------------------------------- 00059 template <typename T> 00060 SimPropForMultiPartMeshModel<T>::~SimPropForMultiPartMeshModel () 00061 {} 00062 00063 //----------------------------------------------------------------------------- 00065 template <typename T> 00066 std::string SimPropForMultiPartMeshModel<T>::StrInfo () const 00067 { 00068 std::ostringstream ss; 00069 ss << "SimPropForMultiPartMeshModel<" << typeid(T).name() << "> ==>" 00070 << " Spring Stiffness(" << m_tKStiffness 00071 << ") Damper(" << m_tKDamper 00072 << ") Mass of Point (" << m_tPtMass 00073 << ") Collision Detection ("; 00074 if ( m_bColDetOn ) ss << "On"; 00075 else ss << "Off"; 00076 ss << ") Simulation ("; 00077 if ( m_bSimOn ) ss << "On"; 00078 else ss << "Off"; 00079 ss << ".\n"; 00080 return ss.str(); 00081 } 00082 00083 //----------------------------------------------------------------------------- 00085 template <typename T> 00086 SimPropForMultiPartMeshModel<T> & SimPropForMultiPartMeshModel<T>::operator= ( 00087 SimPropForMultiPartMeshModel<T> const &obj ) 00088 { 00089 m_tKStiffness = obj.m_tKStiffness; 00090 m_tKDamper = obj.m_tKDamper; 00091 m_tPtMass = obj.m_tPtMass; 00092 m_bColDetOn = obj.m_bColDetOn; 00093 m_bSimOn = obj.m_bSimOn; 00094 00095 return *this; 00096 } 00097 00098 //----------------------------------------------------------------------------- 00099 //============================================================================= 00100 END_NAMESPACE_TAPs 00101 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00102 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----