Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Intersectable Class Reference

Interface that needs to be implemented by all intersectable primitives (Plane, Sphere, Triangle). More...

#include <intersectable.h>

Inherited by Plane, Sphere, and Triangle.

Inheritance diagram for Intersectable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Intersectable ()
virtual bool intersect (const Ray &ray) const =0
virtual bool intersect (const Ray &ray, Intersection &is) const =0
virtual void getAABB (AABB &bb) const =0

Detailed Description

Interface that needs to be implemented by all intersectable primitives (Plane, Sphere, Triangle).

The intersect(const Ray& ray) function returns true if the ray intersects the object, but it does not return any info about the intersection point. If needed, use the intersect(const Ray& ray, Intersection& is) function instead, which computes all necessary data and stores it in the supplied Intersection object. Note that this function is slower than the simple form, and should only be used if the additional information is needed.


The documentation for this class was generated from the following file:
Generated on Sun Mar 26 19:14:12 2006 for ASR by  doxygen 1.4.4