14#ifndef OSG_BOUNDINGSPHERE
15#define OSG_BOUNDINGSPHERE 1
101 template<
typename vector_type>
107 template<
typename vector_type>
122 template<
typename BBT>
127 template<
typename BBT>
148template<
typename vector_type>
170template<
typename vector_type>
190 if (!sh.
valid())
return;
227 double ratio = ( new_radius -
_radius ) / d ;
257template<
typename BBT>
266 for(
unsigned int c=0;c<8;++c)
288template<
typename BBT>
295 for(
unsigned int c=0;c<8;++c)
311#ifdef OSG_USE_FLOAT_BOUNDINGSPHERE
Definition BoundingBox:34
const vec_type center() const
Definition BoundingBox:126
void expandBy(const vec_type &v)
Definition BoundingBox:156
const vec_type corner(unsigned int pos) const
Definition BoundingBox:149
bool valid() const
Definition BoundingBox:86
value_type radius() const
Definition BoundingBox:132
Definition BoundingSphere:35
bool operator!=(const BoundingSphereImpl &rhs) const
Definition BoundingSphere:73
void init()
Definition BoundingSphere:62
BoundingSphereImpl(const BoundingSphereImpl &bs)
Definition BoundingSphere:50
value_type radius2() const
Definition BoundingSphere:96
vec_type & center()
Definition BoundingSphere:83
bool intersects(const BoundingSphereImpl &bs) const
Definition BoundingSphere:139
bool operator==(const BoundingSphereImpl &rhs) const
Definition BoundingSphere:72
bool contains(const vec_type &v) const
Definition BoundingSphere:131
void expandBy(const vector_type &v)
Definition BoundingSphere:149
void expandRadiusBy(const BoundingBoxImpl< BBT > &bb)
Definition BoundingSphere:289
const vec_type & center() const
Definition BoundingSphere:86
void expandRadiusBy(const vector_type &v)
Definition BoundingSphere:171
value_type _radius
Definition BoundingSphere:41
vec_type _center
Definition BoundingSphere:40
VT vec_type
Definition BoundingSphere:37
VT::value_type value_type
Definition BoundingSphere:38
BoundingSphereImpl(const BoundingBoxImpl< VT > &bb)
Definition BoundingSphere:53
void expandBy(const BoundingBoxImpl< BBT > &bb)
Definition BoundingSphere:258
void set(const vec_type ¢er, value_type radius)
Definition BoundingSphere:76
BoundingSphereImpl & operator=(const BoundingSphereImpl &o)
Definition BoundingSphere:55
void expandBy(const BoundingSphereImpl &sh)
Definition BoundingSphere:187
BoundingSphereImpl(const vec_type &cntr, value_type rad)
Definition BoundingSphere:47
BoundingSphereImpl()
Definition BoundingSphere:44
bool valid() const
Definition BoundingSphere:70
value_type & radius()
Definition BoundingSphere:89
value_type radius() const
Definition BoundingSphere:91
void expandRadiusBy(const BoundingSphereImpl &sh)
Definition BoundingSphere:238
BoundingSphered BoundingSphere
Definition BoundingSphere:314
BoundingSphereImpl< Vec3f > BoundingSpheref
Definition BoundingSphere:308
BoundingSphereImpl< Vec3d > BoundingSphered
Definition BoundingSphere:309