
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
58 lines
1.1 KiB
C++
58 lines
1.1 KiB
C++
#pragma once
|
|
#include "Vector3D.h"
|
|
#include "windows.h"
|
|
|
|
class Polygon3D
|
|
{
|
|
public:
|
|
Polygon3D();
|
|
Polygon3D(int index0, int index1, int index2, int uvIndex0, int uvIndex1, int uvIndex2);
|
|
Polygon3D(const Polygon3D& other);
|
|
|
|
~Polygon3D();
|
|
|
|
size_t GetPolygonVertexCount() const;
|
|
size_t GetPolygonUVCount() const;
|
|
|
|
int GetIndex(int index) const;
|
|
int GetUVIndex(int index) const;
|
|
|
|
void SetNormal(const Vector3D& normal);
|
|
const Vector3D& GetNormal() const;
|
|
void NormalizeNormal();
|
|
|
|
void SetColor(int red, int green, int blue);
|
|
void SetColor(const COLORREF color);
|
|
|
|
int GetR() const;
|
|
void SetR(const int r);
|
|
int GetG() const;
|
|
void SetG(const int g);
|
|
int GetB() const;
|
|
void SetB(const int b);
|
|
|
|
COLORREF GetColor() const;
|
|
|
|
void SetDepth(float depth);
|
|
float GetDepth() const;
|
|
void SetCulled(bool culled);
|
|
bool GetCulled() const;
|
|
|
|
Polygon3D& operator= (const Polygon3D& rhs);
|
|
|
|
private:
|
|
int _indices[3];
|
|
int _uvIndices[3];
|
|
|
|
Vector3D _normal;
|
|
float _depth;
|
|
bool _culled;
|
|
|
|
int _r;
|
|
int _g;
|
|
int _b;
|
|
|
|
void Copy(const Polygon3D& other);
|
|
};
|
|
|