Panda3D
physxCapsule.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 physxCapsule.h
10  * @author enn0x
11  * @date 2009-10-31
12  */
13 
14 #ifndef PHYSXCAPSULE_H
15 #define PHYSXCAPSULE_H
16 
17 #include "pandabase.h"
18 
19 #include "config_physx.h"
20 #include "physxSegment.h"
21 
22 /**
23  * Represents a capsule.
24  */
25 class EXPCL_PANDAPHYSX PhysxCapsule {
26 
27 PUBLISHED:
28  INLINE PhysxCapsule();
29  INLINE PhysxCapsule(const PhysxSegment &segment, float radius);
30  INLINE ~PhysxCapsule();
31 
32  void compute_direction(LPoint3f &dir) const;
33  float compute_length() const;
34  void compute_point(LPoint3f &p, float t) const;
35  float compute_square_length() const;
36  LPoint3f get_origin() const;
37  void set_origin_direction(const LPoint3f &origin, const LVector3f &direction);
38 
39  float get_radius() const;
40  LPoint3f get_p0() const;
41  LPoint3f get_p1() const;
42 
43  void set_radius(float value);
44  void set_p0(LPoint3f p);
45  void set_p1(LPoint3f p);
46 
47 public:
48  NxCapsule _capsule;
49 };
50 
51 #include "physxCapsule.I"
52 
53 #endif // PHYSCAPSULE_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents a line segment.
Definition: physxSegment.h:25
Represents a capsule.
Definition: physxCapsule.h:25
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.