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

Camera.cc File Reference

#include "gcl/Camera.h"
#include "gcl/VecUtil.h"
#include "gcl/Quaternion.h"

Include dependency graph for Camera.cc:

Go to the source code of this file.


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...


Variables

const GCLReal kProjEpsilon = 0.01


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.


Variable Documentation

const GCLReal kProjEpsilon = 0.01

Definition at line 94 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