#include <bs.h>
Public Member Functions | |
| BS () | |
| BS (const BS &bs) | |
| BS (const Point3 ¢er) | |
| BS (const Point3 ¢er, Real radius) | |
| void | Invalidate () |
| void | ComputeSquareRadius () |
| void | Include (const Point3 &point) |
| void | Include (const AABB3 &aabb) |
| void | Include (const BS &bs) |
| bool | Overlaps (const BS &bs) const |
| bool | Contains (const Point3 &point) const |
Public Attributes | |
| Point3 | m_center |
| Center of the bounding sphere. | |
| Real | m_radius |
| Radius of the bounding sphere. | |
| Real | m_radius2 |
| Square of the radius of the bounding sphere. | |
|
|
Invalidates the bounding sphere. Warning: the bounding sphere center is left undefined. |
|
|
Warning: this constructor *does not* copy the value of the m_radius2 member, which is thus left undefined until the ComputeSquareRadius() method is called. |
|
|
Constructs a bounding sphere given its center. The new bounding sphere is invalidated (see the Invalidate() method for more details). The value of the m_radius2 member is left undefined until the ComputeSquareRadius() method is called. |
|
||||||||||||
|
Constructs a bounding sphere given its center and its radius. The value of the m_radius2 member is left undefined until the ComputeSquareRadius() method is called. |
|
|
Computes the square radius of the bounding sphere and stores it in the m_radius2 member. This is the only one method that does access the m_radius2 member. Definition at line 140 of file bs.h. Referenced by toxic::Sphere::Sphere(). |
|
|
|
|
|
|
|
|
|
|
|
None of the next methods changes the value or use the value of the m_radius2 member. Definition at line 145 of file bs.h. Referenced by toxic::Sphere::Sphere(). |
|
|
Invalidates the bounding sphere (sets the bounding sphere radius to -1.0). The value of the m_radius2 member is left unchanged. |
|
|
|
|
|
Center of the bounding sphere.
Definition at line 38 of file bs.h. Referenced by toxic::Sphere::ComputeIrradiance(). |
|
|
Radius of the bounding sphere.
|
|
|
Square of the radius of the bounding sphere. The value of this member is not computed until the ComputeSquareRadius() method is explicitly called by the user. It is done that way to be both flexible and efficient: if the value is required, it can be computed by calling the ComputeSquareRadius() method. If the value is not required, this member will be left undefined until the ComputeSquareRadius() method is called. Definition at line 47 of file bs.h. Referenced by toxic::Sphere::ComputeIrradiance(). |
1.3.6