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

BoundingHexahedron Class Reference

#include <boundingHexahedron.h>

Inheritance diagram for BoundingHexahedron:

FiniteBoundingVolume GeometricBoundingVolume BoundingVolume TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Member Functions

INLINE_MATHUTIL BoundingHexahedron ()
 BoundingHexahedron (const Frustumf &frustum, bool is_ortho, CoordinateSystem cs=CS_default)
 BoundingHexahedron (const LPoint3f &fll, const LPoint3f &flr, const LPoint3f &fur, const LPoint3f &ful, const LPoint3f &nll, const LPoint3f &nlr, const LPoint3f &nur, const LPoint3f &nul)
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
virtual void write (ostream &out, int indent_level=0) const
INLINE_MATHUTIL int get_num_points () const
INLINE_MATHUTIL LPoint3f get_point (int n) const
INLINE_MATHUTIL int get_num_planes () const
INLINE_MATHUTIL Planef get_plane (int n) const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

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)
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)
virtual int contains_point (const LPoint3f &point) const
virtual int contains_lineseg (const LPoint3f &a, const LPoint3f &b) const
virtual int contains_sphere (const BoundingSphere *sphere) const
virtual int contains_hexahedron (const BoundingHexahedron *hexahedron) const

Private Types

enum  { num_points = 8, num_planes = 6 }

Private Member Functions

void set_planes ()
void set_centroid ()

Private Attributes

LPoint3f _points [num_points]
Planef _planes [num_planes]
LPoint3f _centroid

Static Private Attributes

TypeHandle _type_handle

Friends

class BoundingSphere

Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
num_points 
num_planes 

Definition at line 95 of file boundingHexahedron.h.


Constructor & Destructor Documentation

INLINE_MATHUTIL BoundingHexahedron::BoundingHexahedron  ) 
 

Referenced by make_copy().

BoundingHexahedron::BoundingHexahedron const Frustumf &  frustum,
bool  is_ortho,
CoordinateSystem  cs = CS_default
 

Definition at line 29 of file boundingHexahedron.cxx.

References BoundingVolume::_flags, _points, cs, CS_default, CS_zup_right, default_coordinate_system, set_centroid(), set_planes(), and xform().

BoundingHexahedron::BoundingHexahedron const LPoint3f &  fll,
const LPoint3f &  flr,
const LPoint3f &  fur,
const LPoint3f &  ful,
const LPoint3f &  nll,
const LPoint3f &  nlr,
const LPoint3f &  nur,
const LPoint3f &  nul
 

Definition at line 64 of file boundingHexahedron.cxx.

References BoundingVolume::_flags, _points, set_centroid(), and set_planes().


Member Function Documentation

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

Reimplemented from BoundingVolume.

Definition at line 216 of file boundingHexahedron.cxx.

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

Implements BoundingVolume.

Definition at line 167 of file boundingHexahedron.cxx.

References BoundingVolume::around_hexahedrons(), and first.

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

Reimplemented from GeometricBoundingVolume.

Definition at line 201 of file boundingHexahedron.cxx.

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

Reimplemented from BoundingVolume.

Definition at line 208 of file boundingHexahedron.cxx.

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

Reimplemented from BoundingVolume.

Definition at line 301 of file boundingHexahedron.cxx.

References _points, contains_point(), get_max(), get_min(), BoundingVolume::is_empty(), and num_points.

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

Reimplemented from GeometricBoundingVolume.

Definition at line 245 of file boundingHexahedron.cxx.

References _planes, a, b, BoundingVolume::is_empty(), BoundingVolume::is_infinite(), num_planes, and p.

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

Implements BoundingVolume.

Definition at line 174 of file boundingHexahedron.cxx.

References BoundingVolume::contains_hexahedron().

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

Reimplemented from GeometricBoundingVolume.

Definition at line 224 of file boundingHexahedron.cxx.

References _planes, BoundingVolume::is_empty(), BoundingVolume::is_infinite(), num_planes, and p.

Referenced by contains_hexahedron().

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

Reimplemented from BoundingVolume.

Definition at line 271 of file boundingHexahedron.cxx.

References _planes, BoundingSphere::get_radius(), BoundingVolume::is_empty(), num_planes, and p.

Referenced by BoundingSphere::contains_hexahedron().

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

Reimplemented from BoundingVolume.

