Panda3D
physxOverlapReport.h
1 // Filename: physOverlapReport.h
2 // Created by: enn0x (21Oct09)
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 PHYSXOVERLAPREPORT_H
16 #define PHYSXOVERLAPREPORT_H
17 
18 #include "pandabase.h"
19 #include "pvector.h"
20 #include "pointerTo.h"
21 
22 #include "config_physx.h"
23 #include "physx_includes.h"
24 
25 class PhysxShape;
26 
27 class PhysxUserEntityReport : public NxUserEntityReport<NxShape *> {};
28 
29 ////////////////////////////////////////////////////////////////////
30 // Class : PhysxOverlapReport
31 // Description : Objects of this class are returned by the 'overlap
32 // shape' methods, for example overlapSphereShapes.
33 // They contain an iterable list of all sshapes that
34 // the raycast query produced.
35 ////////////////////////////////////////////////////////////////////
36 class EXPCL_PANDAPHYSX PhysxOverlapReport : public PhysxUserEntityReport {
37 
38 PUBLISHED:
39  unsigned int get_num_overlaps() const;
40  PhysxShape *get_first_overlap();
41  PhysxShape *get_next_overlap();
42  PhysxShape *get_overlap(unsigned int idx);
43  MAKE_SEQ(get_overlaps, get_num_overlaps, get_overlap);
44 
45 public:
46  INLINE PhysxOverlapReport();
47  INLINE ~PhysxOverlapReport();
48 
49  virtual bool onEvent(NxU32 nbEntities, NxShape **entities);
50 
51 private:
53  Overlaps _overlaps;
54 
55  typedef Overlaps::const_iterator const_iterator;
56  const_iterator _iterator;
57 };
58 
59 #include "physxOverlapReport.I"
60 
61 #endif // PHYSXOVERLAPREPORT_H
Objects of this class are returned by the &#39;overlap shape&#39; methods, for example overlapSphereShapes.
Abstract base class for shapes.
Definition: physxShape.h:41