#include <Camera.hh>

Used for creating rays shooting from camera. Describes camera using Top, Direction, Position vectors and Field of View.
Definition at line 32 of file Camera.hh.
Public Member Functions | |
| Camera (const Math::Vector &Pos=Math::Vector(0.0, 1.0,-1.0), const Math::Vector &Dir=Math::Vector(0.0, 0.0, 1.0), Double FOV=DegreeToFOV(45.0), Bool AutoTop=true, const Math::Vector &Top=Math::Vector(0.0, 1.0, 0.0)) | |
| View | CreateView (Int XRes, Int YRes) const |
Static Public Member Functions | |
| static Double | DegreeToFOV (Double Degree) |
Protected Attributes | |
| Double | FOV |
| Math::Vector | Pos |
| Math::Vector | Dir |
| Math::Vector | Top |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Camera &C) |
Classes | |
| class | View |
| Generates rays shooting from camera. More... | |
| World::Camera::Camera | ( | const Math::Vector & | Pos = Math::Vector(0.0, 1.0, -1.0), |
|
| const Math::Vector & | Dir = Math::Vector(0.0, 0.0, 1.0), |
|||
| Double | FOV = DegreeToFOV(45.0), |
|||
| Bool | AutoTop = true, |
|||
| const Math::Vector & | Top = Math::Vector(0.0, 1.0, 0.0) | |||
| ) |
Initializes camera with default values
Function can calculate the Top vector so that camera "horizon line" is parallel to scene horizon.
| Pos | Camera position vector | |
| Dir | Direction of the camera view | |
| FOV | Camera "Field of View" in radians | |
| AutoTop | should top vector be automatically calculated? | |
| Top | if AutoTop = false, we use this vector |
Definition at line 22 of file Camera.cc.
References Math::Abs(), Math::Tuple< T, DoCropping, Count >::Normalize(), and Math::Vector::Set().

| static Double World::Camera::DegreeToFOV | ( | Double | Degree | ) | [inline, static] |
Utility function to convert degrees into radians
Definition at line 87 of file Camera.hh.
Referenced by World::Scene::ParseCamera().

| Camera::View World::Camera::CreateView | ( | Int | XRes, | |
| Int | YRes | |||
| ) | const |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Camera & | C | |||
| ) | [friend] |
Double World::Camera::FOV [protected] |
Camera Field of View in radians
Definition at line 35 of file Camera.hh.
Referenced by CreateView(), and World::operator<<().
Math::Vector World::Camera::Pos [protected] |
Position at which camera is located
Definition at line 38 of file Camera.hh.
Referenced by CreateView(), and World::operator<<().
Math::Vector World::Camera::Dir [protected] |
Direction the camera is pointing.
Definition at line 41 of file Camera.hh.
Referenced by CreateView(), and World::operator<<().
Math::Vector World::Camera::Top [protected] |
Vector defining 'top' direction of camera; can be calculated automatically.
Definition at line 46 of file Camera.hh.
Referenced by CreateView(), and World::operator<<().
1.5.5