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