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 |
Definition at line 42 of file object.H.
|
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. |