Renamed Corner enum to BoxCorner

Added RectCorner and Rect::GetCorner method


Former-commit-id: dc99823ceb17f6e91cdf12779c982ab7e024ec24
This commit is contained in:
Lynix
2015-01-03 22:31:25 +01:00
parent 4e9bec804a
commit 7c47a93a72
11 changed files with 149 additions and 115 deletions

View File

@@ -117,32 +117,32 @@ NzBox<T>& NzBox<T>::ExtendTo(const NzVector3<T>& point)
}
template<typename T>
NzVector3<T> NzBox<T>::GetCorner(nzCorner corner) const
NzVector3<T> NzBox<T>::GetCorner(nzBoxCorner corner) const
{
switch (corner)
{
case nzCorner_FarLeftBottom:
case nzBoxCorner_FarLeftBottom:
return NzVector3<T>(x, y, z);
case nzCorner_FarLeftTop:
case nzBoxCorner_FarLeftTop:
return NzVector3<T>(x, y + height, z);
case nzCorner_FarRightBottom:
case nzBoxCorner_FarRightBottom:
return NzVector3<T>(x + width, y, z);
case nzCorner_FarRightTop:
case nzBoxCorner_FarRightTop:
return NzVector3<T>(x + width, y + height, z);
case nzCorner_NearLeftBottom:
case nzBoxCorner_NearLeftBottom:
return NzVector3<T>(x, y, z + depth);
case nzCorner_NearLeftTop:
case nzBoxCorner_NearLeftTop:
return NzVector3<T>(x, y + height, z + depth);
case nzCorner_NearRightBottom:
case nzBoxCorner_NearRightBottom:
return NzVector3<T>(x + width, y, z + depth);
case nzCorner_NearRightTop:
case nzBoxCorner_NearRightTop:
return NzVector3<T>(x + width, y + height, z + depth);
}