Panda3D
|
00001 // Filename: physxRaycastHit.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 PHYSXRAYCASTHIT_H 00016 #define PHYSXRAYCASTHIT_H 00017 00018 #include "pandabase.h" 00019 #include "lvector3.h" 00020 #include "lpoint3.h" 00021 00022 #include "config_physx.h" 00023 00024 class PhysxShape; 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : PhysxRaycastHit 00028 // Description : This structure captures results for a single 00029 // raycast query. See PhysxScene for raycasting 00030 // methods. 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_PANDAPHYSX PhysxRaycastHit { 00033 00034 PUBLISHED: 00035 INLINE PhysxRaycastHit(const NxRaycastHit hit); 00036 INLINE ~PhysxRaycastHit(); 00037 00038 bool is_empty() const; 00039 00040 PhysxShape *get_shape() const; 00041 LPoint3f get_impact_pos() const; 00042 LVector3f get_impact_normal() const; 00043 float get_distance() const; 00044 00045 private: 00046 NxRaycastHit _hit; 00047 }; 00048 00049 #include "physxRaycastHit.I" 00050 00051 #endif // PHYSXRAYCASTHIT_H