Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ray Class Reference

3D ray. More...

#include <Ray.h>

Collaboration diagram for Ray:

Collaboration graph
[legend]
List of all members.

Public Methods

 Ray ()
 Default contructor.

 Ray (const Ray &ray)
 Copy constructor.

 Ray (const Vertex3 origin, const Vertex3 direction)
 Constuct a ray with given origin and direction.

const Vertex3origin () const
 Return the ray origin.

const Vertex3direction () const
 Return the ray direction.

void setOrigin (const Vertex3 &origin)
 Sets the ray origin.

void setDirection (const Vertex3 &direction)
 Sets the ray direction.

void transform (const Matrix4 &M)
 Transforms the ray. More...

void transformOrigin (const Matrix4 &M)
 Transforms the ray origin. More...


Public Attributes

Vertex3 o
 Ray origin.

Vertex3 d
 Ray direction.


Detailed Description

3D ray.

Todo:
Hide public attributes.

A ray is defined by an origin o and a direction d:


Member Function Documentation

void Ray::transform const Matrix4   M
 

Transforms the ray.

Parameters:
M  4x4 transformation matrix.
Precondition:
none.
Postcondition:
The ray is transformed according to M and its direction is normalized.

void Ray::transformOrigin const Matrix4   M [inline]
 

Transforms the ray origin.

Parameters:
M  4x4 transformation matrix.
Precondition:
ray: { o + y*d | y >- 0 }
Postcondition:
ray: { M*o + y*d | y >- 0 }


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.