Panda3D
 All Classes Functions Variables Enumerations
physxTriggerReport.h
1 // Filename: physxTriggerReport.h
2 // Created by: enn0x (19Sep09)
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 PHYSXTRIGGERREPORT_H
16 #define PHYSXTRIGGERREPORT_H
17 
18 #include "pandabase.h"
19 #include "pStatCollector.h"
20 
21 #include "physx_includes.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxTriggerReport
25 // Description : Implementation of the NxUserTriggerReport
26 // interface.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAPHYSX PhysxTriggerReport : public NxUserTriggerReport {
29 
30 public:
31  INLINE PhysxTriggerReport();
32  INLINE ~PhysxTriggerReport();
33 
34  void enable();
35  void disable();
36  bool is_enabled() const;
37 
38  void onTrigger(NxShape &triggerShape, NxShape &otherShape, NxTriggerFlag status);
39 
40 private:
41  bool _enabled;
42  static PStatCollector _pcollector;
43 };
44 
45 #include "physxTriggerReport.I"
46 
47 #endif // PHYSXTRIGGERREPORT_H
A lightweight class that represents a single element that may be timed and/or counted via stats...
Implementation of the NxUserTriggerReport interface.