Graphics/Renderable: Fix copy constructor/operator
Former-commit-id: eb376d49285cefa1f0317719a47e41f62a11aae5
This commit is contained in:
parent
b075d05d82
commit
be335c3e81
|
|
@ -30,7 +30,7 @@ class NAZARA_API NzRenderable : public NzRefCounted
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NzRenderable() = default;
|
NzRenderable() = default;
|
||||||
NzRenderable(const NzRenderable& renderable) = default;
|
NzRenderable(const NzRenderable& renderable);
|
||||||
virtual ~NzRenderable();
|
virtual ~NzRenderable();
|
||||||
|
|
||||||
void EnsureBoundingVolumeUpdated() const;
|
void EnsureBoundingVolumeUpdated() const;
|
||||||
|
|
@ -40,7 +40,7 @@ class NAZARA_API NzRenderable : public NzRefCounted
|
||||||
virtual const NzBoundingVolumef& GetBoundingVolume() const;
|
virtual const NzBoundingVolumef& GetBoundingVolume() const;
|
||||||
virtual void UpdateBoundingVolume(NzBoundingVolumef* boundingVolume, const NzMatrix4f& transformMatrix) const;
|
virtual void UpdateBoundingVolume(NzBoundingVolumef* boundingVolume, const NzMatrix4f& transformMatrix) const;
|
||||||
|
|
||||||
NzRenderable& operator=(const NzRenderable& renderable) = default;
|
NzRenderable& operator=(const NzRenderable& renderable);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MakeBoundingVolume() const = 0;
|
virtual void MakeBoundingVolume() const = 0;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,12 @@
|
||||||
// This file is part of the "Nazara Engine - Graphics module"
|
// This file is part of the "Nazara Engine - Graphics module"
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
|
NzRenderable::NzRenderable(const NzRenderable& renderable) :
|
||||||
|
m_boundingVolume(renderable.m_boundingVolume),
|
||||||
|
m_boundingVolumeUpdated(renderable.m_boundingVolumeUpdated)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void NzRenderable::EnsureBoundingVolumeUpdated() const
|
void NzRenderable::EnsureBoundingVolumeUpdated() const
|
||||||
{
|
{
|
||||||
if (!m_boundingVolumeUpdated)
|
if (!m_boundingVolumeUpdated)
|
||||||
|
|
@ -18,3 +24,9 @@ void NzRenderable::UpdateBoundingVolume() const
|
||||||
MakeBoundingVolume();
|
MakeBoundingVolume();
|
||||||
m_boundingVolumeUpdated = true;
|
m_boundingVolumeUpdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NzRenderable& NzRenderable::operator=(const NzRenderable& renderable)
|
||||||
|
{
|
||||||
|
m_boundingVolume = renderable.m_boundingVolume;
|
||||||
|
m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue