Files
Graphics-Rasterizer/Light.h
IDunnoDev cdb940f6aa Week10 [30/11] - [06/12]
Added active Variable to the Lights Classes
Added updated MD2Loader Class
Added Model Filename and Texture File Name to the Model Class
Added Active Flag to the Model Class
Added DrawMode to the Model Class
Added Texture and UV Variables to the Model Class
Added UV Coordinates to the Polygon3D Class
Added DrawString method to the Rasterizer to write text to the screen space
Added Interpolate and Lerp Methods to the Rasterizer
Added Select statement for drawing a current models draw mode
Added DrawTextured Method to the Rasterizer Class
Added UVCoord Class
Added Texture Class
Added = operator to the Vector3D Class
Added UVCoord to the Vertex Class
Moved Models and Texture Files into a subfolder
Fixed issue with textures not loading properly because of the vector address problem
2021-12-11 20:31:39 +00:00

48 lines
1.1 KiB
C++

#pragma once
#include "Vector3D.h"
#include "Vertex.h"
#include "SharedTools.h"
#include "Model.h"
#include "Polygon3D.h"
#include "windows.h"
class Light
{
public:
Light();
Light(int red, int green, int blue);
Light(const Light& other);
~Light();
void SetLightIntensity(int red, int green, int blue);
void SetLightIntensity(ColRef color, int value);
void SetRedLightIntensity(int value);
void SetGreenLightIntensity(int value);
void SetBlueLightIntensity(int value);
int GetLightIntensity(ColRef color) const;
int GetRedLightIntensity() const;
int GetGreenLightIntensity() const;
int GetBlueLightIntensity() const;
bool GetLightActive() const;
void SetLightActive(bool active);
void ToggleLightActive();
virtual COLORREF CalculateLight(const Model& currentModel, const Polygon3D& currentPolygon, COLORREF colorIn) = 0;
virtual COLORREF CalculateLight(const Model& currentModel, const Vertex& currentVertex, COLORREF colorIn) = 0;
Light& operator= (const Light& rhs);
protected:
int _liRed;
int _liGreen;
int _liBlue;
bool _active;
void Copy(const Light& other);
};