Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Camera.h File Reference

#include "gcl/Geometry.h"
#include "cl/String.h"
#include <iostream.h>

Include dependency graph for Camera.h:

Go to the source code of this file.


Compounds

class  Camera

Functions

Void FindWorldRay ( const Coord &c, const Transform &inverseW2S, Point &from, Vector &dir )
FindWorldRay maps from display coords ([-1, 1], [-1, 1]) to a ray through the world. More...


Function Documentation

Void FindWorldRay (const Coord & c, const Transform & inverseW2S, Point & from, Vector & dir)

FindWorldRay maps from display coords ([-1, 1], [-1, 1]) to a ray through the world.

We assume our world-to-screen matrix maps from some form of view pyramid to the box from -1 to 1 in x and y and 0 to 1 in z.

Note that this works regardless of whether a perspective or orthogonal projection is used; the only thing you need is the inverse WS matrix:

inverseW2S = inv(camera.ProjMatrix() * camera.ModelMatrix);

Definition at line 316 of file Camera.cc.


Generated at Sat Aug 5 00:16:57 2000 for Graphics Class Library by doxygen 1.1.0 written by Dimitri van Heesch, © 1997-2000