Panda3D
physxBoxController.h
1 // Filename: physxBoxController.h
2 // Created by: enn0x (24Sep09)
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 PHYSXBOXCONTROLLER_H
16 #define PHYSXBOXCONTROLLER_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxController.h"
22 #include "physx_includes.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : PhysxBoxController
26 // Description : Box character controller.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAPHYSX PhysxBoxController : public PhysxController {
29 
30 PUBLISHED:
31  INLINE PhysxBoxController();
32  INLINE ~PhysxBoxController();
33 
34  void set_extents(const LVector3f &extents);
35  LVector3f get_extents() const;
36 
37 ////////////////////////////////////////////////////////////////////
38 public:
39  INLINE NxController *ptr() const { return (NxController *)_ptr; };
40 
41  void link(NxController *controllerPtr);
42  void unlink();
43 
44 private:
45  NxBoxController *_ptr;
46 
47 ////////////////////////////////////////////////////////////////////
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  PhysxController::init_type();
54  register_type(_type_handle, "PhysxBoxController",
55  PhysxController::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 "physxBoxController.I"
70 
71 #endif // PHYSXBOXCONTROLLER_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
Box character controller.
Abstract base class for character controllers.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85