Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a sphere in 2D space (a circle). More...
#include <omSphere2D.h>
Public Member Functions | |
Sphere2D () | |
Create a sphere object that has a radius of 0 and a position centered at the origin. More... | |
Sphere2D (const VectorND< T, 2 > &newPosition, T newRadius) | |
Create a sphere object with the specified center position and radius. More... | |
Sphere2D (const Sphere2D &sphere1, const Sphere2D &sphere2) | |
Create a sphere object that encloses the two given bounding spheres. More... | |
template<typename U > | |
Sphere2D (const Sphere2D< U > &other) | |
Create a copy of a sphere object with another templated type. More... | |
template<typename U > | |
Sphere2D & | operator= (const Sphere2D< U > &other) |
Assign a sphere object with another templated type to this bounding sphere. More... | |
Bool | intersects (const Sphere2D &sphere) const |
Return whether or not this sphere intersects another. More... | |
void | enlargeFor (const Sphere2D &other) |
Enlarge this bounding sphere so that it encloses both its original volume and the new sphere. More... | |
void | enlargeFor (const VectorND< T, 2 > &point) |
Enlarge this bounding sphere so that it encloses both its original volume and the given point. More... | |
Sphere2D | operator| (const Sphere2D &sphere) const |
Compute the union of this bounding sphere with another. More... | |
Public Attributes | |
VectorND< T, 2 > | position |
The position of the center of this 2D sphere. More... | |
T | radius |
The radius of this 2D sphere. More... | |
A class that represents a sphere in 2D space (a circle).
|
inline |
Create a sphere object that has a radius of 0 and a position centered at the origin.
|
inline |
|
inline |
Create a sphere object that encloses the two given bounding spheres.
|
inline |
Create a copy of a sphere object with another templated type.
other | - the bounding sphere object that should be copied. |
|
inline |
Assign a sphere object with another templated type to this bounding sphere.
other | - the bounding sphere object that should be copied. |
|
inline |
Return whether or not this sphere intersects another.
If the spheres intersect, TRUE is returned. Otherwise, FALSE is returned.
sphere | - the sphere to test for intersection with this Sphere2D. |
|
inline |
Enlarge this bounding sphere so that it encloses both its original volume and the new sphere.
|
inline |
Enlarge this bounding sphere so that it encloses both its original volume and the given point.
|
inline |
VectorND<T,2> om::math::Sphere2D< T >::position |
The position of the center of this 2D sphere.
T om::math::Sphere2D< T >::radius |
The radius of this 2D sphere.