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