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
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
#include "Vector3D.h"
|
||||
#include "SharedTools.h"
|
||||
#include "windows.h"
|
||||
|
||||
using namespace SharedTools;
|
||||
|
||||
class Polygon3D
|
||||
{
|
||||
@ -16,6 +20,10 @@ public:
|
||||
|
||||
void SetNormal(const Vector3D& normal);
|
||||
Vector3D GetNormal() const;
|
||||
|
||||
void SetColor(int red, int green, int blue);
|
||||
void SetColor(const COLORREF color);
|
||||
COLORREF GetColor() const;
|
||||
|
||||
void SetDepth(float depth);
|
||||
float GetDepth() const;
|
||||
@ -29,6 +37,7 @@ private:
|
||||
Vector3D _normal;
|
||||
float _depth = 0.0f;
|
||||
bool _culled = false;
|
||||
COLORREF _color;
|
||||
|
||||
void Copy(const Polygon3D& other);
|
||||
};
|
||||
|
Reference in New Issue
Block a user