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