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

Plane Class Reference

Define an infinite plane surface. More...

#include <Plane.h>

Inheritance diagram for Plane:

Surface GeomObject List of all members.

Public Methods

 Plane ( const Point& origin, const Vector& n )
 constructor: origin is saved as a reference, n is the vector from the origin to the plane. More...

 Plane ( const Point& origin, const Vector& nhat, double dist )
virtual double how_near ( const Point& x ) const
 define the geometry. More...

virtual 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 plane. More...

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

virtual Surfacecopy () const
 make a copy, but using same origin. More...

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

virtual double offset () const
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...


Private Attributes

double m_d

Detailed Description

Define an infinite plane surface.

Inherits origin and constant normal from Surface. Interpret direction data member of Surface as a unit normal vector from the origin to the surface, has data member for magnitude, for efficiency

Definition at line 15 of file Plane.h.


Constructor & Destructor Documentation

Plane::Plane ( const Point & o,
const Vector & n )
 

constructor: origin is saved as a reference, n is the vector from the origin to the plane.

Note that inside is defined as the side with the origin. second form is equivalent, but allows plane to pass through origin

Definition at line 9 of file Plane.cxx.

Plane::Plane ( const Point & o,
const Vector & n,
double dist )
 

Definition at line 17 of file Plane.cxx.


Member Function Documentation

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

make a copy, but using same origin.

Reimplemented from Surface.

Definition at line 44 of file Plane.cxx.

double Plane::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 24 of file Plane.cxx.

Referenced by Wedge::distance().

double Plane::how_near ( const Point & x ) const [inline, virtual]
 

define the geometry.

Reimplemented from Surface.

Definition at line 54 of file Plane.h.

Referenced by Wedge::how_near(), and Wedge::normal().

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

makes name available to subclasses using the type info facility.

Reimplemented from GeomObject.

Definition at line 44 of file Plane.h.

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

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

Reimplemented from Surface.

Definition at line 38 of file Plane.cxx.

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

Reimplemented from Surface.

Definition at line 40 of file Plane.h.

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

print info about this object.

Reimplemented from GeomObject.

Definition at line 49 of file Plane.cxx.

void Plane::reverse ( ) [virtual]
 

reverses sense of surface.

Reimplemented from Surface.

Definition at line 32 of file Plane.cxx.

void Plane::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 Plane.h.


Member Data Documentation

double Plane::m_d [private]
 

Definition at line 49 of file Plane.h.


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