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

osg::BoxVolume Class Reference

3D box defined by min and max point. More...

#include <OSGBoxVolume.h>

Inheritance diagram for osg::BoxVolume:

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

Collaboration graph
[legend]
List of all members.

Operators

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

OSG_BASE_DLLMAPPING bool operator== (const BoxVolume &b1, const BoxVolume &b2)
 Equality comparisons.

bool operator!= (const BoxVolume &b1, const BoxVolume &b2)
 Assignment operator.


Public Methods

Constructors
 BoxVolume ()
 BoxVolume (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
 BoxVolume (const Pnt3f &min, const Pnt3f &max)
 BoxVolume (const BoxVolume &obj)
Destructors
 ~BoxVolume ()
Get
const Pnt3fgetMin () const
 Return the lowest point of the volume.

const Pnt3fgetMax () const
 Return the highest point of the volume.

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

virtual Real32 getScalarVolume (void) const
 Gives the volume of the box (0 for an empty box).

void getBounds (float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax) const
void getBounds (Pnt3f &min, Pnt3f &max) const
void getOrigin (float &originX, float &originY, float &originZ) const
void getSize (float &sizeX, float &sizeY, float &sizeZ) const
void getSize (Vec3f &vec) const
Set
void setBounds (float w, float h, float d)
void setBounds (float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
void setBounds (const Pnt3f &min, const Pnt3f &max)
void setBoundsByCenterAndSize (const Pnt3f &center, const Vec3f &size)
 set method

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

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

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

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

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

bool intersect (const Line &line, Real32 &min, Real32 &max) const
 intersect the box with the given Line

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

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

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

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

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


Private Attributes

Pnt3f _min
Pnt3f _max

Detailed Description

3D box defined by min and max point.

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.

Author:
jbehr, Mon Dec 22 11:32:31 1997


Constructor & Destructor Documentation

osg::BoxVolume::BoxVolume   [inline]
 

Default constructor - leaves box totally empty

osg::BoxVolume::BoxVolume float    xmin,
float    ymin,
float    zmin,
float    xmax,
float    ymax,
float    zmax
[inline]
 

Default constructor - leaves box totally empty

osg::BoxVolume::BoxVolume const Pnt3f   min,
const Pnt3f   max
[inline]
 

Default constructor - leaves box totally empty

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

Default constructor - leaves box totally empty

osg::BoxVolume::~BoxVolume   [inline]
 


Member Function Documentation

const Pnt3f & osg::BoxVolume::getMin void    const [inline]
 

Return the lowest point of the volume.

Just a convience wrapper for getBounds()

Reimplemented from osg::Volume.

const Pnt3f & osg::BoxVolume::getMax void    const [inline]
 

Return the highest point of the volume.

Just a convience wrapper for getBounds()

Reimplemented from osg::Volume.

void BoxVolume::getCenter Pnt3f   center const [virtual]
 

Returns the center of a box.

Implements osg::Volume.

Real32 BoxVolume::getScalarVolume void    const [virtual]
 

Gives the volume of the box (0 for an empty box).

Implements osg::Volume.

void osg::BoxVolume::getBounds float &    xmin,
float &    ymin,
float &    zmin,
float &    xmax,
float &    ymax,
float &    zmax
const [inline]
 

void osg::BoxVolume::getBounds Pnt3f   min,
Pnt3f   max
const [inline, virtual]
 

Implements osg::Volume.

void osg::BoxVolume::getOrigin float &    originX,
float &    originY,
float &    originZ
const [inline]
 

void osg::BoxVolume::getSize float &    sizeX,
float &    sizeY,
float &    sizeZ
const [inline]
 

void osg::BoxVolume::getSize Vec3f   vec const [inline]
 

void osg::BoxVolume::setBounds float    w,
float    h,
float    d
[inline]
 

void osg::BoxVolume::setBounds float    xmin,
float    ymin,
float    zmin,
float    xmax,
float    ymax,
float    zmax
[inline]
 

void osg::BoxVolume::setBounds const Pnt3f   min,
const Pnt3f   max
[inline]
 

void BoxVolume::setBoundsByCenterAndSize const Pnt3f   center,
const Vec3f   size
 

set method

void BoxVolume::extendBy const Pnt3f   pt [virtual]
 

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

Implements osg::Volume.

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

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

Implements osg::Volume.

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

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

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

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

Implements osg::Volume.

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

intersect the box with the given Line

Implements osg::Volume.

bool BoxVolume::intersect const Line   line,
Real32   min,
Real32   max
const [virtual]
 

intersect the box with the given Line

Implements osg::Volume.

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

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

Implements osg::Volume.

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

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

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

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

Implements osg::Volume.

void BoxVolume::transform const Matrix   m [virtual]
 

Transforms Box3f by matrix, enlarging Box3f to contain result.

Implements osg::Volume.

const BoxVolume & BoxVolume::operator= const BoxVolume &    b1
 

Assignment operator.

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

print the volume */

Implements osg::Volume.


Friends And Related Function Documentation

OSG_BASE_DLLMAPPING bool operator== const BoxVolume &    b1,
const BoxVolume &    b2
[friend]
 

Equality comparisons.

bool operator!= const BoxVolume &    b1,
const BoxVolume &    b2
[friend]
 

Assignment operator.


Member Data Documentation

Pnt3f osg::BoxVolume::_min [private]
 

Pnt3f osg::BoxVolume::_max [private]
 


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