Describes a sphere in 3D space by its center point and its radius.
More...
#include <Sphere.h>
List of all members.
Public Types |
typedef DATA_TYPE | DataType |
Public Member Functions |
| Sphere () |
| Constructs a sphere centered at the origin with a radius of 0.
|
| Sphere (const Point< DATA_TYPE, 3 > ¢er, const DATA_TYPE &radius) |
| Constructs a sphere with the given center and radius.
|
| Sphere (const Sphere< DATA_TYPE > &sphere) |
| Constructs a duplicate of the given sphere.
|
const Point< DATA_TYPE, 3 > & | getCenter () const |
| Gets the center of the sphere.
|
const DATA_TYPE & | getRadius () const |
| Gets the radius of the sphere.
|
void | setCenter (const Point< DATA_TYPE, 3 > ¢er) |
| Sets the center point of the sphere.
|
void | setRadius (const DATA_TYPE &radius) |
| Sets the radius of the sphere.
|
Public Attributes |
Point< DATA_TYPE, 3 > | mCenter |
| The center of the sphere.
|
DATA_TYPE | mRadius |
| The radius of the sphere.
|
Detailed Description
template<class DATA_TYPE>
class gmtl::Sphere< DATA_TYPE >
Describes a sphere in 3D space by its center point and its radius.
- Parameters:
-
| DATA_TYPE | the internal type used for the point and radius |
Definition at line 21 of file Sphere.h.
Member Typedef Documentation
template<class DATA_TYPE>
Constructor & Destructor Documentation
template<class DATA_TYPE>
Constructs a sphere centered at the origin with a radius of 0.
Definition at line 30 of file Sphere.h.
template<class DATA_TYPE>
Constructs a sphere with the given center and radius.
- Parameters:
-
| center | the point at which to center the sphere |
| radius | the radius of the sphere |
Definition at line 40 of file Sphere.h.
template<class DATA_TYPE>
Constructs a duplicate of the given sphere.
- Parameters:
-
| sphere | the sphere to make a copy of |
Definition at line 49 of file Sphere.h.
Member Function Documentation
template<class DATA_TYPE>
Gets the center of the sphere.
- Returns:
- the center point of the sphere
Definition at line 58 of file Sphere.h.
template<class DATA_TYPE>
const DATA_TYPE& gmtl::Sphere< DATA_TYPE >::getRadius |
( |
|
) |
const [inline] |
Gets the radius of the sphere.
- Returns:
- the radius of the sphere
Definition at line 68 of file Sphere.h.
template<class DATA_TYPE>
void gmtl::Sphere< DATA_TYPE >::setCenter |
( |
const Point< DATA_TYPE, 3 > & |
center |
) |
[inline] |
Sets the center point of the sphere.
- Parameters:
-
| center | the new point at which to center the sphere |
Definition at line 78 of file Sphere.h.
template<class DATA_TYPE>
void gmtl::Sphere< DATA_TYPE >::setRadius |
( |
const DATA_TYPE & |
radius |
) |
[inline] |
Sets the radius of the sphere.
- Parameters:
-
| radius | the new radius of the sphere |
Definition at line 88 of file Sphere.h.
Member Data Documentation
template<class DATA_TYPE>
The center of the sphere.
Definition at line 97 of file Sphere.h.
template<class DATA_TYPE>
The radius of the sphere.
Definition at line 102 of file Sphere.h.
The documentation for this class was generated from the following file: