FUtils/FUBoundingSphere.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2007 Feeling Software Inc.
00003     Portions of the code are:
00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
00005     
00006     MIT License: http://www.opensource.org/licenses/mit-license.php
00007 */
00008 
00014 #ifndef _FU_BOUNDINGSPHERE_H_
00015 #define _FU_BOUNDINGSPHERE_H_
00016 
00017 class FUBoundingBox;
00018 
00024 class FCOLLADA_EXPORT FUBoundingSphere
00025 {
00026 private:
00027     FMVector3 center;
00028     float radius;
00029 
00030 public:
00033     FUBoundingSphere();
00034 
00038     FUBoundingSphere(const FMVector3& center, float radius);
00039 
00042     FUBoundingSphere(const FUBoundingSphere& copy);
00043 
00045     ~FUBoundingSphere();
00046 
00050     void Reset();
00051 
00056     bool IsValid() const;
00057 
00060     inline const FMVector3& GetCenter() const { return center; }
00061 
00064     inline float GetRadius() const { return radius; }
00065 
00068     inline void SetCenter(const FMVector3& _center) { center = _center; }
00069 
00072     inline void SetRadius(float _radius) { radius = _radius; }
00073 
00077     bool Contains(const FMVector3& point) const;
00078 
00083     bool Overlaps(const FUBoundingSphere& boundingSphere, FMVector3* overlapCenter = NULL) const;
00084 
00090     bool Overlaps(const FUBoundingBox& boundingBox, FMVector3* overlapCenter = NULL) const;
00091 
00094     void Include(const FMVector3& point);
00095 
00098     void Include(const FUBoundingSphere& boundingSphere);
00099 
00102     void Include(const FUBoundingBox& boundingBox);
00103 
00108     FUBoundingSphere Transform(const FMMatrix44& transform) const;
00109 };
00110 
00111 #endif // _FU_BOUNDINGSPHERE_H_

Generated on Thu Feb 14 16:58:35 2008 for FCollada by  doxygen 1.4.6-NO