Definition at line 194 of file boundingHexahedron.cxx.

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

Reimplemented from GeometricBoundingVolume.

Definition at line 180 of file boundingHexahedron.cxx.

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

Reimplemented from BoundingVolume.

Definition at line 187 of file boundingHexahedron.cxx.

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

Implements BoundingVolume.

Definition at line 162 of file boundingHexahedron.cxx.

References BoundingVolume::extend_by_hexahedron().

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

Reimplemented from FiniteBoundingVolume.

Definition at line 116 of file boundingHexahedron.h.

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

LPoint3f BoundingHexahedron::get_approx_center  )  const [virtual]
 

Implements GeometricBoundingVolume.

Definition at line 116 of file boundingHexahedron.cxx.

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

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

Reimplemented from FiniteBoundingVolume.

Definition at line 105 of file boundingHexahedron.h.

LPoint3f BoundingHexahedron::get_max  )  const [virtual]
 

Implements FiniteBoundingVolume.

Definition at line 102 of file boundingHexahedron.cxx.

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

Referenced by contains_hexahedron(), output(), and write().

LPoint3f BoundingHexahedron::get_min  )  const [virtual]
 

Definition at line 88 of file boundingHexahedron.cxx.

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

Referenced by contains_hexahedron(), output(), and write().

INLINE_MATHUTIL int BoundingHexahedron::get_num_planes  )  const
 

INLINE_MATHUTIL int BoundingHexahedron::get_num_points  )  const
 

INLINE_MATHUTIL Planef BoundingHexahedron::get_plane int  n  )  const
 

INLINE_MATHUTIL LPoint3f BoundingHexahedron::get_point int  n  )  const
 

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

Reimplemented from FiniteBoundingVolume.

Definition at line 113 of file boundingHexahedron.h.

References FiniteBoundingVolume::get_class_type().

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

Reimplemented from FiniteBoundingVolume.

Definition at line 108 of file boundingHexahedron.h.

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

Referenced by ConfigureFn().

BoundingVolume * BoundingHexahedron::make_copy  )  const [virtual]
 

Implements BoundingVolume.

Definition at line 83 of file boundingHexahedron.cxx.

References BoundingHexahedron().

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

Implements BoundingVolume.

Definition at line 134 of file boundingHexahedron.cxx.

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

void BoundingHexahedron::set_centroid  )  [private]
 

Definition at line 362 of file boundingHexahedron.cxx.

References _centroid, _points, and num_points.

Referenced by BoundingHexahedron(), and xform().

void BoundingHexahedron::set_planes  )  [private]
 

Definition at line 332 of file boundingHexahedron.cxx.

References _centroid, _planes, and _points.

Referenced by BoundingHexahedron(), and xform().

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

Reimplemented from BoundingVolume.

Definition at line 145 of file boundingHexahedron.cxx.

References _centroid, _points, get_max(), get_min(), indent(), BoundingVolume::is_empty(), BoundingVolume::is_infinite(), and num_points.

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

Implements GeometricBoundingVolume.

Definition at line 123 of file boundingHexahedron.cxx.

References _points, BoundingVolume::is_empty(), BoundingVolume::is_infinite(), num_points, set_centroid(), and set_planes().

Referenced by BoundingHexahedron().


Friends And Related Function Documentation

friend class BoundingSphere [friend]
 

Reimplemented from BoundingVolume.

Definition at line 121 of file boundingHexahedron.h.


Member Data Documentation

LPoint3f BoundingHexahedron::_centroid [private]
 

Definition at line 101 of file boundingHexahedron.h.

Referenced by get_approx_center(), set_centroid(), set_planes(), and write().

Planef BoundingHexahedron::_planes[num_planes] [private]
 

Definition at line 100 of file boundingHexahedron.h.

Referenced by contains_lineseg(), contains_point(), contains_sphere(), and set_planes().

LPoint3f BoundingHexahedron::_points[num_points] [private]
 

Definition at line 99 of file boundingHexahedron.h.

Referenced by BoundingHexahedron(), contains_hexahedron(), get_max(), get_min(), set_centroid(), set_planes(), write(), and xform().

TypeHandle BoundingHexahedron::_type_handle [static, private]
 

Reimplemented from FiniteBoundingVolume.

Definition at line 26 of file boundingHexahedron.cxx.


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