Former-commit-id: 157536817615de91c7bea1920d706c356d858216
This commit is contained in:
Lynix
2016-03-30 18:39:08 +02:00
5 changed files with 90 additions and 0 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");