Documentation for module: Graphics

Former-commit-id: 5e3ee3c61779fbdd1a083117f537a45e1bad820b
This commit is contained in:
Gawaboumga
2016-05-30 14:21:36 +02:00
parent 6400ba2e28
commit 96b958d655
94 changed files with 4858 additions and 504 deletions

View File

@@ -7,8 +7,24 @@
namespace Nz
{
/*!
* \ingroup graphics
* \class Nz::Renderable
* \brief Graphics class that represents a renderable element for our scene
*
* \remark This class is abstract
*/
Renderable::~Renderable() = default;
/*!
* \brief Culls the model if not in the frustum
* \return true If renderable is in the frustum
*
* \param frustum Symbolizing the field of view
* \param transformMatrix Matrix transformation for our object
*/
bool Renderable::Cull(const Frustumf& frustum, const Matrix4f& transformMatrix) const
{
NazaraUnused(transformMatrix);
@@ -16,6 +32,11 @@ namespace Nz
return frustum.Contains(m_boundingVolume);
}
/*!
* \brief Gets the bounding volume
* \return Bounding volume of the renderable element
*/
const BoundingVolumef& Renderable::GetBoundingVolume() const
{
EnsureBoundingVolumeUpdated();
@@ -23,6 +44,12 @@ namespace Nz
return m_boundingVolume;
}
/*!
* \brief Updates the bounding volume by a matrix
*
* \param transformMatrix Matrix transformation for our bounding volume
*/
void Renderable::UpdateBoundingVolume(const Matrix4f& transformMatrix)
{
m_boundingVolume.Update(transformMatrix);