Graphics/Model: Fix model not invalidating their bounding volume when their mesh AABB got updated
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// This file is part of the "Nazara Engine - Graphics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Graphics/Model.hpp>
|
||||
#include <memory>
|
||||
#include <Nazara/Graphics/Debug.hpp>
|
||||
|
||||
@@ -10,11 +11,21 @@ namespace Nz
|
||||
/*!
|
||||
* \brief Constructs a Model object by default
|
||||
*/
|
||||
Model::Model()
|
||||
inline Model::Model()
|
||||
{
|
||||
ResetMaterials(0);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Constructs a Model object by copying another
|
||||
*
|
||||
* \param model Model to copy
|
||||
*/
|
||||
inline Model::Model(const Model& model)
|
||||
{
|
||||
SetMesh(model.m_mesh);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Adds this model to a render queue, using user-specified transform matrix and render order
|
||||
*
|
||||
@@ -25,8 +36,8 @@ namespace Nz
|
||||
* \param renderOrder Specify the render queue layer to be used
|
||||
* \param scissorRect The Scissor rect to uses for rendering
|
||||
*/
|
||||
void Model::AddToRenderQueue(AbstractRenderQueue* renderQueue, const Matrix4f& transformMatrix, int renderOrder, const Recti& scissorRect) const
|
||||
{
|
||||
inline void Model::AddToRenderQueue(AbstractRenderQueue* renderQueue, const Matrix4f& transformMatrix, int renderOrder, const Recti& scissorRect) const
|
||||
{
|
||||
InstanceData instanceData(Nz::Matrix4f::Identity());
|
||||
instanceData.renderOrder = renderOrder;
|
||||
instanceData.transformMatrix = transformMatrix;
|
||||
|
||||
Reference in New Issue
Block a user