Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

toxic::PinholeCamera Class Reference

#include <pinholecamera.h>

Inheritance diagram for toxic::PinholeCamera:

toxic::ICamera toxic::Basis List of all members.

Public Member Functions

 PinholeCamera (const sheep::Matrix4 &m, sheep::Real hfov, sheep::Real aspect_ratio)
virtual Ray ComputeRay (const Context &context, const sheep::Point2 &p) const
virtual sheep::Point2 Project (const sheep::Point3 &p) const
 Projects a point in the scene to the image plane.


Constructor & Destructor Documentation

PinholeCamera::PinholeCamera const sheep::Matrix4 m,
sheep::Real  hfov,
sheep::Real  aspect_ratio
 

'm' is the object space to world space transformation matrix. 'hfov' is the horizontal field of view, expressed in radians.

Definition at line 33 of file pinholecamera.cpp.


Member Function Documentation

Ray PinholeCamera::ComputeRay const Context context,
const sheep::Point2 p
const [virtual]
 

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.

Implements toxic::ICamera.

Definition at line 38 of file pinholecamera.cpp.

References sheep::Point2::m_x, sheep::Point2::m_y, and sheep::Vector3::Normalize().

Point2 PinholeCamera::Project const sheep::Point3 p  )  const [virtual]
 

Projects a point in the scene to the image plane.

Implements toxic::ICamera.

Definition at line 57 of file pinholecamera.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 11 01:31:57 2004 for toxic by doxygen 1.3.6