Panda3D
physxRaycastReport.h
1 // Filename: physxRaycastReport.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 PHYSXRAYCASTREPORT_H
16 #define PHYSXRAYCASTREPORT_H
17 
18 #include "pandabase.h"
19 #include "pvector.h"
20 
21 #include "config_physx.h"
22 
23 class PhysxRaycastHit;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxRaycastReport
27 // Description : Objects of this class are returned by the 'raycast
28 // all' methods. They contain an iterable list of all
29 // hits that the raycast query produced.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxRaycastReport : public NxUserRaycastReport {
32 
33 PUBLISHED:
34  unsigned int get_num_hits() const;
35  PhysxRaycastHit get_first_hit();
36  PhysxRaycastHit get_next_hit();
37  PhysxRaycastHit get_hit(unsigned int idx);
38  MAKE_SEQ(get_hits, get_num_hits, get_hit);
39 
40 public:
41  INLINE PhysxRaycastReport();
42  INLINE ~PhysxRaycastReport();
43 
44  virtual bool onHit(const NxRaycastHit& hit);
45 
46 private:
48  Hits _hits;
49 
50  typedef Hits::const_iterator const_iterator;
51  const_iterator _iterator;
52 };
53 
54 #include "physxRaycastReport.I"
55 
56 #endif // PHYSXRAYCASTREPORT_H
This structure captures results for a single raycast query.
Objects of this class are returned by the 'raycast all' methods.