Files
NazaraEngine/include/Nazara/Graphics/InstancedRenderable.inl
Lynix df8da275c4 Switch from Nz prefix to namespace Nz
What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
2015-09-25 19:20:05 +02:00

44 lines
1.1 KiB
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
namespace Nz
{
inline InstancedRenderable::InstancedRenderable(const InstancedRenderable& renderable) :
RefCounted(),
m_boundingVolume(renderable.m_boundingVolume),
m_boundingVolumeUpdated(renderable.m_boundingVolumeUpdated)
{
}
inline void InstancedRenderable::EnsureBoundingVolumeUpdated() const
{
if (!m_boundingVolumeUpdated)
UpdateBoundingVolume();
}
inline void InstancedRenderable::InvalidateBoundingVolume()
{
m_boundingVolumeUpdated = false;
}
inline void InstancedRenderable::InvalidateInstanceData(UInt32 flags)
{
OnInstancedRenderableInvalidateData(this, flags);
}
inline InstancedRenderable& InstancedRenderable::operator=(const InstancedRenderable& renderable)
{
m_boundingVolume = renderable.m_boundingVolume;
m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated;
return *this;
}
inline void InstancedRenderable::UpdateBoundingVolume() const
{
MakeBoundingVolume();
m_boundingVolumeUpdated = true;
}
}