Panda3D
|
00001 // Filename: physxRay.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 PHYSXRAY_H 00016 #define PHYSXRAY_H 00017 00018 #include "pandabase.h" 00019 #include "lvector3.h" 00020 #include "lpoint3.h" 00021 00022 #include "config_physx.h" 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : PhysxRay 00026 // Description : Represents an ray as an origin and direction. 00027 // The ray will be infinite if no length is given. 00028 //////////////////////////////////////////////////////////////////// 00029 class EXPCL_PANDAPHYSX PhysxRay { 00030 00031 PUBLISHED: 00032 INLINE PhysxRay(); 00033 INLINE ~PhysxRay(); 00034 00035 void set_length(float length); 00036 void set_origin(const LPoint3f &origin); 00037 void set_direction(const LVector3f &direction); 00038 00039 float get_length() const; 00040 LPoint3f get_origin() const; 00041 LVector3f get_direction() const; 00042 00043 public: 00044 NxRay _ray; 00045 NxReal _length; 00046 }; 00047 00048 #include "physxRay.I" 00049 00050 #endif // PHYSRAY_H