Panda3D
physxControllerShapeHit.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 physxControllerShapeHit.h
10  * @author enn0x
11  * @date 2012-11-28
12  */
13 
14 #ifndef PHYSXCONTROLLERSHAPEHIT
15 #define PHYSXCONTROLLERSHAPEHIT
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 #include "callbackObject.h"
20 
21 #include "physx_includes.h"
22 #include "physxManager.h"
23 
24 class PhysxController;
25 class PhysxShape;
26 
27 /**
28  *
29  */
30 class EXPCL_PANDAPHYSX PhysxControllerShapeHit : public CallbackData {
31 
32 PUBLISHED:
33  INLINE PhysxControllerShapeHit(const NxControllerShapeHit &hit);
34 
35  INLINE PhysxController *get_controller() const;
36  INLINE PhysxShape *get_shape() const;
37  INLINE LPoint3 get_world_pos() const;
38  INLINE LVector3 get_world_normal() const;
39  INLINE LVector3 get_dir() const;
40  INLINE PN_stdfloat get_length() const;
41 
42 private:
43  const NxControllerShapeHit &_hit;
44 
45 public:
46  static TypeHandle get_class_type() {
47  return _type_handle;
48  }
49  static void init_type() {
50  CallbackData::init_type();
51  register_type(_type_handle, "PhysxControllerShapeHit",
52  CallbackData::get_class_type());
53  }
54  virtual TypeHandle get_type() const {
55  return get_class_type();
56  }
57  virtual TypeHandle force_init_type() {
58  init_type();
59  return get_class_type();
60  }
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
67 
68 #endif // PHYSXCONTROLLERSHAPEHIT
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for shapes.
Definition: physxShape.h:39
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic data block that is passed along to a CallbackObject when a callback is made.
Definition: callbackData.h:29
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for character controllers.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.