Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
Former-commit-id: ee4f1eff9643e0db60e79a0393471977bdf4e34a [formerly 73473b68feb75405164453f1890cd6f446e7824b] Former-commit-id: 5241e047f1d6b82527a9b8dbbe43e85bba3e7864
This commit is contained in:
commit
e9a9fb66c0
|
|
@ -23,6 +23,8 @@ namespace Ndk
|
|||
friend class RenderSystem;
|
||||
|
||||
public:
|
||||
using RenderableList = std::vector<Nz::InstancedRenderableRef>;
|
||||
|
||||
GraphicsComponent() = default;
|
||||
inline GraphicsComponent(const GraphicsComponent& graphicsComponent);
|
||||
~GraphicsComponent() = default;
|
||||
|
|
@ -38,6 +40,9 @@ namespace Ndk
|
|||
inline void EnsureBoundingVolumeUpdate() const;
|
||||
inline void EnsureTransformMatrixUpdate() const;
|
||||
|
||||
inline void GetAttachedRenderables(RenderableList* renderables) const;
|
||||
inline std::size_t GetAttachedRenderableCount() const;
|
||||
|
||||
inline const Nz::BoundingVolumef& GetBoundingVolume() const;
|
||||
|
||||
static ComponentIndex componentIndex;
|
||||
|
|
|
|||
|
|
@ -79,6 +79,20 @@ namespace Ndk
|
|||
UpdateTransformMatrix();
|
||||
}
|
||||
|
||||
inline void GraphicsComponent::GetAttachedRenderables(RenderableList* renderables) const
|
||||
{
|
||||
NazaraAssert(renderables, "Invalid renderable list");
|
||||
|
||||
renderables->reserve(renderables->size() + m_renderables.size());
|
||||
for (const Renderable& r : m_renderables)
|
||||
renderables->push_back(r.renderable);
|
||||
}
|
||||
|
||||
inline std::size_t GraphicsComponent::GetAttachedRenderableCount() const
|
||||
{
|
||||
return m_renderables.size();
|
||||
}
|
||||
|
||||
inline const Nz::BoundingVolumef& GraphicsComponent::GetBoundingVolume() const
|
||||
{
|
||||
EnsureBoundingVolumeUpdate();
|
||||
|
|
|
|||
Loading…
Reference in New Issue