Public Member Functions

bl7::geometry2::BoundingSphere Class Reference

#include <BoundingSphere.h>

Inheritance diagram for bl7::geometry2::BoundingSphere:
bl7::geometry2::Sphere bl7::geometry2::BoundingVolume bl7::geometry2::Geometry

List of all members.

Public Member Functions

 BoundingSphere (void)
 ~BoundingSphere (void)
 BoundingSphere (const BoundingSphere &rhs)
BoundingSphereoperator= (const BoundingSphere &rhs)
 BoundingSphere (const ml7::Vector2 &center, const float radius)
 BoundingSphere (const ml7::Vector2 &a, const ml7::Vector2 &b, const ml7::Vector2 &c)
bool overlaps (const AABB &aabb) const
bool overlaps (const BoundingSphere &bs) const
bool contains (const ml7::Vector2 &v) const
bool contains (const AABB &aabb) const
bool contains (const BoundingSphere &bs) const
BoundingVolumeinclude (const ml7::Vector2 &v)
BoundingVolumeinclude (const AABB &aabb)
BoundingVolumeinclude (const BoundingSphere &bs)

Detailed Description

A sphere is not rotatable, because it makes no sense. It is defined by a center point and a radius. Its main purpose is to encapsulate another geometry object, preferably a rotatable one of higher complexity.


Constructor & Destructor Documentation

bl7::geometry2::BoundingSphere::BoundingSphere ( void   )  [inline]

Default constructor.

bl7::geometry2::BoundingSphere::~BoundingSphere ( void   )  [inline]

Destructor.

bl7::geometry2::BoundingSphere::BoundingSphere ( const BoundingSphere rhs  )  [inline]

Copy constructor.

bl7::geometry2::BoundingSphere::BoundingSphere ( const ml7::Vector2 center,
const float  radius 
) [inline]

Explicit constructor: sphere from center point and radius.

bl7::geometry2::BoundingSphere::BoundingSphere ( const ml7::Vector2 a,
const ml7::Vector2 b,
const ml7::Vector2 c 
) [inline]

Explicit constructor: sphere from three points.


Member Function Documentation

bool bl7::geometry2::BoundingSphere::contains ( const ml7::Vector2 v  )  const [virtual]

Checks whether this bounding sphere contains a given point.

Implements bl7::geometry2::BoundingVolume.

bool bl7::geometry2::BoundingSphere::contains ( const AABB aabb  )  const [virtual]

Checks whether this bounding sphere contains a given AABB.

Implements bl7::geometry2::BoundingVolume.

bool bl7::geometry2::BoundingSphere::contains ( const BoundingSphere bs  )  const [virtual]

Checks whether this bounding sphere contains another given bounding sphere.

Implements bl7::geometry2::BoundingVolume.

BoundingVolume & bl7::geometry2::BoundingSphere::include ( const BoundingSphere bs  )  [virtual]

Updates this bounding sphere so that it contains another given bounding sphere.

Implements bl7::geometry2::BoundingVolume.

BoundingVolume & bl7::geometry2::BoundingSphere::include ( const AABB aabb  )  [virtual]

Updates this bounding sphere so that it contains a given AABB.

Implements bl7::geometry2::BoundingVolume.

BoundingVolume & bl7::geometry2::BoundingSphere::include ( const ml7::Vector2 v  )  [virtual]

Updates this bounding sphere so that it contains a given point.

Implements bl7::geometry2::BoundingVolume.

BoundingSphere& bl7::geometry2::BoundingSphere::operator= ( const BoundingSphere rhs  )  [inline]

Copy assignment operator.

bool bl7::geometry2::BoundingSphere::overlaps ( const BoundingSphere bs  )  const [virtual]

Checks whether a given bounding sphere and this overlap.

Implements bl7::geometry2::BoundingVolume.

bool bl7::geometry2::BoundingSphere::overlaps ( const AABB aabb  )  const [virtual]

Checks whether a given AABB and this bounding sphere overlap.

Implements bl7::geometry2::BoundingVolume.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines