Panda3D

physxRaycastHit.h

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