- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FUBoundingSphere Class Reference
[Utility Classes.]

A bounding sphere. More...

`#include <FUBoundingSphere.h>`

List of all members.

## Public Member Functions
| FUBoundingSphere ()
| Empty constructor.
| FUBoundingSphere (const FMVector3 &center, float radius)
| Constructor.
| FUBoundingSphere (const FUBoundingSphere &copy)
| Copy constructor.
| ~FUBoundingSphere ()
| Destructor.
void | Reset ()
| Resets the bounding sphere.
bool | IsValid () const
| Retrieves whether the bounding sphere contains valid information.
const FMVector3 & | GetCenter () const
| Retrieves the center of the bounding sphere.
float | GetRadius () const
| Retrieves the radius of the bounding sphere.
void | SetCenter (const FMVector3 &_center)
| Sets the center of the bounding sphere.
void | SetRadius (float _radius)
| Sets the radius of the bounding sphere.
bool | Contains (const FMVector3 &point) const
| Retrieves whether a given point is contained within the bounding sphere.
bool | Overlaps (const FUBoundingSphere &boundingSphere, FMVector3 *overlapCenter=NULL) const
| Retrieves whether a bounding sphere overlaps with this bounding sphere.
bool | Overlaps (const FUBoundingBox &boundingBox, FMVector3 *overlapCenter=NULL) const
| Retrieves whether a bounding box overlaps with this bounding sphere.
void | Include (const FMVector3 &point)
| Extends the bounding sphere to include the given 3D coordinate.
void | Include (const FUBoundingSphere &boundingSphere)
| Extends the bounding sphere to include another bounding sphere.
void | Include (const FUBoundingBox &boundingBox)
| Extends the bounding sphere to include a bounding box.
FUBoundingSphere | Transform (const FMMatrix44 &transform) const
| Transform the bounding sphere into another space basis.

## Detailed Description

A bounding sphere.

## Constructor & Destructor Documentation

FUBoundingSphere::FUBoundingSphere | ( |  | ) |

| Empty constructor. The center and radius parameters are set at the largest and most impossible values.

FUBoundingSphere::FUBoundingSphere | ( | const FMVector3 & | center,
|  | float | radius
| ) |

  | Constructor. Parameters:
  | center | The center of the bounding sphere.
  | radius | The radius of the bounding sphere.

FUBoundingSphere::FUBoundingSphere | ( | const FUBoundingSphere & | copy | ) |

  | Copy constructor. Parameters:
  | copy | The bounding sphere to duplicate.

## Member Function Documentation

bool FUBoundingSphere::Contains | ( | const FMVector3 & | point | ) | const

  | Retrieves whether a given point is contained within the bounding sphere. Parameters:
  | point | A 3D coordinate.
Returns: Whether the given 3D coordinate is inside the bounding sphere.

const FMVector3& FUBoundingSphere::GetCenter | ( |  | ) | const`[inline]`

| Retrieves the center of the bounding sphere. Returns: The bounding sphere center.

float FUBoundingSphere::GetRadius | ( |  | ) | const`[inline]`

| Retrieves the radius of the bounding sphere. Returns: The bounding sphere radius.

void FUBoundingSphere::Include | ( | const FUBoundingBox & | boundingBox | ) |

  | Extends the bounding sphere to include a bounding box. Parameters:
  | boundingBox | A bounding box to include in this bounding sphere.

void FUBoundingSphere::Include | ( | const FUBoundingSphere & | boundingSphere | ) |

  | Extends the bounding sphere to include another bounding sphere. Parameters:
  | boundingSphere | A bounding sphere to include in this bounding sphere.

void FUBoundingSphere::Include | ( | const FMVector3 & | point | ) |

  | Extends the bounding sphere to include the given 3D coordinate. Parameters:
  | point | A 3D coordinate to include in the bounding sphere.

bool FUBoundingSphere::IsValid | ( |  | ) | const

| Retrieves whether the bounding sphere contains valid information. An invalid bounding sphere has a negative radius. Reseting the bounding sphere and the empty constructor generate invalid bounding spheres on purpose. Returns: The validity state of the bounding sphere.

bool FUBoundingSphere::Overlaps | ( | const FUBoundingBox & | boundingBox,
|  | FMVector3 * | overlapCenter = `NULL`
| ) | const

  | Retrieves whether a bounding box overlaps with this bounding sphere. Parameters:
  | boundingBox | A bounding box.
  | overlapCenter | An optional pointer to retrieve the center of the overlap region. For this particular case, there is no guarantee that this is the exact center of the overlap region.
Returns: Whether the given bounding box overlaps with this bounding sphere.

bool FUBoundingSphere::Overlaps | ( | const FUBoundingSphere & | boundingSphere,
|  | FMVector3 * | overlapCenter = `NULL`
| ) | const

  | Retrieves whether a bounding sphere overlaps with this bounding sphere. Parameters:
  | boundingSphere | A bounding sphere.
  | overlapCenter | An optional pointer to retrieve the center of the overlap region.
Returns: Whether the given bounding sphere overlaps with this bounding sphere.

void FUBoundingSphere::Reset | ( |  | ) |

| Resets the bounding sphere. The center and radius are set at the largest and most impossible values. Including a freshly reset bounding sphere to a valid bounding sphere will have no effect.

void FUBoundingSphere::SetCenter | ( | const FMVector3 & | _center | ) | `[inline]`

  | Sets the center of the bounding sphere. Parameters:
  | _center | The new center of the bounding sphere.

void FUBoundingSphere::SetRadius | ( | float | _radius | ) | `[inline]`

  | Sets the radius of the bounding sphere. Parameters:
  | _radius | The radius of the bounding sphere.

FUBoundingSphere FUBoundingSphere::Transform | ( | const FMMatrix44 & | transform | ) | const

  | Transform the bounding sphere into another space basis. Parameters:
  | transform | The transformation matrix to go into the other space basis. Skews and projections may strangely affect the resulting bounding sphere.
Returns: The transformed bounding sphere.

The documentation for this class was generated from the following file:

- FUtils/FUBoundingSphere.h