Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/Sphere.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef SPHERE_H
00004 #define SPHERE_H
00005 
00006 
00007 #include "Vector3f.h"
00008 
00009 
00010 namespace pge {
00011 
00012         class AABB;
00013 
00014         class Sphere {
00015 
00016         public:
00017                 //************************************************************************
00018                 //
00019                 // Constructor
00020                 //
00021                 //************************************************************************
00023                 Sphere(const Vector3f &center, float radius);
00024 
00026                 Sphere(AABB *aabb);
00027 
00028 
00029                 //************************************************************************
00030                 //
00031                 // Destructor
00032                 //
00033                 //************************************************************************
00035                 ~Sphere(void);
00036 
00037 
00038                 //************************************************************************
00039                 //
00040                 // Functions
00041                 //
00042                 //************************************************************************
00044 
00051                 float getDistance(const Sphere &sphere);
00052 
00054 
00058                 float getSquaredDistance(const Sphere &sphere);
00059 
00061 
00065                 float getDistance(const Vector3f &point);
00066 
00068 
00072                 float getSquaredDistance(const Vector3f &point);
00073 
00075 
00078                 bool isIntersecting(const Sphere &sphere);
00079 
00081 
00084                 bool isPointInside(const Vector3f &point);
00085 
00086 
00087                 //************************************************************************
00088                 //
00089                 // Variables
00090                 //
00091                 //************************************************************************
00092                 Vector3f m_center;
00093                 float m_radius;
00094 
00095         };
00096 };
00097 
00098 #endif

Generated on Mon Oct 16 12:08:11 2006 for Phobosengine by doxygen 1.3.4