Panda3D
physxJointDesc.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 physxJointDesc.h
10  * @author enn0x
11  * @date 2009-09-28
12  */
13 
14 #ifndef PHYSXJOINTDESC_H
15 #define PHYSXJOINTDESC_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "physxEnums.h"
21 #include "physx_includes.h"
22 
23 class PhysxActor;
24 
25 /**
26  * Abstract base class for joint descriptors.
27  */
28 class EXPCL_PANDAPHYSX PhysxJointDesc : public PhysxEnums {
29 
30 PUBLISHED:
31  virtual void set_to_default() = 0;
32  virtual bool is_valid() const = 0;
33 
34  void set_name(const char *name);
35  void set_joint_flag(PhysxJointFlag flag, bool value);
36  void set_max_force(float force);
37  void set_max_torque(float torque);
38  void set_solver_extrapolation_factor(float factor);
39  void set_global_axis(const LVector3f &axis);
40  void set_global_anchor(const LPoint3f &anchor);
41  void set_local_normal(unsigned int idx, const LVector3f &normal);
42  void set_local_axis(unsigned int idx, const LVector3f &axis);
43  void set_local_anchor(unsigned int idx, const LPoint3f &anchor);
44  void set_actor(unsigned int idx, const PhysxActor &actor);
45 
46  const char *get_name() const;
47  bool get_joint_flag(PhysxJointFlag flag) const;
48  float get_max_force() const;
49  float get_max_torque() const;
50  float get_solver_extrapolation_factor() const;
51  LVector3f get_local_normal(unsigned int idx) const;
52  LVector3f get_local_axis(unsigned int idx) const;
53  LPoint3f get_local_anchor(unsigned int idx) const;
54  PhysxActor *get_actor(unsigned int idx) const;
55 
56 public:
57  virtual NxJointDesc *ptr() const = 0;
58 
59 private:
60  std::string _name;
61 
62 protected:
63  INLINE PhysxJointDesc();
64  INLINE ~PhysxJointDesc();
65 };
66 
67 #include "physxJointDesc.I"
68 
69 #endif // PHYSXJOINTDESC_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for joint descriptors.
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:355
Actors are the main simulation objects.
Definition: physxActor.h:44
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.