librtl

rtl_shadowfeeler Class Reference

A rtl_ray subclass to trace for shadows. More...

#include <shadowfeeler.h>

Inherits rtl_ray.

List of all members.

Public Members

Static Public Members


Detailed Description

A rtl_ray subclass to trace for shadows.

This class modifies the ray tracing algorithm slightly to compute shadows.


Member Function Documentation

rtl_shadowfeeler::rtl_shadowfeeler( rtl_object*, const jVec3&, rtl_light* )

Construct a shadow-feeler. This object will trace a ray from the given world space point which originated on the given object towards the given light.

jFlt rtl_shadowfeeler::maxtime() const

Returns the distance this shadow feeler will travel before reaching the light.

jFlt rtl_shadowfeeler::trace()

Traces the ray.

Reimplemented from rtl_ray.

const rtl_subobject* rtl_shadowfeeler::objecthit() const

Returns the object which was struck to spawn this shadow-feeler.

const rtl_light* rtl_shadowfeeler::light() const

Returns the light for whose light this ray is feeling.

jFlt rtl_shadowfeeler::energy() const

Returns the fractional amount of light that follows the path of the shadow feeler. This is in case the shadow feeler hit transparent objects during the trace. It continues (without refraction) and maintains a value in 0..1 of how much of the lights power travelled to objecthit(). If there was no intersection before maxtime than returns 1, if a opaque object is struck than a value of 0 is returned otherwise a value between 0 and 1 is returned.


Member Data Documentation

const rtl_shadowfeeler* rtl_shadowfeeler::Tracing [static]

When a shadow feeler has been trace'd it is not the same ray as is passed to the rtl_object::lclintersect() or rtl_groupmem::intersect() functions, because the shadow feeler ray will be transformed into object space. This transformed ray is not a shadow feeler in type. This static variable points to the actual shadow feeler that has been transformed for actual intersection calculations.


The documentation for this class was generated from the following file:
JSP / librtl v0.2 mtigges@cpsc.ucalgary.ca