Panda3D
physxCapsule.h
1 // Filename: physxCapsule.h
2 // Created by: enn0x (31Oct09)
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 PHYSXCAPSULE_H
16 #define PHYSXCAPSULE_H
17 
18 #include "pandabase.h"
19 
20 #include "config_physx.h"
21 #include "physxSegment.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxCapsule
25 // Description : Represents a capsule.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSX PhysxCapsule {
28 
29 PUBLISHED:
30  INLINE PhysxCapsule();
31  INLINE PhysxCapsule(const PhysxSegment &segment, float radius);
32  INLINE ~PhysxCapsule();
33 
34  void compute_direction(LPoint3f &dir) const;
35  float compute_length() const;
36  void compute_point(LPoint3f &p, float t) const;
37  float compute_square_length() const;
38  LPoint3f get_origin() const;
39  void set_origin_direction(const LPoint3f &origin, const LVector3f &direction);
40 
41  float get_radius() const;
42  LPoint3f get_p0() const;
43  LPoint3f get_p1() const;
44 
45  void set_radius(float value);
46  void set_p0(LPoint3f p);
47  void set_p1(LPoint3f p);
48 
49 public:
50  NxCapsule _capsule;
51 };
52 
53 #include "physxCapsule.I"
54 
55 #endif // PHYSCAPSULE_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Represents a line segment.
Definition: physxSegment.h:27
Represents a capsule.
Definition: physxCapsule.h:27