Archon::Raytracer::Object Class Reference

Inheritance diagram for Archon::Raytracer::Object:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Object ()
virtual bool intersect (const Line3 &ray, const Object *originObject, const Part *originPart, double &dist, const Part **p=0) const =0
 Find the nearest intersection point between a ray propagating through empty space (ie.

Classes

class  Part

Detailed Description

Definition at line 42 of file object.H.


Member Function Documentation

virtual bool Archon::Raytracer::Object::intersect const Line3 ray,
const Object originObject,
const Part originPart,
double &  dist,
const Part **  p = 0
const [pure virtual]
 

Find the nearest intersection point between a ray propagating through empty space (ie.

not originating inside some object) and the surface of this object.

Treating 'ray' as a half-line originating in 'ray.point' and following 'ray.direction' - determine wether that ray has any intersection with this object. If there is no intersection 'dist' will be "un-touched" and 'false' will be returned.

If they have at least one point in common, 'dist' will be set to the distance from 'ray.point' to the nearest intersection point. A pointer to the corresponding object-part is assigned to '*p' if 'p' is not 0, and 'true' is returned.

If 'ray' originates at a point on the surface of some object (possibly this object), then 'originObject' and 'originPart' must be specified. When the ray originates directly from the eye, you must pass 0 for 'originObject' and 'originPart'.

Implemented in Archon::Raytracer::Plane, Archon::Raytracer::Cylinder, Archon::Raytracer::Sphere, Archon::Raytracer::Torus, and Archon::Raytracer::Polygon.


The documentation for this class was generated from the following file:
Generated on Sun Jul 30 22:56:59 2006 for Archon by  doxygen 1.4.4