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

osg::SphereVolume Class Reference

Sphere in 3D space defined by center and radius. More...

#include <OSGSphereVolume.h>

Inheritance diagram for osg::SphereVolume:

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

Collaboration graph
[legend]
List of all members.

Public Methods

Constructor
 SphereVolume (void)
 SphereVolume (const SphereVolume &obj)
 SphereVolume (const Pnt3f &c, float r)
Destructor
 ~SphereVolume ()
Feature
void setValue (const Pnt3f &c, float r)
 Change the center and radius.

Set Values
void setCenter (const Pnt3f &c)
 set just the center

void setRadius (float r)
 set just the radius

Get Values
void getCenter (Pnt3f &center) const
 Returns the center.

const Pnt3fgetCenter (void) const
 Returns the center.

float getRadius () const
 Returns the radius.

virtual float getScalarVolume (void) const
 Return a sphere containing a given box.

virtual void getBounds (Pnt3f &min, Pnt3f &max) const
 Returns the center.

Extending
virtual void extendBy (const Pnt3f &pt)
void extendBy (const Volume &volume)
void extendBy (const SphereVolume &bb)
Intersection
virtual bool intersect (const Pnt3f &point) const
 Returns true if intersection of given point and Volume is not empty.

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

virtual bool intersect (const Line &line, Real32 &enter, Real32 &exit) const
 intersect the SphereVolume with the given Line

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

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

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

Transformation
virtual void transform (const Matrix &mat)
 Transforms Box3f by matrix.

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


Private Attributes

Pnt3f _center
float _radius

Detailed Description

Sphere in 3D space defined by center and radius.

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


Constructor & Destructor Documentation

osg::SphereVolume::SphereVolume void    [inline]
 

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

osg::SphereVolume::SphereVolume const Pnt3f   c,
float    r
[inline]
 

osg::SphereVolume::~SphereVolume   [inline]
 


Member Function Documentation

void osg::SphereVolume::setValue const Pnt3f   c,
float    r
[inline]
 

Change the center and radius.

void osg::SphereVolume::setCenter const Pnt3f   c [inline]
 

set just the center

void osg::SphereVolume::setRadius float    r [inline]
 

set just the radius

void osg::SphereVolume::getCenter Pnt3f   center const [inline, virtual]
 

Returns the center.

Implements osg::Volume.

const Pnt3f & osg::SphereVolume::getCenter void    const [inline]
 

Returns the center.

float osg::SphereVolume::getRadius   const [inline]
 

Returns the radius.

float SphereVolume::getScalarVolume void    const [virtual]
 

Return a sphere containing a given box.

Implements osg::Volume.

void SphereVolume::getBounds Pnt3f   min,
Pnt3f   max
const [virtual]
 

Returns the center.

Implements osg::Volume.

void SphereVolume::extendBy const Pnt3f   pt [virtual]
 

Implements osg::Volume.

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

Implements osg::Volume.

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

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

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

Implements osg::Volume.

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

intersect the SphereVolume with the given Line

Implements osg::Volume.

bool SphereVolume::intersect const Line   line,
Real32   enter,
Real32   exit
const [virtual]
 

intersect the SphereVolume with the given Line

Implements osg::Volume.

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

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

Implements osg::Volume.

bool osg::SphereVolume::intersect const SphereVolume &    sphere const [inline]
 

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

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

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

Implements osg::Volume.

void SphereVolume::transform const Matrix   mat [virtual]
 

Transforms Box3f by matrix.

Implements osg::Volume.

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

print the volume */

Implements osg::Volume.


Member Data Documentation

Pnt3f osg::SphereVolume::_center [private]
 

float osg::SphereVolume::_radius [private]
 


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