Panda3D
physxControllerShapeHit.h
1 // Filename: physxControllerShapeHit.h
2 // Created by: enn0x (28Nov12)
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 PHYSXCONTROLLERSHAPEHIT
16 #define PHYSXCONTROLLERSHAPEHIT
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 #include "callbackObject.h"
21 
22 #include "physx_includes.h"
23 #include "physxManager.h"
24 
25 class PhysxController;
26 class PhysxShape;
27 
28 ////////////////////////////////////////////////////////////////////
29 // Class : PhysxControllerShapeHit
30 // Description :
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAPHYSX PhysxControllerShapeHit : public CallbackData {
33 
34 PUBLISHED:
35  INLINE PhysxControllerShapeHit(const NxControllerShapeHit &hit);
36 
37  INLINE PhysxController *get_controller() const;
38  INLINE PhysxShape *get_shape() const;
39  INLINE LPoint3 get_world_pos() const;
40  INLINE LVector3 get_world_normal() const;
41  INLINE LVector3 get_dir() const;
42  INLINE PN_stdfloat get_length() const;
43 
44 private:
45  const NxControllerShapeHit &_hit;
46 
47 ////////////////////////////////////////////////////////////////////
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  CallbackData::init_type();
54  register_type(_type_handle, "PhysxControllerShapeHit",
55  CallbackData::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {
61  init_type();
62  return get_class_type();
63  }
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "physxControllerShapeHit.I"
70 
71 #endif // PHYSXCONTROLLERSHAPEHIT
Abstract base class for shapes.
Definition: physxShape.h:41
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
This is a generic data block that is passed along to a CallbackObject when a callback is made...
Definition: callbackData.h:32
Abstract base class for character controllers.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85