10 #include <ngl/Colour.h>
void writeFile(const char *_image_name)
Iterates over the pixel vector and writes into a file using basic output stream methods.
Core of my program, central unit that manages all the other classes almost.
std::ofstream m_file
File output stream, in charge of writing the pixels into a file.
~Film()
Destructor for the Film.
struct Pixel Pixel
Pixel data structure that will be used to hold the image units.
void setDimensions(int _w, int _h)
Sets the dimensions of the Film.
std::vector< Pixel > m_pixels
Vector of pixels. The index of the pixel corresponds to this equation: i = height * y + x...
Holds all the operations regarding to input/output of colour information.
int m_width
Width of the Film's image.
void writePixel(ngl::Colour _colour)
Will create a pixel and push it to the pixel vector.
int m_height
Height of the Film's image.
Pixel data structure that will be used to hold the image units.