Sdk/GraphicsComponent: Add Clear method
Former-commit-id: dfa7a9813fe3e15212c16103763cb185e1d8df30 [formerly ead9d5788df957502aa22c526fa272f797348599] Former-commit-id: 74ce601066d7ab1d28609d6a859495e4626c7a18
This commit is contained in:
@@ -47,12 +47,20 @@ namespace Ndk
|
||||
InvalidateBoundingVolume();
|
||||
}
|
||||
|
||||
inline void GraphicsComponent::Detach(Nz::InstancedRenderableRef renderable)
|
||||
inline void GraphicsComponent::Clear()
|
||||
{
|
||||
m_renderables.clear();
|
||||
|
||||
InvalidateBoundingVolume();
|
||||
}
|
||||
|
||||
inline void GraphicsComponent::Detach(const Nz::InstancedRenderableRef& renderable)
|
||||
{
|
||||
for (auto it = m_renderables.begin(); it != m_renderables.end(); ++it)
|
||||
{
|
||||
if (it->renderable == renderable)
|
||||
{
|
||||
InvalidateBoundingVolume();
|
||||
m_renderables.erase(it);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user