Final Changes before submission
This commit is contained in:
35
Vertex.cpp
35
Vertex.cpp
@ -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;
|
||||
|
Reference in New Issue
Block a user