00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef _OSGSPHEREVOLUME_INL_
00041 #define _OSGSPHEREVOLUME_INL_
00042
00043 #include <OSGVolume.h>
00044
00045 OSG_BEGIN_NAMESPACE
00046
00047
00048
00049 inline
00050 SphereVolume::SphereVolume(void) :
00051 Volume( ),
00052 _center(0.f, 0.f, 0.f),
00053 _radius(0 )
00054 {
00055 }
00056
00057 inline
00058 SphereVolume::SphereVolume(const SphereVolume &obj) :
00059 Volume( ),
00060 _center(obj._center),
00061 _radius(obj._radius)
00062 {
00063 setEmpty(false);
00064 }
00065
00066 inline
00067 SphereVolume::SphereVolume(const Pnt3f &c, Real32 r) :
00068 Volume( ),
00069 _center(c),
00070 _radius(r)
00071 {
00072 setEmpty(false);
00073 }
00074
00075 inline
00076 SphereVolume::~SphereVolume()
00077 {
00078 }
00079
00080
00081
00084 inline
00085 void SphereVolume::setValue(const Pnt3f &c, Real32 r)
00086 {
00087 setEmpty(false);
00088
00089 _center = c;
00090 _radius = r;
00091 }
00092
00093
00096 inline
00097 void SphereVolume::setCenter(const Pnt3f &c)
00098 {
00099 _center = c;
00100 }
00101
00104 inline
00105 void SphereVolume::setRadius(Real32 r)
00106 {
00107 _radius = r;
00108 }
00109
00110
00111
00114 inline
00115 const Pnt3f& SphereVolume::getCenter(void) const
00116 {
00117 return _center;
00118 }
00119
00122 inline
00123 Real32 SphereVolume::getRadius(void) const
00124 {
00125 return _radius;
00126 }
00127
00128
00129
00130 inline
00131 void SphereVolume::extendBy(const SphereVolume &volume)
00132 {
00133 OSG::extend(*this, volume);
00134 }
00135
00136
00137
00138 inline
00139 bool SphereVolume::intersect(const SphereVolume &volume) const
00140 {
00141 return OSG::intersect(*this, volume);
00142 }
00143
00144 OSG_END_NAMESPACE
00145
00146 #endif // SPHEREVOLUME_CLASS_DECLARATIONS