version 3.3

VRS::RayTracingTechnique Class Reference

#include <vrs/raytracingtechnique.h>

Inheritance diagram for VRS::RayTracingTechnique:

VRS::Technique VRS::RenderObj VRS::SharedObj VRS::Visitable VRS::RayRequestTechnique

List of all members.

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 &)


Detailed Description

Abstract Base Class for Ray Tracing Techniques. This processor provides functionality to perform ray-tests. If shapes get evaluated, it uses ray intersection handlers to determine intersections. If no suitable intersection handler is available, it tries to simplify the shape.

Member Function Documentation

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.

static bool VRS::RayTracingTechnique::checkBounds ( const Ray ray,
const Bounds bbox 
) [static]

Check if the ray hits the bounding box.

VRS::RayTracingTechnique::VRS_TYPEINFO ( RayTracingTechnique  ,
Technique   
)

void VRS::RayTracingTechnique::intersect ( Engine ,
const Shape ,
const Ray  
) [protected]

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


The documentation for this class was generated from the following file:

Generated on Sat May 25 06:00:30 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact