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

Ray Class Reference

GeomObject that is a base for directed rays, implementing a straight line. More...

#include <Ray.h>

Inheritance diagram for Ray:

GeomObject Helix List of all members.

Public Methods

 Ray ( const Point& p, const Vector& d )
 Ray ( const Ray& r )
virtual Point position ( double s ) const
 return position along ray. More...

const Pointposition () const
 position at start of ray. More...

virtual Vector direction ( double ) const
 return direction along ray. More...

const Vectordirection () const
 direction at start of ray. More...

GeomObjecttransform ( const CoordTransform & )
 transform the Ray to a new system. More...

virtual double curvature (double =0) const
 allows polymorphic test to check local curvature. More...

virtual double step () const
 used by Intersection::distance to step along rays searching for surface crossings. More...

double getArcLength () const
void setArcLength ( double s )
void setFlag ( int k )
int getFlag () const
void addArcLength ( double ds )
virtual double distanceOfClosestApproach (const Ray& r) const
 useful for vertexing between this Ray and another. More...

virtual Vector vectorOfClosestApproach (const Ray& r) const
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...


Protected Attributes

Point pos
Vector dir
float arclength
int flag

Detailed Description

GeomObject that is a base for directed rays, implementing a straight line.

Definition at line 9 of file Ray.h.


Constructor & Destructor Documentation

Ray::Ray ( const Point & p,
const Vector & d )
 

Definition at line 5 of file Ray.cxx.

Ray::Ray ( const Ray & r )
 

Definition at line 10 of file Ray.cxx.


Member Function Documentation

void Ray::addArcLength ( double ds ) [inline]
 

Definition at line 39 of file Ray.h.

double Ray::curvature ( double = 0 ) const [inline, virtual]
 

allows polymorphic test to check local curvature.

Reimplemented in Helix.

Definition at line 30 of file Ray.h.

Referenced by Intersection::distance().

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

direction at start of ray.

Definition at line 24 of file Ray.h.

Referenced by distanceOfClosestApproach(), Helix::printOn(), and vectorOfClosestApproach().

Vector Ray::direction ( double step ) const [inline, virtual]
 

return direction along ray.

Reimplemented in Helix.

Definition at line 22 of file Ray.h.

Referenced by Track::direction(), and Intersection::distance().

double Ray::distanceOfClosestApproach ( const Ray & r ) const [virtual]
 

useful for vertexing between this Ray and another.

Definition at line 42 of file Ray.cxx.

double Ray::getArcLength ( ) const [inline]
 

Definition at line 35 of file Ray.h.

Referenced by Track::Track(), Track::addSegment(), and Track::findSegment().

int Ray::getFlag ( ) const [inline]
 

Definition at line 38 of file Ray.h.

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

makes name available to subclasses using the type info facility.

Reimplemented from GeomObject.

Reimplemented in Helix.

Definition at line 46 of file Ray.h.

const Point & Ray::position ( ) const [inline]
 

position at start of ray.

Definition at line 19 of file Ray.h.

Referenced by distanceOfClosestApproach(), Volume::distanceToEnter(), Volume::distanceToLeave(), Helix::printOn(), and vectorOfClosestApproach().

Point Ray::position ( double step ) const [virtual]
 

return position along ray.

Reimplemented in Helix.

Definition at line 17 of file Ray.cxx.

Referenced by Intersection::distance(), and Track::position().

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

print info about this object.

Reimplemented from GeomObject.

Reimplemented in Helix.

Definition at line 27 of file Ray.cxx.

void Ray::setArcLength ( double s ) [inline]
 

Definition at line 36 of file Ray.h.

void Ray::setFlag ( int k ) [inline]
 

Definition at line 37 of file Ray.h.

double Ray::step ( ) const [inline, virtual]
 

used by Intersection::distance to step along rays searching for surface crossings.

Reimplemented in Helix.

Definition at line 33 of file Ray.h.

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

transform the Ray to a new system.

Reimplemented from GeomObject.

Reimplemented in Helix.

Definition at line 34 of file Ray.cxx.

Referenced by Helix::transform().

Vector Ray::vectorOfClosestApproach ( const Ray & r ) const [virtual]
 

Definition at line 50 of file Ray.cxx.


Member Data Documentation

float Ray::arclength [protected]
 

Definition at line 53 of file Ray.h.

Vector Ray::dir [protected]
 

Definition at line 52 of file Ray.h.

int Ray::flag [protected]
 

Definition at line 54 of file Ray.h.

Point Ray::pos [protected]
 

Definition at line 51 of file Ray.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