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

Sphere Class Reference

Define a spherical surface. Inherit origin point from Surface. More...

#include <Sphere.h>

Inheritance diagram for Sphere:

Surface GeomObject List of all members.

Public Methods

 Sphere ( const Point& o, double radius )
virtual double how_near ( const Point& x ) const
 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 ) 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...

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

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


Private Attributes

double _radius

Detailed Description

Define a spherical surface. Inherit origin point from Surface.

Definition at line 11 of file Sphere.h.


Constructor & Destructor Documentation

Sphere::Sphere ( const Point & origin,
double radius )
 

Definition at line 9 of file Sphere.cxx.


Member Function Documentation

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

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

Reimplemented from Surface.

Definition at line 41 of file Sphere.cxx.

double Sphere::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 20 of file Sphere.cxx.

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

makes name available to subclasses using the type info facility.

Reimplemented from GeomObject.

Definition at line 30 of file Sphere.h.

Vector Sphere::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 32 of file Sphere.cxx.

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

print info about this object.

Reimplemented from GeomObject.

Definition at line 15 of file Sphere.cxx.

double Sphere::radius ( ) const [inline]
 

Definition at line 27 of file Sphere.h.

Referenced by how_near().


Member Data Documentation

double Sphere::_radius [private]
 

Definition at line 36 of file Sphere.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