Files
Graphics-Rasterizer/PointLight.h
IDunnoDev f5fd5b6756 Week8 [16/11] - [19/11]
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
2021-12-11 17:05:43 +00:00

39 lines
1.0 KiB
C++

#pragma once
#include "Light.h"
class PointLight :
public Light
{
public:
PointLight(Vertex lightPosition);
PointLight(Vertex lightPosition, float a, float b, float c);
PointLight(Vertex lightPosition, float a, float b, float c, int red, int green, int blue);
PointLight(const PointLight& other);
void SetLightPosition(float x, float y, float z);
void SetLightPosition(Vertex Position);
Vertex GetLightPosition() const;
void SetAttenuation(float a, float b, float c);
void SetAttenuationA(float value);
void SetAttenuationB(float value);
void SetAttenuationC(float value);
float GetAttenuationA();
float GetAttenuationB();
float GetAttenuationC();
COLORREF CalculateLight(const Model& currentModel, const Polygon3D& currentPolygon, COLORREF colorIn);
PointLight& operator= (const PointLight& rhs);
private:
Vertex _lightPosition;
float _attenuationA;
float _attenuationB;
float _attenuationC;
void Copy(const PointLight& other);
};