Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BoundingSphere Class Reference

#include <boundingSphere.h>

Inheritance diagram for BoundingSphere:

FiniteBoundingVolume GeometricBoundingVolume BoundingVolume TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Member Functions

virtual BoundingVolumemake_copy () const
virtual LPoint3f get_min () const
virtual LPoint3f get_max () const
virtual LPoint3f get_approx_center () const
virtual void xform (const LMatrix4f &mat)
virtual void output (ostream &out) const
INLINE_MATHUTIL float get_radius () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: INLINE_MATHUTIL const LPoint3f &get_center() const

Protected Member Functions

virtual bool extend_other (BoundingVolume *other) const
virtual bool around_other (BoundingVolume *other, const BoundingVolume **first, const BoundingVolume **last) const
virtual int contains_other (const BoundingVolume *other) const
virtual bool extend_by_point (const LPoint3f &point)
virtual bool extend_by_sphere (const BoundingSphere *sphere)
virtual bool extend_by_hexahedron (const BoundingHexahedron *hexahedron)
bool extend_by_finite (const FiniteBoundingVolume *volume)
virtual bool around_points (const LPoint3f *first, const LPoint3f *last)
virtual bool around_spheres (const BoundingVolume **first, const BoundingVolume **last)
virtual bool around_hexahedrons (const BoundingVolume **first, const BoundingVolume **last)
bool around_finite (const BoundingVolume **first, const BoundingVolume **last)
virtual int contains_point (const LPoint3f &point) const
virtual int contains_lineseg (const LPoint3f &a, const LPoint3f &b) const
virtual int contains_hexahedron (const BoundingHexahedron *hexahedron) const
virtual int contains_sphere (const BoundingSphere *sphere) const
virtual int contains_line (const BoundingLine *line) const

Private Member Functions

INLINE_MATHUTIL BoundingSphere (const LPoint3f &center, float radius)

Private Attributes

PUBLISHED __pad0__: INLINE_MATHUTIL BoundingSphere()
LPoint3f _center
float _radius

Static Private Attributes

TypeHandle _type_handle

Friends

class BoundingHexahedron

Constructor & Destructor Documentation

INLINE_MATHUTIL BoundingSphere::BoundingSphere const LPoint3f &  center,
float  radius
[private]
 

Referenced by make_copy().


Member Function Documentation

bool BoundingSphere::around_finite const BoundingVolume **  first,
const BoundingVolume **  last
[protected]
 

Definition at line 294 of file boundingSphere.cxx.

References _center, BoundingVolume::_flags, _radius, DCAST, first, get_class_type(), FiniteBoundingVolume::get_class_type(), FiniteBoundingVolume::get_max(), length(), and p.

Referenced by around_hexahedrons(), and around_spheres().

bool BoundingSphere::around_hexahedrons const BoundingVolume **  first,
const BoundingVolume **  last
[protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 288 of file boundingSphere.cxx.

References around_finite(), and first.

bool BoundingSphere::around_other BoundingVolume other,
const BoundingVolume **  first,
const BoundingVolume **  last
const [protected, virtual]
 

Implements BoundingVolume.

Definition at line 118 of file boundingSphere.cxx.

References BoundingVolume::around_spheres(), and first.

bool BoundingSphere::around_points const LPoint3f *  first,
const LPoint3f *  last
[protected, virtual]
 

Reimplemented from GeometricBoundingVolume.

Definition at line 194 of file boundingSphere.cxx.

References _center, BoundingVolume::_flags, _radius, dot(), first, p, and v.

bool BoundingSphere::around_spheres const BoundingVolume **  first,
const BoundingVolume **  last
[protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 282 of file boundingSphere.cxx.

References around_finite(), and first.

int BoundingSphere::contains_hexahedron const BoundingHexahedron hexahedron  )  const [protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 466 of file boundingSphere.cxx.

References BoundingHexahedron::contains_sphere().

int BoundingSphere::contains_line const BoundingLine line  )  const [protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 471 of file boundingSphere.cxx.

References BoundingLine::contains_sphere().

int BoundingSphere::contains_lineseg const LPoint3f &  a,
const LPoint3f &  b
const [protected, virtual]
 

Reimplemented from GeometricBoundingVolume.

Definition at line 385 of file boundingSphere.cxx.

References _center, _radius, a, b, contains_point(), dot(), BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and IS_NEARLY_ZERO.

int BoundingSphere::contains_other const BoundingVolume other  )  const [protected, virtual]
 

Implements BoundingVolume.

Definition at line 125 of file boundingSphere.cxx.

References BoundingVolume::contains_sphere().

int BoundingSphere::contains_point const LPoint3f &  point  )  const [protected, virtual]
 

Reimplemented from GeometricBoundingVolume.

Definition at line 367 of file boundingSphere.cxx.

References _center, _radius, dot(), BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and v.

Referenced by contains_lineseg().

int BoundingSphere::contains_sphere const BoundingSphere *  sphere  )  const [protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 443 of file boundingSphere.cxx.

References _center, _radius, dot(), BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and v.

bool BoundingSphere::extend_by_finite const FiniteBoundingVolume volume  )  [protected]
 

Definition at line 171 of file boundingSphere.cxx.

References _center, BoundingVolume::_flags, _radius, dot(), FiniteBoundingVolume::get_max(), BoundingVolume::is_empty(), length(), and v.

Referenced by extend_by_hexahedron().

bool BoundingSphere::extend_by_hexahedron const BoundingHexahedron hexahedron  )  [protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 166 of file boundingSphere.cxx.

References extend_by_finite().

bool BoundingSphere::extend_by_point const LPoint3f &  point  )  [protected, virtual]
 

Reimplemented from GeometricBoundingVolume.

Definition at line 131 of file boundingSphere.cxx.

References _center, BoundingVolume::_flags, _radius, dot(), BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and v.

bool BoundingSphere::extend_by_sphere const BoundingSphere *  sphere  )  [protected, virtual]
 

Reimplemented from BoundingVolume.

Definition at line 149 of file boundingSphere.cxx.

References _center, BoundingVolume::_flags, _radius, BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and length().

bool BoundingSphere::extend_other BoundingVolume other  )  const [protected, virtual]
 

Implements BoundingVolume.

Definition at line 113 of file boundingSphere.cxx.

References BoundingVolume::extend_by_sphere().

virtual TypeHandle BoundingSphere::force_init_type void   )  [inline, virtual]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 97 of file boundingSphere.h.

References FiniteBoundingVolume::get_class_type(), and FiniteBoundingVolume::init_type().

LPoint3f BoundingSphere::get_approx_center  )  const [virtual]
 

Implements GeometricBoundingVolume.

Definition at line 54 of file boundingSphere.cxx.

References BoundingVolume::is_empty(), and BoundingVolume::is_infinite().

TypeHandle BoundingSphere::get_class_type void   )  [inline, static]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 86 of file boundingSphere.h.

Referenced by around_finite(), and PT().

LPoint3f BoundingSphere::get_max  )  const [virtual]
 

Implements FiniteBoundingVolume.

Definition at line 45 of file boundingSphere.cxx.

References _center, _radius, BoundingVolume::is_empty(), and BoundingVolume::is_infinite().

LPoint3f BoundingSphere::get_min  )  const [virtual]
 

Definition at line 36 of file boundingSphere.cxx.

References _center, _radius, BoundingVolume::is_empty(), and BoundingVolume::is_infinite().

INLINE_MATHUTIL float BoundingSphere::get_radius  )  const
 

Referenced by BoundingLine::contains_sphere(), BoundingHexahedron::contains_sphere(), and PT().

virtual TypeHandle BoundingSphere::get_type void   )  const [inline, virtual]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 94 of file boundingSphere.h.

References FiniteBoundingVolume::get_class_type().

void BoundingSphere::init_type void   )  [inline, static]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 89 of file boundingSphere.h.

References FiniteBoundingVolume::get_class_type(), FiniteBoundingVolume::init_type(), and register_type().

Referenced by ConfigureFn().

BoundingVolume * BoundingSphere::make_copy  )  const [virtual]
 

Implements BoundingVolume.

Definition at line 31 of file boundingSphere.cxx.

References BoundingSphere().

void BoundingSphere::output ostream &  out  )  const [virtual]
 

Implements BoundingVolume.

Definition at line 102 of file boundingSphere.cxx.

References _center, _radius, BoundingVolume::is_empty(), and BoundingVolume::is_infinite().

void BoundingSphere::xform const LMatrix4f &  mat  )  [virtual]
 

Implements GeometricBoundingVolume.

Definition at line 61 of file boundingSphere.cxx.

References _center, _radius, BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and scale.


Friends And Related Function Documentation

friend class BoundingHexahedron [friend]
 

Reimplemented from BoundingVolume.

Definition at line 102 of file boundingSphere.h.


Member Data Documentation

PUBLISHED BoundingSphere::__pad0__ [private]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 34 of file boundingSphere.h.

PUBLISHED BoundingSphere::__pad1__
 

Definition at line 49 of file boundingSphere.h.

LPoint3f BoundingSphere::_center [private]
 

Definition at line 81 of file boundingSphere.h.

Referenced by around_finite(), around_points(), contains_lineseg(), contains_point(), contains_sphere(), extend_by_finite(), extend_by_point(), extend_by_sphere(), get_max(), get_min(), output(), and xform().

float BoundingSphere::_radius [private]
 

Definition at line 82 of file boundingSphere.h.

Referenced by around_finite(), around_points(), contains_lineseg(), contains_point(), contains_sphere(), extend_by_finite(), extend_by_point(), extend_by_sphere(), get_max(), get_min(), output(), and xform().

TypeHandle BoundingSphere::_type_handle [static, private]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 28 of file boundingSphere.cxx.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:25 2003 for Panda by doxygen1.3