/// \brief /// Calculates the absolute bounding box for this instance /// /// \param destBBox /// Destination box /// inline void GetBoundingBox(hkvAlignedBBox &destBBox) const { m_spModel->EnsureLoaded(); VASSERT(m_spModel->m_LocalBBox.isValid()); destBBox.setInvalid(); //destBBox.Inflate(m_spModel->m_LocalBBox,m_Orientation,m_vPosition); { hkvAlignedBBox temp = m_spModel->m_LocalBBox; hkvMat4 mTransform (m_Orientation, m_vPosition); temp.transformFromOrigin (mTransform); destBBox.expandToInclude (temp); } }
inline void GetRenderBoundingBox(hkvAlignedBBox &destBBox, const hkvVec3& vOffset) const { VASSERT(m_spModel->m_LocalBBox.isValid()); destBBox.setInvalid(); //destBBox.Inflate(m_spModel->m_LocalBBox,m_Orientation,m_vPosition); { hkvAlignedBBox temp = m_spModel->m_LocalBBox; hkvMat4 mTransform (m_Orientation, m_vPosition); temp.transformFromOrigin (mTransform); destBBox.expandToInclude (temp); } destBBox.m_vMin += vOffset; destBBox.m_vMax += vOffset; }