Documentation for module 'NDK'
Former-commit-id: a6c2075cfbfd0eccf2b77def71c0d42684bed590 [formerly 36ece2bc6a148bde6cacf45084821d20edcd115e] [formerly 4a6988792ec026e65be6850c46dfe8ddda92a885 [formerly fd3f4f975de5c427f3adc98b220446fd255be396]] Former-commit-id: c87fdc9483202842267c60eff3d619f0df2963bf [formerly ee35202f1b2df7ca20da5b6d8b13147f2b92c933] Former-commit-id: dad5de1b00bb4413f7aa191ca06b7d43b659f32a
This commit is contained in:
@@ -9,7 +9,23 @@
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
void GraphicsComponent::InvalidateRenderableData(const Nz::InstancedRenderable* renderable, Nz::UInt32 flags, std::size_t index)
|
||||
/*!
|
||||
* \ingroup NDK
|
||||
* \class Ndk::GraphicsComponent
|
||||
* \brief NDK class that represents the component for graphics
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Invalidates the data for renderable
|
||||
*
|
||||
* \param renderable Renderable to invalidate
|
||||
* \param flags Flags for the instance
|
||||
* \param index Index of the renderable to invalidate
|
||||
*
|
||||
* \remark Produces a NazaraAssert if index is out of bound
|
||||
*/
|
||||
|
||||
void GraphicsComponent::InvalidateRenderableData(const Nz::InstancedRenderable* renderable , Nz::UInt32 flags, std::size_t index)
|
||||
{
|
||||
NazaraAssert(index < m_renderables.size(), "Invalid renderable index");
|
||||
NazaraUnused(renderable);
|
||||
@@ -19,6 +35,10 @@ namespace Ndk
|
||||
r.renderable->InvalidateData(&r.data, flags);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operation to perform when component is attached to an entity
|
||||
*/
|
||||
|
||||
void GraphicsComponent::OnAttached()
|
||||
{
|
||||
if (m_entity->HasComponent<NodeComponent>())
|
||||
@@ -27,6 +47,12 @@ namespace Ndk
|
||||
InvalidateTransformMatrix();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operation to perform when component is attached to this component
|
||||
*
|
||||
* \param component Component being attached
|
||||
*/
|
||||
|
||||
void GraphicsComponent::OnComponentAttached(BaseComponent& component)
|
||||
{
|
||||
if (IsComponent<NodeComponent>(component))
|
||||
@@ -38,6 +64,12 @@ namespace Ndk
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operation to perform when component is detached from this component
|
||||
*
|
||||
* \param component Component being detached
|
||||
*/
|
||||
|
||||
void GraphicsComponent::OnComponentDetached(BaseComponent& component)
|
||||
{
|
||||
if (IsComponent<NodeComponent>(component))
|
||||
@@ -48,6 +80,10 @@ namespace Ndk
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operation to perform when component is detached from an entity
|
||||
*/
|
||||
|
||||
void GraphicsComponent::OnDetached()
|
||||
{
|
||||
m_nodeInvalidationSlot.Disconnect();
|
||||
@@ -55,6 +91,12 @@ namespace Ndk
|
||||
InvalidateTransformMatrix();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operation to perform when the node is invalidated
|
||||
*
|
||||
* \param node Pointer to the node
|
||||
*/
|
||||
|
||||
void GraphicsComponent::OnNodeInvalidated(const Nz::Node* node)
|
||||
{
|
||||
NazaraUnused(node);
|
||||
@@ -63,6 +105,10 @@ namespace Ndk
|
||||
InvalidateTransformMatrix();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Updates the bounding volume
|
||||
*/
|
||||
|
||||
void GraphicsComponent::UpdateBoundingVolume() const
|
||||
{
|
||||
EnsureTransformMatrixUpdate();
|
||||
@@ -75,6 +121,12 @@ namespace Ndk
|
||||
m_boundingVolumeUpdated = true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Updates the transform matrix of the renderable
|
||||
*
|
||||
* \remark Produces a NazaraAssert if entity is invalid or has no NodeComponent
|
||||
*/
|
||||
|
||||
void GraphicsComponent::UpdateTransformMatrix() const
|
||||
{
|
||||
NazaraAssert(m_entity && m_entity->HasComponent<NodeComponent>(), "GraphicsComponent requires NodeComponent");
|
||||
|
||||
Reference in New Issue
Block a user