
Added Light Base Class Added AmbientLight, DirectionalLight and PointLight Classes Added Constructor to the Camera Class Added Light CoEff's to the Model Class Added Color Variables to Polygon3D Class Added Light Vector to hold the lights in the Rasteriser Added Camera Vector to hold multiple Cameras and Methods to set which is the current Added Lighting to the Rasterizer Added DrawSolidFlat method to the Rastorizer Added Bounds Check to the SharedTools for Int and Float values Added Color Enum Class Added Normalize Method to the Vector3D Class Renamed the TransformTools to SharedTools since adding more non transform methods to it
41 lines
881 B
C++
41 lines
881 B
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;
|
|
|
|
virtual COLORREF CalculateLight(const Model& currentModel, const Polygon3D& currentPolygon, COLORREF colorIn) = 0;
|
|
|
|
Light& operator= (const Light& rhs);
|
|
|
|
protected:
|
|
int _liRed;
|
|
int _liGreen;
|
|
int _liBlue;
|
|
|
|
void Copy(const Light& other);
|
|
};
|
|
|