Renamed Corner enum to BoxCorner
Added RectCorner and Rect::GetCorner method Former-commit-id: dc99823ceb17f6e91cdf12779c982ab7e024ec24
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user