00001 00002 #ifndef _MC_SPHERE_PHYSIC_HPP_ 00003 #define _MC_SPHERE_PHYSIC_HPP_ 00004 00005 #include <MC_sphere_geometry.hpp> 00006 00007 namespace mesh_conv 00008 { 00010 class MC_sphere_physic : public MC_sphere_geometry 00011 { 00012 public: 00013 00014 // ********************************************* // 00015 // ********************************************* // 00016 // CONSTRUCTORS 00017 // ********************************************* // 00018 // ********************************************* // 00019 00021 MC_sphere_physic(); 00023 MC_sphere_physic(const MC_v3d& position,const double& radius); 00025 MC_sphere_physic(const MC_v3d& position,const double& radius,const MC_v3d& speed_init); 00026 00027 00028 // ********************************************* // 00029 // ********************************************* // 00030 // Get parameters 00031 // ********************************************* // 00032 // ********************************************* // 00033 00035 MC_v3d& speed(); 00037 const MC_v3d& speed() const; 00038 00040 MC_v3d& force(); 00042 const MC_v3d& force() const; 00043 00045 double& mass(); 00047 const double& mass() const; 00048 00050 double& damping_factor(); 00052 const double& damping_factor() const; 00053 00054 // ********************************************* // 00055 // ********************************************* // 00056 // Time evolution 00057 // ********************************************* // 00058 // ********************************************* // 00059 00061 void evolve(const double& delta_t); 00062 00063 00064 // ********************************************* // 00065 // ********************************************* // 00066 // Constraints 00067 // ********************************************* // 00068 // ********************************************* // 00069 00070 00072 void constraint_in_unit_cube(); 00073 00075 static void constraint_no_collision_sphere(MC_sphere_physic* sphere_1,MC_sphere_physic* sphere_2); 00076 00077 private: 00078 00079 00081 MC_v3d speed_internal; 00083 MC_v3d force_internal; 00084 00086 double mass_internal; 00088 double damping_factor_internal; 00089 00090 00091 }; 00092 } 00093 00094 #endif
1.6.1