#include <icamera.h>
Inheritance diagram for toxic::ICamera:

Public Member Functions | |
| ICamera (const sheep::Matrix4 &m, sheep::Real hfov, sheep::Real aspect_ratio) | |
| virtual | ~ICamera () |
| virtual void | Finalize (const Context &context, const Scene *scene) |
| virtual Ray | ComputeRay (const Context &context, const sheep::Point2 &p) const=0 |
| virtual sheep::Point2 | Project (const sheep::Point3 &p) const=0 |
| Projects a point in the scene to the image plane. | |
Protected Attributes | |
| sheep::Point3 | m_location |
| Location of the camera, expressed in world space. | |
| sheep::Vector3 | m_ex |
| sheep::Vector3 | m_ey |
| sheep::Vector3 | m_ez |
| Basis vectors, expressed in world space. m_ex is scaled by the aspect ratio. | |
| sheep::Vector3 | m_u |
| sheep::Vector3 | m_w |
| m_u = m_ex * m_aspect_ratio, m_w = m_ez * (-m_focal_length). | |
| sheep::Real | m_hfov |
| User defined horizontal field of view, expressed in radians. | |
| sheep::Real | m_aspect_ratio |
| User defined aspect ratio. | |
| sheep::Real | m_focal_length |
| Lens focal length (computed from m_hfov and m_aspect_ratio values). | |
Normalized Device Coordinates (NDC) are normalized pixel coordinates so that x and y both run from -0.5 to +0.5 across the entire (uncropped) image, with (-0.5, -0.5) being at the lower left corner of the image plane and (0.5, 0.5) being at the upper right corner, regardless of the image resolution.
Definition at line 47 of file icamera.h.
|
||||||||||||||||
|
'm' is the object space to world space transformation matrix. 'hfov' is the horizontal field of view, expressed in radians. Definition at line 31 of file icamera.cpp. References sheep::PI. |
|
|
|
|
||||||||||||
|
Returns a ray whose origin is at camera location, and which is directed toward the point 'p'. 'p' is a point on the film plane. It is expressed in NDC. The returned ray is expressed in world space. The direction of the returned ray IS unit-length. Implemented in toxic::PinholeCamera, and toxic::ThinLensCamera. Referenced by toxic::Renderer::render_pixel_supersampling(), toxic::Renderer::render_pixel_whitted(), and toxic::Renderer::whitted_recursive_sampling(). |
|
||||||||||||
|
This method must be called only once, after the camera is completely configured, and before it is used for the first time. Reimplemented in toxic::ThinLensCamera. |
|
|
Projects a point in the scene to the image plane.
Implemented in toxic::PinholeCamera, and toxic::ThinLensCamera. Referenced by line(). |
|
|
User defined aspect ratio.
|
|
|
|
|
|
|
|
|
Basis vectors, expressed in world space. m_ex is scaled by the aspect ratio.
|
|
|
Lens focal length (computed from m_hfov and m_aspect_ratio values).
|
|
|
User defined horizontal field of view, expressed in radians.
|
|
|
Location of the camera, expressed in world space.
|
|
|
|
|
|
m_u = m_ex * m_aspect_ratio, m_w = m_ez * (-m_focal_length).
|
1.3.6