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 "luse.h" 00020 00021 #include "physxEnums.h" 00022 #include "physx_includes.h" 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : PhysxBodyDesc 00026 // Description : Descriptor for the optional rigid body dynamic 00027 // state of PhysxActor. 00028 //////////////////////////////////////////////////////////////////// 00029 class EXPCL_PANDAPHYSX PhysxBodyDesc : public PhysxEnums { 00030 00031 PUBLISHED: 00032 INLINE PhysxBodyDesc(); 00033 INLINE ~PhysxBodyDesc(); 00034 00035 INLINE void set_to_default(); 00036 INLINE bool is_valid() const; 00037 00038 void set_mass(float mass); 00039 void set_linear_damping(float damping); 00040 void set_angular_damping(float damping); 00041 void set_linear_velocity(const LVector3f &velocity); 00042 void set_angular_velocity(const LVector3f &velocity); 00043 void set_max_angular_velocity(float maximum); 00044 void set_sleep_linear_velocity(float velocity); 00045 void set_sleep_angular_velocity(float velocity); 00046 void set_solver_iteration_count(unsigned int count); 00047 void set_sleep_energy_threshold(float threshold); 00048 void set_sleep_damping(float damping); 00049 void set_mass_local_mat(const LMatrix4f mat); 00050 void set_mass_space_inertia(const LVector3f inertia); 00051 void set_flag(PhysxBodyFlag flag, bool value); 00052 void set_ccd_motion_threshold(float threshold); 00053 void set_wake_up_counter(float value); 00054 void set_contact_report_threshold(float threshold); 00055 00056 float get_mass() const; 00057 float get_linear_damping() const; 00058 float get_angular_damping() const; 00059 LVector3f get_linear_velocity() const; 00060 LVector3f get_angular_velocity() const; 00061 float get_max_angular_velocity() const; 00062 float get_sleep_linear_velocity() const; 00063 float get_sleep_angular_velocity() const; 00064 unsigned int get_solver_iteration_count() const; 00065 float get_sleep_energy_threshold() const; 00066 float get_sleep_damping() const; 00067 LMatrix4f get_mass_local_mat() const; 00068 LVector3f get_mass_space_inertia() const; 00069 bool get_flag(PhysxBodyFlag flag) const; 00070 float get_ccd_motion_threshold() const; 00071 float get_wake_up_counter() const; 00072 float get_contact_report_threshold() const; 00073 00074 public: 00075 NxBodyDesc _desc; 00076 }; 00077 00078 #include "physxBodyDesc.I" 00079 00080 #endif // PHYSXBODYDESC_H