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

BoundingPlane Class Reference

This funny bounding volume is an infinite plane that divides space into two regions: the part behind the normal, which is "inside" the bounding volume, and the part in front of the normal, which is "outside" the bounding volume. More...

#include "boundingPlane.h"

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

List of all members.

Public Member Functions

 BoundingPlane ()
 Constructs an empty "plane" that has no intersections.
 BoundingPlane (const LPlane &plane)
virtual const BoundingPlaneas_bounding_plane () const
 Virtual downcast method.
virtual TypeHandle force_init_type ()
virtual LPoint3 get_approx_center () const
const LPlane & get_plane () 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_other (BoundingVolume *other, const BoundingVolume **first, const BoundingVolume **last) const
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_line (const BoundingLine *line) const
 Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a line.
virtual int contains_other (const BoundingVolume *other) const
virtual int contains_plane (const BoundingPlane *plane) const
 Double-dispatch support: called by contains_other() when the type we're testing for intersection is known to be a plane.
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_plane (const BoundingPlane *plane)
 Double-dispatch support: called by extend_other() when the type we're extending by is known to be a plane.
virtual bool extend_other (BoundingVolume *other) const

Friends

class BoundingBox
class BoundingSphere

Detailed Description

This funny bounding volume is an infinite plane that divides space into two regions: the part behind the normal, which is "inside" the bounding volume, and the part in front of the normal, which is "outside" the bounding volume.

Definition at line 31 of file boundingPlane.h.


Constructor & Destructor Documentation

BoundingPlane::BoundingPlane ( ) [inline]

Constructs an empty "plane" that has no intersections.

Definition at line 23 of file boundingPlane.I.


Member Function Documentation

const BoundingPlane * BoundingPlane::as_bounding_plane ( ) const [virtual]

Virtual downcast method.

Returns this object as a pointer of the indicated type, if it is in fact that type. Returns NULL if it is not that type.

Reimplemented from BoundingVolume.

Definition at line 81 of file boundingPlane.cxx.

int BoundingPlane::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 169 of file boundingPlane.cxx.

References BoundingBox::get_maxq(), BoundingBox::get_minq(), BoundingBox::get_point(), BoundingVolume::is_empty(), and BoundingVolume::is_infinite().

Referenced by BoundingBox::contains_plane().

int BoundingPlane::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 243 of file boundingPlane.cxx.

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

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

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

Reimplemented from BoundingVolume.

Definition at line 221 of file boundingPlane.cxx.

int BoundingPlane::contains_plane ( const BoundingPlane plane) const [protected, virtual]

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

Reimplemented from BoundingVolume.

Definition at line 231 of file boundingPlane.cxx.

int BoundingPlane::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 142 of file boundingPlane.cxx.

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

Referenced by BoundingSphere::contains_plane().

bool BoundingPlane::extend_by_plane ( const BoundingPlane plane) [protected, virtual]

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

Reimplemented from BoundingVolume.

Definition at line 123 of file boundingPlane.cxx.

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

static void BoundingPlane::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 73 of file boundingPlane.h.

References GeometricBoundingVolume::init_type().


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