Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::FrustumVolume Class Reference

3D frustum defined by 6 planes. More...

#include <OSGFrustumVolume.h>

Inheritance diagram for osg::FrustumVolume:

Inheritance graph
[legend]
Collaboration diagram for osg::FrustumVolume:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors
 FrustumVolume ()
 FrustumVolume (const Plane &pnear, const Plane &pfar, const Plane &left, const Plane &right, const Plane &top, const Plane &bottom)
 Constructor given bounds.

 FrustumVolume (const FrustumVolume &obj)
 Copy Constructor.

Destructors
 ~FrustumVolume ()
 Destructor.

Get
const PlanegetNear (void) const
 Returns the near plane.

const PlanegetFar (void) const
 Returns the far plane.

const PlanegetLeft (void) const
 Returns the left plane.

const PlanegetRight (void) const
 Returns the right plane.

const PlanegetTop (void) const
 Returns the top plane.

const PlanegetBottom (void) const
 Returns the bottom plane.

const PlanegetPlanes (void)
 get method

const PlanegetPlanes (void) const
 get method

virtual void getCenter (Pnt3f &center) const
 Returns the center of a box.

virtual Real32 getScalarVolume (void) const
 Gives the volume of the frustum.

virtual void getBounds (Pnt3f &minPnt, Pnt3f &maxPnt) const
 Gives the boundaries of the volume.

Get
void setPlanes (const Plane &pnear, const Plane &pfar, const Plane &left, const Plane &right, const Plane &top, const Plane &bottom)
 set method

void setPlanes (const Pnt3f &nlt, const Pnt3f &nlb, const Pnt3f &nrt, const Pnt3f &nrb, const Pnt3f &flt, const Pnt3f &flb, const Pnt3f &frt, const Pnt3f &frb)
 set method

void setPlanes (const Matrix &matrix)
 set method

Extending
virtual void extendBy (const Pnt3f &pt)
 Extends Frustum3f (if necessary) to contain given 3D point.

void extendBy (const Volume &volume)
 Extends Frustum3f (if necessary) to contain given 3D point.

void extendBy (const FrustumVolume &bb)
 Extends Frustum3f (if necessary) to contain given 3D point.

Intersection
bool intersect (const Pnt3f &point) const
 Returns true if intersection of given point and Frustum3f is not empty.

bool intersect (const Line &line) const
 intersect the box with the given Line

bool intersect (const Line &line, Real32 &minDist, Real32 &maxDist) const
 intersect the box with the given Line

bool intersect (const Volume &volume) const
 Returns true if intersection of given point and Frustum3f is not empty.

bool intersect (const FrustumVolume &bb) const
 Returns true if intersection of given point and Frustum3f is not empty.

virtual bool isOnSurface (const Pnt3f &point) const
 Returns true if intersection of given point and Frustum3f is not empty.

Transformation
virtual void transform (const Matrix &m)
 Transforms Frustum3f by matrix, enlarging Frustum3f to contain result.

Assignment
const FrustumVolume & operator= (const FrustumVolume &b1)
 Assignment operator.

Output
virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
 print the volume */


Private Attributes

Plane _planeVec [6]

Detailed Description

3D frustum defined by 6 planes.

Author:
jbehr
This box class is used by other classes in ase for data exchange and storage. It provides representation of the defining corners of a box in 3D space.


Constructor & Destructor Documentation

osg::FrustumVolume::FrustumVolume   [inline]
 

Default constructor - leaves box totally empty

osg::FrustumVolume::FrustumVolume const Plane   pnear,
const Plane   pfar,
const Plane   left,
const Plane   right,
const Plane   top,
const Plane   bottom
[inline]
 

Constructor given bounds.

osg::FrustumVolume::FrustumVolume const FrustumVolume &    obj [inline]
 

Copy Constructor.

osg::FrustumVolume::~FrustumVolume   [inline]
 

Destructor.


Member Function Documentation

const Plane & osg::FrustumVolume::getNear void    const [inline]
 

Returns the near plane.

const Plane & osg::FrustumVolume::getFar void    const [inline]
 

Returns the far plane.

const Plane & osg::FrustumVolume::getLeft void    const [inline]
 

Returns the left plane.

const Plane & osg::FrustumVolume::getRight void    const [inline]
 

Returns the right plane.

const Plane & osg::FrustumVolume::getTop void    const [inline]
 

Returns the top plane.

const Plane & osg::FrustumVolume::getBottom void    const [inline]
 

Returns the bottom plane.

const Plane * osg::FrustumVolume::getPlanes void    [inline]
 

get method

const Plane * osg::FrustumVolume::getPlanes void    const [inline]
 

get method

void FrustumVolume::getCenter Pnt3f   center const [virtual]
 

Returns the center of a box.

Implements osg::Volume.

Real32 FrustumVolume::getScalarVolume void    const [virtual]
 

Gives the volume of the frustum.

Implements osg::Volume.

void FrustumVolume::getBounds Pnt3f   minPnt,
Pnt3f   maxPnt
const [virtual]
 

Gives the boundaries of the volume.

Implements osg::Volume.

void FrustumVolume::setPlanes const Plane   pnear,
const Plane   pfar,
const Plane   left,
const Plane   right,
const Plane   top,
const Plane   bottom
 

set method

void FrustumVolume::setPlanes const Pnt3f   nlt,
const Pnt3f   nlb,
const Pnt3f   nrt,
const Pnt3f   nrb,
const Pnt3f   flt,
const Pnt3f   flb,
const Pnt3f   frt,
const Pnt3f   frb
 

set method

void FrustumVolume::setPlanes const Matrix   matrix
 

set method

void FrustumVolume::extendBy const Pnt3f   pt [virtual]
 

Extends Frustum3f (if necessary) to contain given 3D point.

Implements osg::Volume.

void osg::FrustumVolume::extendBy const Volume   volume [inline, virtual]
 

Extends Frustum3f (if necessary) to contain given 3D point.

Implements osg::Volume.

void osg::FrustumVolume::extendBy const FrustumVolume &    bb [inline]
 

Extends Frustum3f (if necessary) to contain given 3D point.

bool FrustumVolume::intersect const Pnt3f   point const [virtual]
 

Returns true if intersection of given point and Frustum3f is not empty.

Implements osg::Volume.

bool FrustumVolume::intersect const Line   line const [virtual]
 

intersect the box with the given Line

Implements osg::Volume.

bool FrustumVolume::intersect const Line   line,
Real32   minDist,
Real32   maxDist
const [virtual]
 

intersect the box with the given Line

Implements osg::Volume.

bool osg::FrustumVolume::intersect const Volume   volume const [inline, virtual]
 

Returns true if intersection of given point and Frustum3f is not empty.

Implements osg::Volume.

bool osg::FrustumVolume::intersect const FrustumVolume &    bb const [inline]
 

Returns true if intersection of given point and Frustum3f is not empty.

bool FrustumVolume::isOnSurface const Pnt3f   point const [virtual]
 

Returns true if intersection of given point and Frustum3f is not empty.

Implements osg::Volume.

void FrustumVolume::transform const Matrix   m [virtual]
 

Transforms Frustum3f by matrix, enlarging Frustum3f to contain result.

Implements osg::Volume.

const FrustumVolume & FrustumVolume::operator= const FrustumVolume &    b1
 

Assignment operator.

void FrustumVolume::dump UInt32    uiIndent = 0,
const BitVector    bvFlags = 0
const [virtual]
 

print the volume */

Implements osg::Volume.


Member Data Documentation

Plane osg::FrustumVolume::_planeVec[6] [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Jul 3 16:23:35 2002 for OpenSG by doxygen1.2.16