
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
27 lines
717 B
C++
27 lines
717 B
C++
#pragma once
|
|
#include "Light.h"
|
|
|
|
class DirectionalLight :
|
|
public Light
|
|
{
|
|
public:
|
|
DirectionalLight(Vector3D lightDirection);
|
|
DirectionalLight(Vector3D lightDirection, int red, int green, int blue);
|
|
DirectionalLight(const DirectionalLight& other);
|
|
|
|
void SetLightDirection(float x, float y, float z);
|
|
void SetLightDirection(Vector3D direction);
|
|
Vector3D GetLightDirection() const;
|
|
|
|
COLORREF CalculateLight(const Model& currentModel, const Polygon3D& currentPolygon, COLORREF colorIn);
|
|
|
|
DirectionalLight& operator= (const DirectionalLight& rhs);
|
|
|
|
private:
|
|
Vector3D _lightDirection;
|
|
Vector3D _normalizedLightDirection;
|
|
|
|
void Copy(const DirectionalLight& other);
|
|
};
|
|
|