Panda3D
|
00001 // Filename: physxSphere.h 00002 // Created by: enn0x (31Oct09) 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 PHYSXSPHERE_H 00016 #define PHYSXSPHERE_H 00017 00018 #include "pandabase.h" 00019 #include "luse.h" 00020 00021 #include "config_physx.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : PhysxSphere 00025 // Description : Represents a sphere defined by its center point 00026 // and radius. 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDAPHYSX PhysxSphere { 00029 00030 PUBLISHED: 00031 INLINE PhysxSphere(); 00032 INLINE PhysxSphere(const PhysxSphere &sphere); 00033 INLINE ~PhysxSphere(); 00034 00035 bool contains(const LPoint3f &p) const; 00036 bool contains(const PhysxSphere &sphere) const; 00037 bool contains(const LPoint3f &min, const LPoint3f &max) const; 00038 bool intersect(const PhysxSphere &sphere) const; 00039 bool is_valid() const; 00040 00041 LPoint3f get_center() const; 00042 float get_radius() const; 00043 00044 void set_center(LPoint3f value); 00045 void set_radius(float value); 00046 00047 public: 00048 NxSphere _sphere; 00049 }; 00050 00051 #include "physxSphere.I" 00052 00053 #endif // PHYSSPHERE_H