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
This commit is contained in:
IDunnoDev
2021-12-11 20:31:39 +00:00
committed by iDunnoDev
parent df3c9fac81
commit cdb940f6aa
32 changed files with 1136 additions and 243 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include "Vector3D.h"
#include "UVCoord.h"
#include "windows.h"
class Vertex
@ -32,12 +33,18 @@ public:
const COLORREF GetColor() const;
int GetR() const;
void SetR(const int r);
int GetG() const;
void SetG(const int g);
int GetB() const;
void SetB(const int b);
void SetColor(const int r, const int g, const int b);
void SetColor(const COLORREF colorIn);
// Accessor Methods for returning the private x, y, z and w values as integeres instead of floats
int GetUVIndex() const;
void SetUVIndex(const int index);
// Accessors for returning the private x, y, z and w values as integeres instead of floats
// the ceil function to round the number up by defaults but using providing a false param will
// use the floor function instead to round the number down
int GetXInt(bool forceRoundUp = false) const;
@ -61,6 +68,8 @@ private:
float _z;
float _w;
float _zOriginal;
int _contributeCount;
Vector3D _normal;
@ -68,6 +77,8 @@ private:
int _g;
int _b;
int _uvIndex;
void Copy(const Vertex& other);
};