Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

OmniBoundingVolume Class Reference

This is a special kind of GeometricBoundingVolume that fills all of space. More...

#include "omniBoundingVolume.h"

Inheritance diagram for OmniBoundingVolume:
GeometricBoundingVolume BoundingVolume TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
virtual LPoint3 get_approx_center () const
virtual TypeHandle get_type () const
virtual BoundingVolumemake_copy () const
virtual void output (ostream &out) const
virtual void xform (const LMatrix4 &mat)

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Protected Member Functions

virtual bool around_boxes (const BoundingVolume **first, const BoundingVolume **last)
 Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty box.
virtual bool around_hexahedrons (const BoundingVolume **first, const BoundingVolume **last)
 Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty hexahedron.
virtual bool around_other (BoundingVolume *other, const BoundingVolume **first, const BoundingVolume **last) const
virtual bool around_points (const LPoint3 *first, const LPoint3 *last)
 Puts the volume around the indicated list of points, identified by an STL-style begin/end list.
virtual bool around_spheres (const BoundingVolume **first, const BoundingVolume **last)
 Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty sphere.
virtual int contains_box (const BoundingBox *box) const
 Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a box.
virtual int contains_hexahedron (const BoundingHexahedron *hexahedron) const
 Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a hexahedron.
virtual int contains_lineseg (const LPoint3 &a, const LPoint3 &b) const
 Tests whether the volume contains the indicated line segment.
virtual int contains_other (const BoundingVolume *other) const
virtual int contains_point (const LPoint3 &point) const
 Tests whether the volume contains the indicated point.
virtual int contains_sphere (const BoundingSphere *sphere) const
 Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a sphere.
virtual bool extend_by_box (const BoundingBox *box)
 Double-dispatch support: called by extend_other() when the type we're extending by is known to be a box.
virtual bool extend_by_hexahedron (const BoundingHexahedron *hexahedron)
 Double-dispatch support: called by extend_other() when the type we're extending by is known to be a hexahedron.
virtual bool extend_by_point (const LPoint3 &point)
 Extends the volume to include the indicated point.
virtual bool extend_by_sphere (const BoundingSphere *sphere)
 Double-dispatch support: called by extend_other() when the type we're extending by is known to be a sphere.
virtual bool extend_other (BoundingVolume *other) const

Friends

class BoundingHexahedron

Detailed Description

This is a special kind of GeometricBoundingVolume that fills all of space.

Definition at line 27 of file omniBoundingVolume.h.


Member Function Documentation

bool OmniBoundingVolume::around_boxes ( const BoundingVolume **  first,
const BoundingVolume **  last 
) [protected, virtual]

Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty box.

Reimplemented from BoundingVolume.

Definition at line 163 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty hexahedron.

Reimplemented from BoundingVolume.

Definition at line 174 of file omniBoundingVolume.cxx.

bool OmniBoundingVolume::around_points ( const LPoint3 first,
const LPoint3 last 
) [protected, virtual]

Puts the volume around the indicated list of points, identified by an STL-style begin/end list.

Reimplemented from GeometricBoundingVolume.

Definition at line 142 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by around_other() when the type of the first element in the list is known to be a nonempty sphere.

Reimplemented from BoundingVolume.

Definition at line 152 of file omniBoundingVolume.cxx.

int OmniBoundingVolume::contains_box ( const BoundingBox box) const [protected, virtual]

Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a box.

Reimplemented from BoundingVolume.

Definition at line 215 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a hexahedron.

Reimplemented from BoundingVolume.

Definition at line 225 of file omniBoundingVolume.cxx.

int OmniBoundingVolume::contains_lineseg ( const LPoint3 a,
const LPoint3 b 
) const [protected, virtual]

Tests whether the volume contains the indicated line segment.

Reimplemented from GeometricBoundingVolume.

Definition at line 195 of file omniBoundingVolume.cxx.

int OmniBoundingVolume::contains_point ( const LPoint3 point) const [protected, virtual]

Tests whether the volume contains the indicated point.

Reimplemented from GeometricBoundingVolume.

Definition at line 185 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a sphere.

Reimplemented from BoundingVolume.

Definition at line 205 of file omniBoundingVolume.cxx.

bool OmniBoundingVolume::extend_by_box ( const BoundingBox box) [protected, virtual]

Double-dispatch support: called by extend_other() when the type we're extending by is known to be a box.

Reimplemented from BoundingVolume.

Definition at line 122 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by extend_other() when the type we're extending by is known to be a hexahedron.

Reimplemented from BoundingVolume.

Definition at line 132 of file omniBoundingVolume.cxx.

bool OmniBoundingVolume::extend_by_point ( const LPoint3 point) [protected, virtual]

Extends the volume to include the indicated point.

Returns true if possible, false if not.

Reimplemented from GeometricBoundingVolume.

Definition at line 102 of file omniBoundingVolume.cxx.

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

Double-dispatch support: called by extend_other() when the type we're extending by is known to be a sphere.

Reimplemented from BoundingVolume.

Definition at line 112 of file omniBoundingVolume.cxx.

static void OmniBoundingVolume::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from GeometricBoundingVolume.

Definition at line 71 of file omniBoundingVolume.h.

References GeometricBoundingVolume::init_type().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations