ModelviewMatrix Class Reference

Encapsulates a limited OpenGL modelview matrix. More...

#include <GLutils.h>

Inheritance diagram for ModelviewMatrix:

Inheritance graph
[legend]
Collaboration diagram for ModelviewMatrix:

Collaboration graph
[legend]
List of all members.

Public Methods

void translate (double x, double y, double z)
 This does what glTranslate does.

void lookAt (Vertex3d COP, Vertex3d lookatPoint, ColVector3d upVector)
 This does what gluLookAt does.

void lookAtWithOffset (Vertex3d COP, Vertex3d lookatPoint, ColVector3d upVector, double latitude, double longitude)
 Look at one place, from another, but first orbit the camera around the lookAtPoint by an amount designated by polar coordinates phi and theta. More...


Detailed Description

Encapsulates a limited OpenGL modelview matrix.

This code was adapted from SGI's reference implementation of OpenGL, namely their functions "gluLookAt" and "glTranslate."

Note:
I would use "gluLookAt" and "glTranslate" directly, except for the fact that I can't always depend on having a stable OpenGL rendering context below me to hold the matrices.

Definition at line 54 of file GLutils.h.


Member Function Documentation

void ModelviewMatrix::lookAtWithOffset Vertex3d    COP,
Vertex3d    lookatPoint,
ColVector3d    upVector,
double    latitude,
double    longitude
 

Look at one place, from another, but first orbit the camera around the lookAtPoint by an amount designated by polar coordinates phi and theta.

Parameters:
COP  The center of projection, aka the camera position.
lookatPoint  The point that the camera should look at.
upVector  A normalized vector pointing in the "up" direction for the camera.
latitude  The amount, in degrees, that should be offset in the elevation.
longitude  The amount, in degrees, that should be offset in the azimuth.

Definition at line 228 of file GLutils.cpp.

Referenced by Scanner::drawWithAngle().


The documentation for this class was generated from the following files:
Generated on Tue May 21 03:35:11 2002 for Archimedes by doxygen1.2.15