Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

BSphere Class Reference

A bounding sphere. More...

Inheritance diagram for BSphere:

BVolume List of all members.

Public Methods

 BSphere (const BSphere &rhs)
void reset ()
virtual Intersection intersectFrustum (const VrmlFrustum &frustum) const
virtual void extend (const BVolume &b)
virtual void extend (const float p[3])
virtual void extend (const AABox &b)
virtual void extend (const BSphere &b)
virtual void enclose (const float *p, int n)
virtual bool isMAX () const
virtual void setMAX ()
virtual void orthoTransform (const VrmlMatrix &M)
virtual void transform (const VrmlMatrix &M)
const float * getCenter () const
void setCenter (const SFVec3f &c)
void setCenter (float x, float y, float z)
void setCenter (const float ac[3])
float getRadius () const
void setRadius (float r)

Private Attributes

float c [3]
 The center of the sphere.

float r
 The radius of the sphere.


Detailed Description

A bounding sphere.

Bounding spheres are very fast to intersect test, but they are fairly loose. If asked to choose just one bounding volume, four out of five graphics professionals surveyed chose the bounding sphere for their patients who chewed bounding volumes.


Member Function Documentation

void extend const AABox   b [virtual]
 

Todo:
Implement me!

Implements BVolume.


Member Data Documentation

c [private]
 

The center of the sphere.

r [private]
 

The radius of the sphere.