libjgl

jRay Class Reference

Definition of a paratereized ray. More...

#include <ray.h>

List of all members.

Public Members

Protected Members


Detailed Description

Definition of a paratereized ray.

This ray is designed to be absolutely minimal. The purpose is so that the jBBox class can support intersection with a ray. For ray tracing libraries that use jBBox it would be useful to subclass jRay for a more full featured ray class.


Member Function Documentation

jRay::jRay()

Build a default ray whose origin is the world-space origin and whose direction is the negative z-axis.

jRay::jRay( const jVec3& _o, const jNorm3& _d )

Build a ray with the given origin and direction.

const jVec3& jRay::origin() const

Return the origin of the ray.

const jNorm3& jRay::direction() const

Return the direction of the ray.

void jRay::origin( const jVec3& _o )

Set the origin of the ray.

void jRay::direction( const jNorm3& _d )

Set the direction of the ray.

jVec3 jRay::intersection( jFlt t ) const

Returns the position in ray space for the given parameter, ie. o + d*t.

jRay jRay::operator*( const jMat4& T ) const

Returns the transformed ray.


Member Data Documentation

jVec3 jRay::o [protected]

jNorm3 jRay::d [protected]


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