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

BoundingVolume Class Reference

#include <boundingVolume.h>

Inheritance diagram for BoundingVolume:

TypedReferenceCount TypedObject ReferenceCount GeometricBoundingVolume BoundingLine FiniteBoundingVolume OmniBoundingVolume BoundingHexahedron BoundingSphere List of all members.

Public Member Functions

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Types

enum  Flags { F_empty = 0x01, F_infinite = 0x02 }

Protected Member Functions

virtual bool extend_other (BoundingVolume *other) const=0
virtual bool around_other (BoundingVolume *other, const BoundingVolume **first, const BoundingVolume **last) const=0
virtual int contains_other (const BoundingVolume *other) const=0
virtual bool extend_by_sphere (const BoundingSphere *sphere)
virtual bool extend_by_hexahedron (const BoundingHexahedron *hexahedron)
virtual bool extend_by_line (const BoundingLine *line)
virtual bool around_spheres (const BoundingVolume **first, const BoundingVolume **last)
virtual bool around_hexahedrons (const BoundingVolume **first, const BoundingVolume **last)
virtual bool around_lines (const BoundingVolume **first, const BoundingVolume **last)
virtual int contains_sphere (const BoundingSphere *sphere) const
virtual int contains_hexahedron (const BoundingHexahedron *hexahedron) const
virtual int contains_line (const BoundingLine *line) const

Protected Attributes

int _flags

Private Types

enum  IntersectionFlags {
  IF_no_intersection = 0, IF_possible = 0x01, IF_some = 0x02, IF_all = 0x04,
  IF_dont_understand = 0x08
}

Private Member Functions

virtual BoundingVolume * make_copy () const=0
INLINE_MATHUTIL bool is_empty () const
INLINE_MATHUTIL bool is_infinite () const
INLINE_MATHUTIL void set_infinite ()
INLINE_MATHUTIL bool extend_by (const BoundingVolume *vol)
bool around (const BoundingVolume **first, const BoundingVolume **last)
INLINE_MATHUTIL int contains (const BoundingVolume *vol) const
virtual void output (ostream &out) const=0
virtual void write (ostream &out, int indent_level=0) const

Private Attributes

PUBLISHED __pad0__: INLINE_MATHUTIL BoundingVolume()

Static Private Attributes

TypeHandle _type_handle

Friends

class BoundingSphere
class BoundingHexahedron
class BoundingLine

Member Enumeration Documentation

enum BoundingVolume::Flags [protected]
 

Enumeration values:
F_empty 
F_infinite 

Definition at line 98 of file boundingVolume.h.

enum BoundingVolume::IntersectionFlags [private]
 

Enumeration values:
IF_no_intersection 
IF_possible 
IF_some 
IF_all 
IF_dont_understand 

Definition at line 62 of file boundingVolume.h.


Member Function Documentation

bool BoundingVolume::around const BoundingVolume **  first,
const BoundingVolume **  last
[private]
 

Definition at line 35 of file boundingVolume.cxx.

References _flags, F_empty, F_infinite, first, and is_empty().

Referenced by PandaNode::recompute_bound(), PGItem::recompute_internal_bound(), GeomNode::recompute_internal_bound(), and CollisionNode::recompute_internal_bound().

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

Reimplemented in BoundingHexahedron, BoundingSphere, and OmniBoundingVolume.

Definition at line 143 of file boundingVolume.cxx.

References _flags, and F_infinite.

Referenced by BoundingHexahedron::around_other().

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

Definition at line 156 of file boundingVolume.cxx.

References _flags, F_infinite, FiniteBoundingVolume::get_class_type(), and TypedObject::is_of_type().

Referenced by BoundingLine::around_other().

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

Implemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

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

Reimplemented in BoundingHexahedron, BoundingSphere, and OmniBoundingVolume.

Definition at line 130 of file boundingVolume.cxx.

References _flags, and F_infinite.

Referenced by BoundingSphere::around_other().

INLINE_MATHUTIL int BoundingVolume::contains const BoundingVolume *  vol  )  const [private]
 

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

Reimplemented in BoundingHexahedron, BoundingSphere, and OmniBoundingVolume.

Definition at line 190 of file boundingVolume.cxx.

References IF_dont_understand.

Referenced by BoundingHexahedron::contains_other().

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

Reimplemented in BoundingSphere.

Definition at line 202 of file boundingVolume.cxx.

References IF_dont_understand.

Referenced by BoundingLine::contains_other().

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

Implemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

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

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

Definition at line 178 of file boundingVolume.cxx.

References IF_dont_understand.

Referenced by BoundingSphere::contains_other().

INLINE_MATHUTIL bool BoundingVolume::extend_by const BoundingVolume *  vol  )  [private]
 

Referenced by CollisionSphere::recompute_bound().

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

Reimplemented in BoundingHexahedron, BoundingSphere, and OmniBoundingVolume.

Definition at line 104 of file boundingVolume.cxx.

References _flags, and F_infinite.

Referenced by BoundingHexahedron::extend_other().

bool BoundingVolume::extend_by_line const BoundingLine line  )  [protected, virtual]
 

Reimplemented in BoundingLine.

Definition at line 117 of file boundingVolume.cxx.

References _flags, and F_infinite.

Referenced by BoundingLine::extend_other().

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

Reimplemented in BoundingHexahedron, BoundingSphere, and OmniBoundingVolume.

Definition at line 91 of file boundingVolume.cxx.

References _flags, and F_infinite.

Referenced by BoundingSphere::extend_other().

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

Implemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

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

Reimplemented from TypedReferenceCount.

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 146 of file boundingVolume.h.

References ReferenceCount::get_class_type(), and TypedReferenceCount::init_type().

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

Reimplemented from ReferenceCount.

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 135 of file boundingVolume.h.

Referenced by GeometricBoundingVolume::force_init_type(), GeometricBoundingVolume::get_type(), GeometricBoundingVolume::init_type(), and PT().

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

Reimplemented from TypedReferenceCount.

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 143 of file boundingVolume.h.

References ReferenceCount::get_class_type().

Referenced by PandaNode::recompute_bound(), and CollisionNode::recompute_internal_bound().

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

Reimplemented from TypedReferenceCount.

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 138 of file boundingVolume.h.

References TypedObject::get_class_type(), TypedReferenceCount::init_type(), and register_type().

Referenced by ConfigureFn(), GeometricBoundingVolume::force_init_type(), and GeometricBoundingVolume::init_type().

INLINE_MATHUTIL bool BoundingVolume::is_empty  )  const [private]
 

Referenced by CullBinFrontToBack::add_object(), CullBinBackToFront::add_object(), around(), BoundingHexahedron::contains_hexahedron(), BoundingSphere::contains_lineseg(), BoundingHexahedron::contains_lineseg(), BoundingSphere::contains_point(), BoundingHexahedron::contains_point(), BoundingSphere::contains_sphere(), BoundingLine::contains_sphere(), BoundingHexahedron::contains_sphere(), BoundingSphere::extend_by_finite(), BoundingLine::extend_by_line(), BoundingSphere::extend_by_point(), BoundingSphere::extend_by_sphere(), BoundingSphere::get_approx_center(), BoundingLine::get_approx_center(), BoundingHexahedron::get_approx_center(), BoundingSphere::get_max(), BoundingHexahedron::get_max(), BoundingSphere::get_min(), BoundingHexahedron::get_min(), BoundingSphere::output(), BoundingLine::output(), BoundingHexahedron::output(), BoundingLine::sqr_dist_to_line(), BoundingHexahedron::write(), BoundingSphere::xform(), BoundingLine::xform(), and BoundingHexahedron::xform().

INLINE_MATHUTIL bool BoundingVolume::is_infinite  )  const [private]
 

Referenced by BoundingSphere::contains_lineseg(), BoundingHexahedron::contains_lineseg(), BoundingSphere::contains_point(), BoundingHexahedron::contains_point(), BoundingSphere::contains_sphere(), BoundingLine::contains_sphere(), BoundingLine::extend_by_line(), BoundingSphere::extend_by_point(), BoundingSphere::extend_by_sphere(), BoundingSphere::get_approx_center(), BoundingLine::get_approx_center(), BoundingHexahedron::get_approx_center(), BoundingSphere::get_max(), BoundingHexahedron::get_max(), BoundingSphere::get_min(), BoundingHexahedron::get_min(), BoundingSphere::output(), BoundingLine::output(), BoundingHexahedron::output(), PT(), BoundingLine::sqr_dist_to_line(), BoundingHexahedron::write(), BoundingSphere::xform(), BoundingLine::xform(), and BoundingHexahedron::xform().

virtual BoundingVolume* BoundingVolume::make_copy  )  const [private, pure virtual]
 

Implemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

Referenced by CollisionLevelState::prepare_collider().

virtual void BoundingVolume::output ostream &  out  )  const [private, pure virtual]
 

Implemented in BoundingHexahedron, BoundingLine, BoundingSphere, and OmniBoundingVolume.

INLINE_MATHUTIL void BoundingVolume::set_infinite  )  [private]
 

Referenced by OmniBoundingVolume::around_other(), and OmniBoundingVolume::extend_other().

void BoundingVolume::write ostream &  out,
int  indent_level = 0
const [private, virtual]
 

Reimplemented in BoundingHexahedron.

Definition at line 79 of file boundingVolume.cxx.

References indent().


Friends And Related Function Documentation

friend class BoundingHexahedron [friend]
 

Reimplemented in BoundingSphere, and OmniBoundingVolume.

Definition at line 152 of file boundingVolume.h.

friend class BoundingLine [friend]
 

Definition at line 153 of file boundingVolume.h.

friend class BoundingSphere [friend]
 

Reimplemented in BoundingHexahedron, and BoundingLine.

Definition at line 151 of file boundingVolume.h.


Member Data Documentation

PUBLISHED BoundingVolume::__pad0__ [private]
 

Reimplemented from TypedReferenceCount.

Reimplemented in BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 44 of file boundingVolume.h.

int BoundingVolume::_flags [protected]
 

Definition at line 102 of file boundingVolume.h.

Referenced by around(), BoundingSphere::around_finite(), around_hexahedrons(), around_lines(), GeometricBoundingVolume::around_points(), BoundingSphere::around_points(), around_spheres(), BoundingHexahedron::BoundingHexahedron(), BoundingSphere::extend_by_finite(), extend_by_hexahedron(), extend_by_line(), BoundingLine::extend_by_line(), BoundingSphere::extend_by_point(), extend_by_sphere(), BoundingSphere::extend_by_sphere(), and BoundingLine::xform().

TypeHandle BoundingVolume::_type_handle [static, private]
 

Reimplemented from TypedReferenceCount.

Reimplemented in BoundingHexahedron, BoundingLine, BoundingSphere, FiniteBoundingVolume, GeometricBoundingVolume, and OmniBoundingVolume.

Definition at line 24 of file boundingVolume.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