Added [Box|Rect]::Translate

Former-commit-id: 72b4cd351a7233df89709366fbe7ce59e4ba94e7
This commit is contained in:
Lynix
2013-06-09 15:50:56 +02:00
parent bb31a1666f
commit 7a7cfc3092
4 changed files with 22 additions and 0 deletions

View File

@@ -397,6 +397,16 @@ NzBox<T>& NzBox<T>::Transform(const NzMatrix4<T>& matrix, bool applyTranslation)
return Set(center - halfSize, center + halfSize);
}
template<typename T>
NzBox<T>& NzBox<T>::Translate(const NzVector3<T>& translation)
{
x += translation.x;
y += translation.y;
z += translation.z;
return *this;
}
template<typename T>
T& NzBox<T>::operator[](unsigned int i)
{