Panda3D
|
00001 // Filename: physxBodyDesc.h 00002 // Created by: enn0x (05Sep09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXBODYDESC_H 00016 #define PHYSXBODYDESC_H 00017 00018 #include "pandabase.h" 00019 #include "lvector3.h" 00020 #include "lmatrix.h" 00021 00022 #include "physxEnums.h" 00023 #include "physx_includes.h" 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : PhysxBodyDesc 00027 // Description : Descriptor for the optional rigid body dynamic 00028 // state of PhysxActor. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDAPHYSX PhysxBodyDesc : public PhysxEnums { 00031 00032 PUBLISHED: 00033 INLINE PhysxBodyDesc(); 00034 INLINE ~PhysxBodyDesc(); 00035 00036 INLINE void set_to_default(); 00037 INLINE bool is_valid() const; 00038 00039 void set_mass(float mass); 00040 void set_linear_damping(float damping); 00041 void set_angular_damping(float damping); 00042 void set_linear_velocity(const LVector3f &velocity); 00043 void set_angular_velocity(const LVector3f &velocity); 00044 void set_max_angular_velocity(float maximum); 00045 void set_sleep_linear_velocity(float velocity); 00046 void set_sleep_angular_velocity(float velocity); 00047 void set_solver_iteration_count(unsigned int count); 00048 void set_sleep_energy_threshold(float threshold); 00049 void set_sleep_damping(float damping); 00050 void set_mass_local_mat(const LMatrix4f mat); 00051 void set_mass_space_inertia(const LVector3f inertia); 00052 void set_flag(PhysxBodyFlag flag, bool value); 00053 void set_ccd_motion_threshold(float threshold); 00054 void set_wake_up_counter(float value); 00055 void set_contact_report_threshold(float threshold); 00056 00057 float get_mass() const; 00058 float get_linear_damping() const; 00059 float get_angular_damping() const; 00060 LVector3f get_linear_velocity() const; 00061 LVector3f get_angular_velocity() const; 00062 float get_max_angular_velocity() const; 00063 float get_sleep_linear_velocity() const; 00064 float get_sleep_angular_velocity() const; 00065 unsigned int get_solver_iteration_count() const; 00066 float get_sleep_energy_threshold() const; 00067 float get_sleep_damping() const; 00068 LMatrix4f get_mass_local_mat() const; 00069 LVector3f get_mass_space_inertia() const; 00070 bool get_flag(PhysxBodyFlag flag) const; 00071 float get_ccd_motion_threshold() const; 00072 float get_wake_up_counter() const; 00073 float get_contact_report_threshold() const; 00074 00075 public: 00076 NxBodyDesc _desc; 00077 }; 00078 00079 #include "physxBodyDesc.I" 00080 00081 #endif // PHYSXBODYDESC_H