diff --git a/SDK/include/NDK/Components/GraphicsComponent.hpp b/SDK/include/NDK/Components/GraphicsComponent.hpp index 0b422c52a..f7cc20c5c 100644 --- a/SDK/include/NDK/Components/GraphicsComponent.hpp +++ b/SDK/include/NDK/Components/GraphicsComponent.hpp @@ -42,6 +42,8 @@ namespace Ndk inline void Detach(const Nz::InstancedRenderable* renderable); + inline bool DoesRequireRealTimeReflections() const; + inline void EnsureBoundingVolumeUpdate() const; inline void EnsureTransformMatrixUpdate() const; diff --git a/SDK/include/NDK/Components/GraphicsComponent.inl b/SDK/include/NDK/Components/GraphicsComponent.inl index 81d9b121f..f6bc01f2e 100644 --- a/SDK/include/NDK/Components/GraphicsComponent.inl +++ b/SDK/include/NDK/Components/GraphicsComponent.inl @@ -84,6 +84,18 @@ namespace Ndk } } + /*! + * \brief Checks if this graphics component requires real-time reflections to be generated + * + * If any of the materials attached to a GraphicsComponent (via the attached instanced renderable) needs real-time reflections, this function will return true. + * + * \return True if real-time reflections needs to be generated or false + */ + inline bool GraphicsComponent::DoesRequireRealTimeReflections() const + { + return m_reflectiveMaterialCount != 0; + } + /*! * \brief Ensures the bounding volume is up to date */