Standard constructor - creates a unit sphere around the origin.
blub::sphere::sphere |
( |
const vector3 & |
center, |
|
|
real |
radius |
|
) |
| |
|
inline |
Constructor allowing arbitrary spheres.
- Parameters
-
center | The center point of the sphere. |
radius | The radius of the sphere. |
const vector3& blub::sphere::getCenter |
( |
void |
| ) |
const |
|
inline |
Returns the center point of the sphere.
real blub::sphere::getRadius |
( |
void |
| ) |
const |
|
inline |
Returns the radius of the sphere.
bool sphere::intersects |
( |
const sphere & |
s | ) |
const |
Returns whether or not this sphere intersects another sphere.
Returns whether or not this sphere intersects a box.
bool blub::sphere::intersects |
( |
const vector3 & |
v | ) |
const |
|
inline |
Returns whether or not this sphere intersects a point.
void sphere::merge |
( |
const sphere & |
oth | ) |
|
Merges another sphere into the current sphere
void blub::sphere::setCenter |
( |
const vector3 & |
center | ) |
|
|
inline |
Sets the center point of the sphere.
void blub::sphere::setRadius |
( |
real |
radius | ) |
|
|
inline |
Sets the radius of the sphere.
The documentation for this class was generated from the following files:
- /home/mlanner/Development/cpp/projects/voxelTerrain/voxelTerrain/modules/math/source/blub/math/sphere.hpp
- /home/mlanner/Development/cpp/projects/voxelTerrain/voxelTerrain/modules/math/source/blub/math/sphere.cpp