Panda3D

physxControllerReport.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 physxControllerReport.h
10 * @author enn0x
11 * @date 2009-09-24
12 */
13
14 #ifndef PHYSXCONTROLLERREPORT_H
15 #define PHYSXCONTROLLERREPORT_H
16
17 #include "pandabase.h"
18 #include "callbackObject.h"
19 #include "pStatCollector.h"
20
21 #include "physx_includes.h"
22
23 /**
24 * Implementation of the NxUserControllerHitReport interface.
25 */
26 class EXPCL_PANDAPHYSX PhysxControllerReport : public NxUserControllerHitReport {
27
28 public:
29 INLINE PhysxControllerReport();
30 INLINE ~PhysxControllerReport();
31
32 void enable();
33 void disable();
34 bool is_enabled() const;
35
36 INLINE void set_shape_hit_callback(PT(CallbackObject) cbobj);
37 INLINE void set_controller_hit_callback(PT(CallbackObject) cbobj);
38
39 virtual NxControllerAction onShapeHit(const NxControllerShapeHit& hit);
40 virtual NxControllerAction onControllerHit(const NxControllersHit& hit);
41
42 private:
43 bool _enabled;
44
45 PT(CallbackObject) _shape_hit_cbobj;
46 PT(CallbackObject) _controller_hit_cbobj;
47
48 static PStatCollector _pcollector;
49 };
50
51 #include "physxControllerReport.I"
52
53 #endif // PHYSXCONTROLLERREPORT_H
callbackObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CallbackObject
This is a generic object that can be assigned to a callback at various points in the rendering proces...
Definition: callbackObject.h:28
PStatCollector
A lightweight class that represents a single element that may be timed and/or counted via stats.
Definition: pStatCollector.h:43
PhysxControllerReport
Implementation of the NxUserControllerHitReport interface.
Definition: physxControllerReport.h:26
pStatCollector.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxControllerReport.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.