Merge branch 'master' into application

Former-commit-id: 02d073ae79490d0ac38e56c90bf7d8ff57ae94c4
This commit is contained in:
Lynix
2016-03-29 21:47:56 +02:00
4 changed files with 44 additions and 2 deletions

View File

@@ -63,6 +63,18 @@ namespace Ndk
InvalidateTransformMatrix();
}
void GraphicsComponent::UpdateBoundingVolume() const
{
EnsureTransformMatrixUpdate();
m_boundingVolume.MakeNull();
for (const Renderable& r : m_renderables)
m_boundingVolume.ExtendTo(r.renderable->GetBoundingVolume());
m_boundingVolume.Update(m_transformMatrix);
m_boundingVolumeUpdated = true;
}
void GraphicsComponent::UpdateTransformMatrix() const
{
NazaraAssert(m_entity && m_entity->HasComponent<NodeComponent>(), "GraphicsComponent requires NodeComponent");