Graphics: Separate Renderable and make Light a Renderable (LightComponent)
Former-commit-id: 6177d473f27ef493ba77417fc14461cb08b6f9e1
This commit is contained in:
39
include/Nazara/Graphics/InstancedRenderable.inl
Normal file
39
include/Nazara/Graphics/InstancedRenderable.inl
Normal file
@@ -0,0 +1,39 @@
|
||||
// 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
|
||||
|
||||
inline NzInstancedRenderable::NzInstancedRenderable(const NzInstancedRenderable& renderable) :
|
||||
m_boundingVolume(renderable.m_boundingVolume),
|
||||
m_boundingVolumeUpdated(renderable.m_boundingVolumeUpdated)
|
||||
{
|
||||
}
|
||||
|
||||
inline void NzInstancedRenderable::EnsureBoundingVolumeUpdated() const
|
||||
{
|
||||
if (!m_boundingVolumeUpdated)
|
||||
UpdateBoundingVolume();
|
||||
}
|
||||
|
||||
inline void NzInstancedRenderable::InvalidateBoundingVolume()
|
||||
{
|
||||
m_boundingVolumeUpdated = false;
|
||||
}
|
||||
|
||||
inline void NzInstancedRenderable::InvalidateInstanceData(nzUInt32 flags)
|
||||
{
|
||||
OnInstancedRenderableInvalidateData(this, flags);
|
||||
}
|
||||
|
||||
inline NzInstancedRenderable& NzInstancedRenderable::operator=(const NzInstancedRenderable& renderable)
|
||||
{
|
||||
m_boundingVolume = renderable.m_boundingVolume;
|
||||
m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline void NzInstancedRenderable::UpdateBoundingVolume() const
|
||||
{
|
||||
MakeBoundingVolume();
|
||||
m_boundingVolumeUpdated = true;
|
||||
}
|
||||
Reference in New Issue
Block a user