Math/OrientedBox: Add Update(Vector3) overload

Former-commit-id: 3d9e75d78d1242b4ee75500c2b9ef4e38b2a7453
This commit is contained in:
Lynix
2015-05-26 00:07:48 +02:00
parent f82446dda3
commit 41afb3a3a1
4 changed files with 19 additions and 0 deletions

View File

@@ -132,6 +132,13 @@ void NzOrientedBox<T>::Update(const NzMatrix4<T>& transformMatrix)
m_corners[i] = transformMatrix.Transform(localBox.GetCorner(static_cast<nzBoxCorner>(i)));
}
template<typename T>
void NzOrientedBox<T>::Update(const NzVector3<T>& translation)
{
for (unsigned int i = 0; i <= nzBoxCorner_Max; ++i)
m_corners[i] = localBox.GetCorner(static_cast<nzBoxCorner>(i)) + translation;
}
template<typename T>
NzOrientedBox<T>::operator NzVector3<T>*()
{