Panda3D
physxBodyDesc.h
1 // Filename: physxBodyDesc.h
2 // Created by: enn0x (05Sep09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXBODYDESC_H
16 #define PHYSXBODYDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxEnums.h"
22 #include "physx_includes.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PhysxBodyDesc
26 // Description : Descriptor for the optional rigid body dynamic
27 // state of PhysxActor.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSX PhysxBodyDesc : public PhysxEnums {
30 
31 PUBLISHED:
32  INLINE PhysxBodyDesc();
33  INLINE ~PhysxBodyDesc();
34 
35  INLINE void set_to_default();
36  INLINE bool is_valid() const;
37 
38  void set_mass(float mass);
39  void set_linear_damping(float damping);
40  void set_angular_damping(float damping);
41  void set_linear_velocity(const LVector3f &velocity);
42  void set_angular_velocity(const LVector3f &velocity);
43  void set_max_angular_velocity(float maximum);
44  void set_sleep_linear_velocity(float velocity);
45  void set_sleep_angular_velocity(float velocity);
46  void set_solver_iteration_count(unsigned int count);
47  void set_sleep_energy_threshold(float threshold);
48  void set_sleep_damping(float damping);
49  void set_mass_local_mat(const LMatrix4f &mat);
50  void set_mass_space_inertia(const LVector3f &inertia);
51  void set_flag(PhysxBodyFlag flag, bool value);
52  void set_ccd_motion_threshold(float threshold);
53  void set_wake_up_counter(float value);
54  void set_contact_report_threshold(float threshold);
55 
56  float get_mass() const;
57  float get_linear_damping() const;
58  float get_angular_damping() const;
59  LVector3f get_linear_velocity() const;
60  LVector3f get_angular_velocity() const;
61  float get_max_angular_velocity() const;
62  float get_sleep_linear_velocity() const;
63  float get_sleep_angular_velocity() const;
64  unsigned int get_solver_iteration_count() const;
65  float get_sleep_energy_threshold() const;
66  float get_sleep_damping() const;
67  LMatrix4f get_mass_local_mat() const;
68  LVector3f get_mass_space_inertia() const;
69  bool get_flag(PhysxBodyFlag flag) const;
70  float get_ccd_motion_threshold() const;
71  float get_wake_up_counter() const;
72  float get_contact_report_threshold() const;
73 
74 public:
75  NxBodyDesc _desc;
76 };
77 
78 #include "physxBodyDesc.I"
79 
80 #endif // PHYSXBODYDESC_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
Descriptor for the optional rigid body dynamic state of PhysxActor.
Definition: physxBodyDesc.h:29