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