Panda3D
|
00001 // Filename: physxRaycastReport.h 00002 // Created by: enn0x (21Oct09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXRAYCASTREPORT_H 00016 #define PHYSXRAYCASTREPORT_H 00017 00018 #include "pandabase.h" 00019 #include "pvector.h" 00020 00021 #include "config_physx.h" 00022 00023 class PhysxRaycastHit; 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : PhysxRaycastReport 00027 // Description : Objects of this class are returned by the 'raycast 00028 // all' methods. They contain an iterable list of all 00029 // hits that the raycast query produced. 00030 //////////////////////////////////////////////////////////////////// 00031 class EXPCL_PANDAPHYSX PhysxRaycastReport : public NxUserRaycastReport { 00032 00033 PUBLISHED: 00034 unsigned int get_num_hits() const; 00035 PhysxRaycastHit get_first_hit(); 00036 PhysxRaycastHit get_next_hit(); 00037 PhysxRaycastHit get_hit(unsigned int idx); 00038 MAKE_SEQ(get_hits, get_num_hits, get_hit); 00039 00040 public: 00041 INLINE PhysxRaycastReport(); 00042 INLINE ~PhysxRaycastReport(); 00043 00044 virtual bool onHit(const NxRaycastHit& hit); 00045 00046 private: 00047 typedef pvector<PhysxRaycastHit> Hits; 00048 Hits _hits; 00049 00050 typedef Hits::const_iterator const_iterator; 00051 const_iterator _iterator; 00052 }; 00053 00054 #include "physxRaycastReport.I" 00055 00056 #endif // PHYSXRAYCASTREPORT_H