| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/raytracingtechnique.h>

Public Member Functions | |
| virtual void | start (Engine *engine) |
| virtual void | stop (Engine *engine) |
| virtual void | setCallback (Callback1< SO< IntersectionInfo > > *callback) |
| virtual void | registerIntersection (IntersectionInfo *info) |
| virtual void | registerIntersection (const Vector &point, const Vector &normal, const Ray &ray, const Matrix &modelview, const Matrix &orientation, const Matrix &projection, int hint=0, unsigned int instanceInfo=0, UINT32 id=0) |
| VRS_TYPEINFO (RayTracingTechnique, Technique) | |
Static Public Member Functions | |
| static bool | checkBounds (const Ray &ray, const Bounds &bbox) |
| Check if the ray hits the bounding box. | |
Protected Member Functions | |
| void | intersect (Engine *, const Shape *, const Ray &) |
| void | check (Engine *, const Matrix &, const Matrix &, const Matrix &, const Shape *, const Ray &) |
| virtual void VRS::RayTracingTechnique::start | ( | Engine * | ) | [virtual] |
Starts a technique. For all techniques in the scene graph, this method is called at the end of the pretraversal. The default behaviour is to add all passes in the pass array to the current TechniqueProcessor. If this is expected, subclasses should call "Technique::class()".
Reimplemented from VRS::Technique.
Reimplemented in VRS::RayRequestTechnique.
| virtual void VRS::RayTracingTechnique::stop | ( | Engine * | ) | [virtual] |
Stops a technique. For all techniques in the scene graph, this method is called in the method "stop()" of the TechniqueProcessor.
Reimplemented from VRS::Technique.
Reimplemented in VRS::RayRequestTechnique.
| virtual void VRS::RayTracingTechnique::setCallback | ( | Callback1< SO< IntersectionInfo > > * | callback | ) | [virtual] |
The callback receives all detected intersections. It must have been set before 'intersect' gets called. Derived ray-tracer classes might do this.
| virtual void VRS::RayTracingTechnique::registerIntersection | ( | IntersectionInfo * | info | ) | [virtual] |
| virtual void VRS::RayTracingTechnique::registerIntersection | ( | const Vector & | point, | |
| const Vector & | normal, | |||
| const Ray & | ray, | |||
| const Matrix & | modelview, | |||
| const Matrix & | orientation, | |||
| const Matrix & | projection, | |||
| int | hint = 0, |
|||
| unsigned int | instanceInfo = 0, |
|||
| UINT32 | id = 0 | |||
| ) | [virtual] |
This method has to be called if a RayIntersector finds an intersection point. It calls the registered callback.
Check if the ray hits the bounding box.
| VRS::RayTracingTechnique::VRS_TYPEINFO | ( | RayTracingTechnique | , | |
| Technique | ||||
| ) |
Reports all intersections to the observer, in no particular order. The ray must be given in object coordinates.
| void VRS::RayTracingTechnique::check | ( | Engine * | , | |
| const Matrix & | , | |||
| const Matrix & | , | |||
| const Matrix & | , | |||
| const Shape * | , | |||
| const Ray & | ||||
| ) | [protected] |
almost the same as `intersect' but this method knows about the original shape, not only about (possible) simplifications. The matrix must be applied to the object, not the ray. The ray must be given in object coordinates