![]() |
TAPs 0.7.7.3
|
00001 /****************************************************************************** 00002 TAPsPhysicalProperties.hpp 00003 ******************************************************************************/ 00007 /****************************************************************************** 00008 SUKITTI PUNAK (08/19/2010) 00009 UPDATE (09/16/2010) 00010 ******************************************************************************/ 00011 #ifndef TAPs_PHYSICAL_PROPERTIES_HPP 00012 #define TAPs_PHYSICAL_PROPERTIES_HPP 00013 00014 #include "../Core/TAPsLib.hpp" 00015 00016 BEGIN_NAMESPACE_TAPs 00017 //============================================================================= 00018 template <typename T> 00019 class PhysicalProperties { 00020 00021 // Friend Function 00022 friend std::ostream & operator<< ( std::ostream &output, PhysicalProperties<T> const &P ) 00023 { 00024 return output << P.StrInfo(); 00025 } 00026 00027 // Member Functions ----------------------------------------------------------- 00028 public: 00029 00031 PhysicalProperties (); 00032 00034 PhysicalProperties ( const PhysicalProperties<T> & orig ); 00035 00037 virtual ~PhysicalProperties (); 00038 00040 virtual std::string StrInfo () const; 00041 00043 inline PhysicalProperties<T> & operator= ( PhysicalProperties<T> const & orig ); 00044 00045 //========================================================================= 00046 // Physical Properties 00047 //------------------------------------------------------------------------- 00048 T Elasticity; 00049 T Mass; 00050 T Volume; 00051 Vector3<T> CenterOfMass; 00052 Quaternion<T> Orientation; 00053 00054 Matrix3x3<T> MomentOfInertia; 00055 Matrix3x3<T> InvMomentOfInertia; 00056 00057 Vector3<T> LinearMomentum; 00058 Vector3<T> AngularMomentum; 00059 Vector3<T> LinearVelocity; 00060 Vector3<T> AngularVelocity; 00061 Vector3<T> LinearAcceleration; 00062 Vector3<T> AngularAcceleration; 00063 00064 Vector3<T> TotalForce; 00065 Vector3<T> TotalTorque; 00066 00067 Vector3<T> DampingLinearVelocity; 00068 Vector3<T> DampingAngularVelocity; 00069 00070 T GravitationalConstant; 00071 00072 //------------------------------------------------------------------------- 00073 00074 }; 00075 //============================================================================= 00076 END_NAMESPACE_TAPs 00077 //----------------------------------------------------------------------------- 00078 // Include definition if TAPs_USE_EXPORT is not defined 00079 //#if !defined( TAPs_USE_EXPORT ) 00080 #include "TAPsPhysicalProperties.cpp" 00081 //#endif 00082 //----------------------------------------------------------------------------- 00083 #endif 00084 //34567890123456789012345678901234567890123456789012345678901234567890123456789 00085 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----