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
Color Class Reference

#include <Color.hpp>

Public Member Functions

 Color ()
 
 Color (int r_, int g_, int b_)
 
std::string toPPM () const
 

Public Attributes

int r
 
int g
 
int b
 

Detailed Description

Definition at line 11 of file Color.hpp.

Constructor & Destructor Documentation

◆ Color() [1/2]

Color::Color ( )
inline

Definition at line 14 of file Color.hpp.

14: r(0), g(0), b(0) {}
int r
Definition Color.hpp:13
int g
Definition Color.hpp:13
int b
Definition Color.hpp:13

References b, g, and r.

◆ Color() [2/2]

Color::Color ( int r_,
int g_,
int b_ )
inline

Definition at line 15 of file Color.hpp.

15: r(r_), g(g_), b(b_) {}

References b, g, and r.

Member Function Documentation

◆ toPPM()

std::string Color::toPPM ( ) const
inline

Definition at line 17 of file Color.hpp.

17 {
18 return std::to_string(r) + " " + std::to_string(g) + " " + std::to_string(b);
19 }

References b, g, and r.

Member Data Documentation

◆ b

int Color::b

Definition at line 13 of file Color.hpp.

◆ g

int Color::g

Definition at line 13 of file Color.hpp.

◆ r

int Color::r

Definition at line 13 of file Color.hpp.


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