Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Volume Class Reference

Defines subclass of Shape that uses a list of Surfaces to define the the volume. More...

#include <Volume.h>

Inheritance diagram for Volume:

Shape SurfaceList GeomObject Cone Hexahedron Hype Sphe Tube Cons Box Trap Trd1 Trd2 Tubs List of all members.

Public Methods

 ~Volume ()
virtual double distanceToLeave ( const Ray& r, double testDist) const
 return the distance along the Ray to leave (if inside ), or enter (if outside). More...

virtual double distanceToEnter ( const Ray& r, double testDist) const
virtual int inside ( const Point& x ) const
 is the point inside the volume? More...

GeomObjecttransform (const CoordTransform&)
 rotate, translate. More...

virtual void printOn ( std::ostream& os = std::cout ) const
 print info about this object. More...

const Surfacesurface (int i) const
unsigned surfaceCount () const
virtual int getBoundaryIndex (const Point& p) const
 allows client using distanceToLeave to associate an index with a boundary, identified by the point. More...

virtual int lastBoundaryIndex () const
 distanceToLeave sets index of left boundary: client can use. More...

double getMaxDimension () const
 should be calculated by a subclass which is meant to be the maximum distance from the center. More...


Static Public Attributes

const double Surface_EPSILON = 2e-5

Protected Methods

 Volume (unsigned n)
Surfacesurface (int i)
void addSurface (Surface* s)
void deleteSurfaces ()
virtual void calcMaxDimension ()

Protected Attributes

double max_dimension

Detailed Description

Defines subclass of Shape that uses a list of Surfaces to define the the volume.

This class implements methods associated with the surfaces

Definition at line 16 of file Volume.h.


Constructor & Destructor Documentation

Volume::Volume ( unsigned n ) [explicit, protected]
 

Definition at line 15 of file Volume.cxx.

Volume::~Volume ( )
 

Definition at line 32 of file Volume.cxx.


Member Function Documentation

void Volume::addSurface ( Surface * s ) [protected]
 

Definition at line 22 of file Volume.cxx.

Referenced by Cone::Cone(), Cons::Cons(), Hype::Hype(), Sphe::Sphe(), Tubs::Tubs(), Hexahedron::addPlane(), and Tube::calculateSurfaces().

void Volume::calcMaxDimension ( ) [inline, protected, virtual]
 

Reimplemented in Hype.

Definition at line 64 of file Volume.h.

void Volume::deleteSurfaces ( ) [protected]
 

Definition at line 37 of file Volume.cxx.

Referenced by Tube::resize(), Box::resize(), and ~Volume().

double Volume::distanceToEnter ( const Ray & r,
double maxStep ) const [virtual]
 

Reimplemented from Shape.

Definition at line 286 of file Volume.cxx.

double Volume::distanceToLeave ( const Ray & r,
double maxStep ) const [virtual]
 

return the distance along the Ray to leave (if inside ), or enter (if outside).

Can be negative if the origin of the Ray is close to the surface. testDist is the maxiumum distance required. return MAX_FLT if no intersection between the Ray and the volume

Reimplemented from Shape.

Definition at line 161 of file Volume.cxx.

int Volume::getBoundaryIndex ( const Point & p ) const [virtual]
 

allows client using distanceToLeave to associate an index with a boundary, identified by the point.

Reimplemented from Shape.

Definition at line 65 of file Volume.cxx.

double Volume::getMaxDimension ( ) const [inline, virtual]
 

should be calculated by a subclass which is meant to be the maximum distance from the center.

Reimplemented from Shape.

Definition at line 53 of file Volume.h.

int Volume::inside ( const Point & x ) const [virtual]
 

is the point inside the volume?

Reimplemented from Shape.

Definition at line 341 of file Volume.cxx.

int Volume::lastBoundaryIndex ( ) const [virtual]
 

distanceToLeave sets index of left boundary: client can use.

Reimplemented from Shape.

Definition at line 82 of file Volume.cxx.

void Volume::printOn ( std::ostream & os = std::cout ) const [virtual]
 

print info about this object.

Reimplemented from Shape.

Reimplemented in Cone, Cons, Hype, Sphe, Trap, Trd1, Trd2, Tube, and Tubs.

Definition at line 54 of file Volume.cxx.

Referenced by operator<<(), Tube::printOn(), Trd2::printOn(), Trd1::printOn(), Trap::printOn(), Hype::printOn(), and Cone::printOn().

Surface & Volume::surface ( int i ) [inline, protected]
 

Definition at line 60 of file Volume.h.

const Surface & Volume::surface ( int i ) const [inline]
 

Definition at line 41 of file Volume.h.

Referenced by Cons::angle1(), Cons::angle2(), distanceToEnter(), distanceToLeave(), inside(), Hexahedron::plane(), printOn(), and transform().

unsigned Volume::surfaceCount ( ) const [inline]
 

Definition at line 42 of file Volume.h.

Referenced by Cons::angle1(), Cons::angle2(), distanceToEnter(), distanceToLeave(), inside(), printOn(), and transform().

GeomObject & Volume::transform ( const CoordTransform & T ) [virtual]
 

rotate, translate.

Reimplemented from Shape.

Definition at line 46 of file Volume.cxx.


Member Data Documentation

const double Volume::Surface_EPSILON = 2e-5 [static]
 

Definition at line 13 of file Volume.cxx.

double Volume::max_dimension [protected]
 

Definition at line 67 of file Volume.h.


The documentation for this class was generated from the following files:
Generated at Mon Nov 26 18:18:25 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000