Final Changes before submission

This commit is contained in:
IDunnoDev
2025-07-04 17:32:39 +01:00
committed by iDunnoDev
parent eeea920e45
commit ab6deb3cc2
7 changed files with 721 additions and 370 deletions

View File

@ -207,14 +207,19 @@ float Vertex::GetZOriginal() const
return _zOriginal;
}
float Vertex::GetUOverZ() const
void Vertex::SetZOriginal(const float value)
{
return _uOverZ;
_zOriginal = value;
}
float Vertex::GetUOverZ() const
{
return _uOverZ;
}
void Vertex::SetUOverZ(const float value)
{
_uOverZ = value / _zOriginal;
_uOverZ = value;
}
float Vertex::GetVOverZ() const
@ -224,20 +229,27 @@ float Vertex::GetVOverZ() const
void Vertex::SetVOverZ(const float value)
{
_vOverZ = value / _zOriginal;
_vOverZ = value;
}
float Vertex::GetZRecip() const
{
return _zRecip;
return _zRecip;
}
void Vertex::UVCorrect(float u, float v)
void Vertex::SetZRecip(const float value)
{
_zOriginal = _w;
_zRecip = 1 / _zOriginal;
SetUOverZ(u);
SetVOverZ(v);
_zRecip = value;
}
void Vertex::UVCorrect(float u, float v, bool calcZRecip)
{
SetUOverZ(u / _zOriginal);
SetVOverZ(v / _zOriginal);
if (calcZRecip)
{
SetZRecip(1 / _zOriginal);
}
}
int Vertex::GetXInt(bool forceRoundUp) const
@ -289,7 +301,8 @@ int Vertex::GetWInt(bool forceRoundUp) const
}
void Vertex::Dehomogenize()
{
{
_zOriginal = _w;
_x = _x / _w;
_y = _y / _w;
_z = _z / _w;