Graphics/Renderable: Fix warning

Former-commit-id: 6370969c051e7612b59e303806a6dc650988afc9
This commit is contained in:
Lynix 2015-06-02 17:19:47 +02:00
parent 3db08e0a2c
commit 844062cfd0
2 changed files with 12 additions and 10 deletions

View File

@ -30,22 +30,22 @@ class NAZARA_API NzRenderable : public NzRefCounted
{ {
public: public:
NzRenderable() = default; NzRenderable() = default;
NzRenderable(const NzRenderable& renderable); inline NzRenderable(const NzRenderable& renderable);
virtual ~NzRenderable(); virtual ~NzRenderable();
void EnsureBoundingVolumeUpdated() const; inline void EnsureBoundingVolumeUpdated() const;
virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0; virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0;
virtual bool Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const; virtual bool Cull(const NzFrustumf& frustum, const NzBoundingVolumef& volume, const NzMatrix4f& transformMatrix) const;
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); inline NzRenderable& operator=(const NzRenderable& renderable);
protected: protected:
virtual void MakeBoundingVolume() const = 0; virtual void MakeBoundingVolume() const = 0;
void InvalidateBoundingVolume(); void InvalidateBoundingVolume();
void UpdateBoundingVolume() const; inline void UpdateBoundingVolume() const;
mutable NzBoundingVolumef m_boundingVolume; mutable NzBoundingVolumef m_boundingVolume;

View File

@ -19,14 +19,16 @@ inline void NzRenderable::InvalidateBoundingVolume()
m_boundingVolumeUpdated = false; m_boundingVolumeUpdated = false;
} }
inline NzRenderable& NzRenderable::operator=(const NzRenderable& renderable)
{
m_boundingVolume = renderable.m_boundingVolume;
m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated;
return *this;
}
inline void NzRenderable::UpdateBoundingVolume() const inline void NzRenderable::UpdateBoundingVolume() const
{ {
MakeBoundingVolume(); MakeBoundingVolume();
m_boundingVolumeUpdated = true; m_boundingVolumeUpdated = true;
} }
inline NzRenderable& NzRenderable::operator=(const NzRenderable& renderable)
{
m_boundingVolume = renderable.m_boundingVolume;
m_boundingVolumeUpdated = renderable.m_boundingVolumeUpdated;
}