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

Cylinder Class Reference

Define an cylindrical surface. More...

#include <Cylinder.h>

Inheritance diagram for Cylinder:

Surface GeomObject List of all members.

Public Methods

 Cylinder (const Point& origin, double radius)
 simple constructor used by Tube: direction on z-axis. More...

 Cylinder ( const Point& origin, const Vector& axis, double radius )
 constructor: must specify origin point, axis vector, radius where sign of radius indicates inside/or outsice. More...

double how_near ( const Point& x ) const
 signed function giving minimum distance to the surface: surface is actually defined by zero. More...

double distance ( const Point& x, const Vector& v, int inout) const
 distance along direction v from point x to enter or leave the surface. More...

virtual Vector normal ( const Point& x ) const
 returns normal-vector at Point x, assuming x to be on the surface. More...

const Vectoraxis () const
 axis is the surface's basic direction vector. More...

const char* nameOf () const
 makes name available to subclasses using the type info facility. More...

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

double radius () const
virtual void setOffset (double offset)
 must be supplied by subclass if appropriate. More...

virtual double offset () const

Private Attributes

double _radius

Detailed Description

Define an cylindrical surface.

Definition at line 16 of file Cylinder.h.


Constructor & Destructor Documentation

Cylinder::Cylinder ( const Point & origin,
double r )
 

simple constructor used by Tube: direction on z-axis.

Definition at line 13 of file Cylinder.cxx.

Cylinder::Cylinder ( const Point & origin,
const Vector & a,
double r )
 

constructor: must specify origin point, axis vector, radius where sign of radius indicates inside/or outsice.

Definition at line 9 of file Cylinder.cxx.


Member Function Documentation

const Vector & Cylinder::axis ( ) const [inline]
 

axis is the surface's basic direction vector.

Definition at line 33 of file Cylinder.h.

Referenced by distance(), how_near(), and printOn().

double Cylinder::distance ( const Point & x,
const Vector & vhat,
int inout ) const [virtual]
 

distance along direction v from point x to enter or leave the surface.

Reimplemented from Surface.

Definition at line 36 of file Cylinder.cxx.

double Cylinder::how_near ( const Point & x ) const [virtual]
 

signed function giving minimum distance to the surface: surface is actually defined by zero.

The distance will be positive if the point is inside the Plane, negative if the point is outside.

Reimplemented from Surface.

Definition at line 19 of file Cylinder.cxx.

const char * Cylinder::nameOf ( ) const [inline, virtual]
 

makes name available to subclasses using the type info facility.

Reimplemented from GeomObject.

Definition at line 35 of file Cylinder.h.

Vector Cylinder::normal ( const Point & x ) const [virtual]
 

returns normal-vector at Point x, assuming x to be on the surface.

Reimplemented from Surface.

Definition at line 30 of file Cylinder.cxx.

double Cylinder::offset ( ) const [inline, virtual]
 

Reimplemented from Surface.

Definition at line 40 of file Cylinder.h.

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

print info about this object.

Reimplemented from GeomObject.

Definition at line 67 of file Cylinder.cxx.

double Cylinder::radius ( ) const [inline]
 

Definition at line 38 of file Cylinder.h.

Referenced by distance(), how_near(), and printOn().

void Cylinder::setOffset ( double offset ) [inline, virtual]
 

must be supplied by subclass if appropriate.

Allows the surface to be "moved" by changing the parameter describing the offset of the surface from the origin.

Reimplemented from Surface.

Definition at line 39 of file Cylinder.h.


Member Data Documentation

double Cylinder::_radius [private]
 

Definition at line 44 of file Cylinder.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:13 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000