<commit_before>// Copyright (C) 2015 <NAME>
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp

#pragma once

#ifndef NAZARA_RENDERABLE_HPP
#define NAZARA_RENDERABLE_HPP

#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/PrimitiveList.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Graphics/Config.hpp>
#include <Nazara/Math/BoundingVolume.hpp>
#include <Nazara/Math/Frustum.hpp>
#include <Nazara/Math/Matrix4.hpp>

class NzAbstractRenderQueue;

class NAZARA_GRAPHICS_API NzRenderable
{
	public:
		NzRenderable() = default;
		NzRenderable(const NzRenderable& renderable) = default;
		virtual ~NzRenderable();

		inline void EnsureBoundingVolumeUpdated() const;

		virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0;
		virtual bool Cull(const NzFrustumf& frustum, const NzMatrix4f& transformMatrix) const = 0;
		virtual const NzBoundingVolumef& GetBoundingVolume() const;
		virtual void UpdateBoundingVolume(const NzMatrix4f& transformMatrix);

		NzRenderable& operator=(const NzRenderable& renderable) = default;

	protected:
		virtual void MakeBoundingVolume() const = 0;
		inline void InvalidateBoundingVolume();
		inline void UpdateBoundingVolume() const;

		mutable NzBoundingVolumef m_boundingVolume;

	private:
		mutable bool m_boundingVolumeUpdated;
};
<commit_msg>Graphics/Renderable: Make Cull simply virtual (not pure anymore)<commit_after>// Copyright (C) 2015 <NAME>
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp

#pragma once

#ifndef NAZARA_RENDERABLE_HPP
#define NAZARA_RENDERABLE_HPP

#include <Nazara/Core/NonCopyable.hpp>
#include <Nazara/Core/PrimitiveList.hpp>
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Graphics/Config.hpp>
#include <Nazara/Math/BoundingVolume.hpp>
#include <Nazara/Math/Frustum.hpp>
#include <Nazara/Math/Matrix4.hpp>

class NzAbstractRenderQueue;

class NAZARA_GRAPHICS_API NzRenderable
{
	public:
		NzRenderable() = default;
		NzRenderable(const NzRenderable& renderable) = default;
		virtual ~NzRenderable();

		inline void EnsureBoundingVolumeUpdated() const;

		virtual void AddToRenderQueue(NzAbstractRenderQueue* renderQueue, const NzMatrix4f& transformMatrix) const = 0;
		virtual bool Cull(const NzFrustumf& frustum, const NzMatrix4f& transformMatrix) const;
		virtual const NzBoundingVolumef& GetBoundingVolume() const;
		virtual void UpdateBoundingVolume(const NzMatrix4f& transformMatrix);

		NzRenderable& operator=(const NzRenderable& renderable) = default;

	protected:
		virtual void MakeBoundingVolume() const = 0;
		inline void InvalidateBoundingVolume();
		inline void UpdateBoundingVolume() const;

		mutable NzBoundingVolumef m_boundingVolume;

	private:
		mutable bool m_boundingVolumeUpdated;
};

{'fraction_non_alphanumeric': 0.08774325708432912, 'fraction_numerical': 0.007169682485489928, 'mean_word_length': 6.199017199017199, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1673716', 'n_tokens_mistral': 1012, 'n_tokens_neox': 951, 'n_words': 242}