Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Camera Class Reference

#include <camera.h>

List of all members.

Public Types

enum  ProjectType { ORTHOGRAPHIC, PERSPECTIVE }
 different types of projections the camera supports


Public Member Functions

 Camera (ProjectType pt=PERSPECTIVE)
void set_radius (const double radius)
void set_elevation (const double elevation)
void set_azimuth (const double azimuth)
double get_radius () const
double get_elevation () const
double get_azimuth () const
Vec3 get_position () const
Vec3 get_right_vec () const
Vec3 get_up_vec () const
Vec3 get_forward_vec () const
void apply_projection ()
void apply_view ()

Protected Member Functions

void _update ()

Protected Attributes

double _radius
 distance of camera from origin

double _elevation
 vertical angle (phi in spherical coords)

double _azimuth
 horizontal angle (theta)

ProjectType _project_type
 orthographic or perspective

double _min_radius
double _max_radius
double _min_elevation
double _max_elevation
Vec3 _position
Vec3 _right_vec
Vec3 _up_vec
Vec3 _forward_vec

Friends

std::ostream & operator<< (std::ostream &os, const Camera &camera)


Detailed Description

A camera that always looks at the origin.

Note: not quite spherical coords, because phi is usually the angle from the vertical axis, whereas my equivalent "elevation" is the angle from the horizontal plane (basically, 90 - phi). Also, all the axes are different (for ex, y is up here, not z).


Member Function Documentation

void Camera::apply_projection  ) 
 

Apply the camera's viewport and projection transformations.

void Camera::apply_view  ) 
 

Apply the camera's modelview transformations.


The documentation for this class was generated from the following files:
Generated on Sat Mar 13 15:00:10 2004 by doxygen 1.3.5