RayTracer 1.0
Ray tracing is a technique used to generate realistic digital images by simulating the inverse path of light. Our goal is to create a program able to generate an image from a file describing the scene.
 
Loading...
Searching...
No Matches
RayTracer::Camera Class Reference

#include <Camera.hpp>

Public Member Functions

 Camera ()
 
 Camera (const Math::Point3D &orig, const Rectangle3D &scr)
 
Ray ray (double u, double v) const
 

Public Attributes

Math::Point3D origin
 
Rectangle3D screen
 

Detailed Description

Definition at line 24 of file Camera.hpp.

Constructor & Destructor Documentation

◆ Camera() [1/2]

RayTracer::Camera::Camera ( )

Definition at line 20 of file Camera.cpp.

20 : origin(0, 0, 0), screen()
21{}
Math::Point3D origin
Definition Camera.hpp:26
Rectangle3D screen
Definition Camera.hpp:27

References origin, and screen.

◆ Camera() [2/2]

RayTracer::Camera::Camera ( const Math::Point3D & orig,
const Rectangle3D & scr )

Definition at line 23 of file Camera.cpp.

23 : origin(orig), screen(scr)
24{}

References origin, and screen.

Member Function Documentation

◆ ray()

RayTracer::Ray RayTracer::Camera::ray ( double u,
double v ) const

Definition at line 26 of file Camera.cpp.

27{
28 Math::Point3D P = screen.pointAt(u, v);
29 Math::Vector3D dir = P - origin;
30 return Ray(origin, dir);
31}

References origin, and screen.

Member Data Documentation

◆ origin

Math::Point3D RayTracer::Camera::origin

Definition at line 26 of file Camera.hpp.

◆ screen

Rectangle3D RayTracer::Camera::screen

Definition at line 27 of file Camera.hpp.


The documentation for this class was generated from the following files: