Panda3D
physxBoxController.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 physxBoxController.h
10  * @author enn0x
11  * @date 2009-09-24
12  */
13 
14 #ifndef PHYSXBOXCONTROLLER_H
15 #define PHYSXBOXCONTROLLER_H
16 
17 #include "pandabase.h"
18 #include "luse.h"
19 
20 #include "physxController.h"
21 #include "physx_includes.h"
22 
23 /**
24  * Box character controller.
25  */
26 class EXPCL_PANDAPHYSX PhysxBoxController : public PhysxController {
27 
28 PUBLISHED:
29  INLINE PhysxBoxController();
30  INLINE ~PhysxBoxController();
31 
32  void set_extents(const LVector3f &extents);
33  LVector3f get_extents() const;
34 
35 public:
36  INLINE NxController *ptr() const { return (NxController *)_ptr; };
37 
38  void link(NxController *controllerPtr);
39  void unlink();
40 
41 private:
42  NxBoxController *_ptr;
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  PhysxController::init_type();
50  register_type(_type_handle, "PhysxBoxController",
51  PhysxController::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {
57  init_type();
58  return get_class_type();
59  }
60 
61 private:
62  static TypeHandle _type_handle;
63 };
64 
65 #include "physxBoxController.I"
66 
67 #endif // PHYSXBOXCONTROLLER_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
Box character controller.
Abstract base class for character controllers.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81