Panda3D
physxJointDesc.h
1 // Filename: physxJointDesc.h
2 // Created by: enn0x (28Sep09)
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 PHYSXJOINTDESC_H
16 #define PHYSXJOINTDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxEnums.h"
22 #include "physx_includes.h"
23 
24 class PhysxActor;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxJointDesc
28 // Description : Abstract base class for joint descriptors.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxJointDesc : public PhysxEnums {
31 
32 PUBLISHED:
33  virtual void set_to_default() = 0;
34  virtual bool is_valid() const = 0;
35 
36  void set_name(const char *name);
37  void set_joint_flag(PhysxJointFlag flag, bool value);
38  void set_max_force(float force);
39  void set_max_torque(float torque);
40  void set_solver_extrapolation_factor(float factor);
41  void set_global_axis(const LVector3f &axis);
42  void set_global_anchor(const LPoint3f &anchor);
43  void set_local_normal(unsigned int idx, const LVector3f &normal);
44  void set_local_axis(unsigned int idx, const LVector3f &axis);
45  void set_local_anchor(unsigned int idx, const LPoint3f &anchor);
46  void set_actor(unsigned int idx, const PhysxActor &actor);
47 
48  const char *get_name() const;
49  bool get_joint_flag(PhysxJointFlag flag) const;
50  float get_max_force() const;
51  float get_max_torque() const;
52  float get_solver_extrapolation_factor() const;
53  LVector3f get_local_normal(unsigned int idx) const;
54  LVector3f get_local_axis(unsigned int idx) const;
55  LPoint3f get_local_anchor(unsigned int idx) const;
56  PhysxActor *get_actor(unsigned int idx) const;
57 
58 public:
59  virtual NxJointDesc *ptr() const = 0;
60 
61 private:
62  string _name;
63 
64 protected:
65  INLINE PhysxJointDesc();
66  INLINE ~PhysxJointDesc();
67 };
68 
69 #include "physxJointDesc.I"
70 
71 #endif // PHYSXJOINTDESC_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
Abstract base class for joint descriptors.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This class exists just to provide scoping for the enums shared by PhysX classes.
Definition: physxEnums.h:357
Actors are the main simulation objects.
Definition: physxActor.h:48