Components/GraphicsComponent: Add DoesRequireRealTimeReflections method

This commit is contained in:
Lynix 2017-03-29 18:58:41 +02:00
parent 6851428c3c
commit 5702e5202c
2 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -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
*/