Code: Select all
//! Transforms a axis aligned bounding box
template <class T>
inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
{
#if defined ( USE_MATRIX_TEST )
if (isIdentity())
return;
#endif
transformVect(box.MinEdge);
transformVect(box.MaxEdge);
box.repair();
}
Now make a box from -1,-1 to 1,1 and rotate by 45 degrees clockwise.
Your MaxEdge will be (1.4.....,0) and MinEdge=-MaxEdge, where in-fact, your box should be (1.4....,1.4...) from (-1.4....,-1.4.....)
The problem is not with the fact that its not exact, the problem is that its not conservative (the transformed inexact box doesn't contain the exact box), so therefore useless!