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:
33
Vertex.cpp
33
Vertex.cpp
@ -140,16 +140,31 @@ int Vertex::GetR() const
|
||||
return _r;
|
||||
}
|
||||
|
||||
void Vertex::SetR(const int r)
|
||||
{
|
||||
_r = r;
|
||||
}
|
||||
|
||||
int Vertex::GetG() const
|
||||
{
|
||||
return _g;
|
||||
}
|
||||
|
||||
void Vertex::SetG(const int g)
|
||||
{
|
||||
_g = g;
|
||||
}
|
||||
|
||||
int Vertex::GetB() const
|
||||
{
|
||||
return _b;
|
||||
}
|
||||
|
||||
void Vertex::SetB(const int b)
|
||||
{
|
||||
_b = b;
|
||||
}
|
||||
|
||||
void Vertex::SetColor(int r, int g, int b)
|
||||
{
|
||||
_r = r;
|
||||
@ -162,6 +177,16 @@ void Vertex::SetColor(const COLORREF colorIn)
|
||||
SetColor((int)GetRValue(colorIn), (int)GetGValue(colorIn), (int)GetBValue(colorIn));
|
||||
}
|
||||
|
||||
int Vertex::GetUVIndex() const
|
||||
{
|
||||
return _uvIndex;
|
||||
}
|
||||
|
||||
void Vertex::SetUVIndex(const int index)
|
||||
{
|
||||
_uvIndex = index;
|
||||
}
|
||||
|
||||
int Vertex::GetXInt(bool forceRoundUp) const
|
||||
{
|
||||
if (forceRoundUp)
|
||||
@ -261,7 +286,11 @@ void Vertex::Copy(const Vertex& other)
|
||||
_w = other.GetW();
|
||||
|
||||
_contributeCount = other.GetContributeCount();
|
||||
SetNormal(other.GetNormal());
|
||||
_normal = other.GetNormal();
|
||||
|
||||
SetColor(other.GetR(), other.GetG(), other.GetB());
|
||||
_r = other.GetR();
|
||||
_g = other.GetG();
|
||||
_b = other.GetB();
|
||||
|
||||
_uvIndex = other.GetUVIndex();
|
||||
}
|
||||
|
Reference in New Issue
Block a user