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

Surface Class Reference

Virtual class that defines properties of an abstract surface Contains two data members: . More...

#include <Surface.h>

Inheritance diagram for Surface:

GeomObject Conic Cylinder Hyperbolic Plane Sphere Wedge List of all members.

Public Methods

virtual int inside (const Point& p) const
 return true if point is "inside" the directed surface default is just the inline above. More...

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

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

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

virtual GeomObjecttransform (const CoordTransform& T )
 Subclass must apply to other directions note that a Surface will not respond to a translation transformation. More...

virtual void reverse ()
 reverse sense of surface. More...

const Pointorigin () const
 access to origin. More...

const Vectordirection () const
 access to direction. More...

virtual Surface& copy () const
 virtual copy, must be implemented by subclass to allow copy. More...

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

virtual double offset () const

Protected Methods

 Surface ( const Point& o, const Vector& n )
 Surface (const Surface&)

Private Attributes

const PointreferencePoint
Vector referenceDirection

Detailed Description

Virtual class that defines properties of an abstract surface Contains two data members: .

Definition at line 19 of file Surface.h.


Constructor & Destructor Documentation

Surface::Surface ( const Point & o,
const Vector & n ) [inline, protected]
 

Definition at line 69 of file Surface.h.

Surface::Surface ( const Surface & old ) [protected]
 

Definition at line 22 of file Surface.cxx.


Member Function Documentation

Surface & Surface::copy ( ) const [virtual]
 

virtual copy, must be implemented by subclass to allow copy.

Reimplemented in Plane.

Definition at line 29 of file Surface.cxx.

const Vector & Surface::direction ( ) const [inline]
 

access to direction.

Definition at line 55 of file Surface.h.

Referenced by Wedge::axis(), Hyperbolic::axis(), Cylinder::axis(), Conic::axis(), Plane::how_near(), Plane::normal(), and Plane::printOn().

double Surface::distance ( const Point & x,
const Vector & v,
int inout ) const [pure virtual]
 

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

Reimplemented in Conic, Cylinder, Hyperbolic, Plane, Sphere, and Wedge.

Referenced by Intersection::distance().

double Surface::how_near ( const Point & x ) const [pure 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 in Conic, Cylinder, Hyperbolic, Plane, Sphere, and Wedge.

Referenced by Intersection::distance(), Volume::distanceToEnter(), Volume::distanceToLeave(), and inside().

int Surface::inside ( const Point & p ) const [inline, virtual]
 

return true if point is "inside" the directed surface default is just the inline above.

Definition at line 25 of file Surface.h.

Referenced by Wedge::distance(), Volume::distanceToEnter(), and Volume::inside().

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

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

Reimplemented in Conic, Cylinder, Hyperbolic, Plane, Sphere, and Wedge.

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

Reimplemented in Cylinder, and Plane.

Definition at line 65 of file Surface.h.

const Point & Surface::origin ( ) const [inline]
 

access to origin.

Definition at line 52 of file Surface.h.

Referenced by Cylinder::distance(), Wedge::how_near(), Sphere::how_near(), Plane::how_near(), Cylinder::how_near(), Plane::printOn(), and Cylinder::printOn().

void Surface::reverse ( ) [virtual]
 

reverse sense of surface.

Reimplemented in Plane.

Definition at line 15 of file Surface.cxx.

Referenced by Plane::reverse().

void Surface::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 in Cylinder, and Plane.

Definition at line 64 of file Surface.h.

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

Subclass must apply to other directions note that a Surface will not respond to a translation transformation.

Reimplemented from GeomObject.

Definition at line 9 of file Surface.cxx.

Referenced by Volume::transform().


Member Data Documentation

Vector Surface::referenceDirection [private]
 

Definition at line 83 of file Surface.h.

const Point & Surface::referencePoint [private]
 

Definition at line 80 of file Surface.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