<commit_before>#pragma once

#include "Sphere.h"
#include "Frustum.h"

#include "MeshManager.hpp"
#include "ObjectManager.h"

#include "MeshRenderQueue.h"

namespace Rendering
{
	namespace Geometry
	{
		class MeshUtility final
		{			
		public:
			template <class CullFunc>					// CullFunc Form = "[](const Mesh&, const Transform&) -> bool { ... }"
			static void ClassifyTransparentMesh(
				RenderQueue::TransparentMeshRenderQueue& renderQueue,
				const Vector3& viewDir,
				const TransparentMeshPool& pool,
				const Core::ObjectManager& objMgr,
				const Core::TransformPool& transformPool,
				CullFunc cullFunc)
			{
				renderQueue.clear();

				const auto& meshes = pool.GetVector();
				for (const auto& mesh : meshes)
				{
					ObjectID id							= mesh.GetObjectID();
					const Object* object				= objMgr.Find(id); assert(object);
					const Core::Transform& transform	= _FindTransform(mesh.GetObjectID(), transformPool);

					bool use =	object->GetUse() | cullFunc(mesh, transform);

					if (use)
						renderQueue.push_back(&mesh);
				}

				_SortTransparentMesh(renderQueue, viewDir, transformPool);
			}

			template <class CullFunc>					// CullFunc Form = "[](const Mesh&, const Transform&) -> bool { ... }"
			static void ClassifyOpaqueMesh(
				RenderQueue::OpaqueMeshRenderQueue& renderQueue,
				const OpaqueMeshPool& pool,
				const Core::ObjectManager& objMgr,
				const Core::TransformPool& transformPool,
				CullFunc cullFunc)
			{
				renderQueue.DeleteAllContent();
				
				pool.Iterate(
						[&objMgr, &transformPool, &renderQueue, &cullFunc](const Mesh& mesh)
						{
							Core::ObjectID id					= mesh.GetObjectID();
							const Core::Object* object			= objMgr.Find(id); assert(object);
							const Core::Transform& transform	= _FindTransform(id, transformPool);
							
							bool use = object->GetUse() | cullFunc(mesh, transform);
							if(use)
								renderQueue.Add(mesh);
						}
					);				
			}
			
			
		private:
			static const Core::Transform&
				_FindTransform(Core::ObjectID id, const Core::TransformPool& transformPool);
			static void
				_SortTransparentMesh(RenderQueue::TransparentMeshRenderQueue& renderQueue,
									 const Vector3& viewDir, const Core::TransformPool& transformPool);
		};
	}
}<commit_msg>MeshUtility.h - 누락된 namesapce 추가<commit_after>#pragma once

#include "Sphere.h"
#include "Frustum.h"

#include "MeshManager.hpp"
#include "ObjectManager.h"

#include "MeshRenderQueue.h"

namespace Rendering
{
	namespace Geometry
	{
		class MeshUtility final
		{			
		public:
			template <class CullFunc>					// CullFunc Form = "[](const Mesh&, const Transform&) -> bool { ... }"
			static void ClassifyTransparentMesh(
				RenderQueue::TransparentMeshRenderQueue& renderQueue,
				const Math::Vector3& viewDir,
				const TransparentMeshPool& pool,
				const Core::ObjectManager& objMgr,
				const Core::TransformPool& transformPool,
				CullFunc cullFunc)
			{
				renderQueue.clear();

				const auto& meshes = pool.GetVector();
				for (const auto& mesh : meshes)
				{
					ObjectID id							= mesh.GetObjectID();
					const Object* object				= objMgr.Find(id); assert(object);
					const Core::Transform& transform	= _FindTransform(mesh.GetObjectID(), transformPool);

					bool use =	object->GetUse() | cullFunc(mesh, transform);

					if (use)
						renderQueue.push_back(&mesh);
				}

				_SortTransparentMesh(renderQueue, viewDir, transformPool);
			}

			template <class CullFunc>					// CullFunc Form = "[](const Mesh&, const Transform&) -> bool { ... }"
			static void ClassifyOpaqueMesh(
				RenderQueue::OpaqueMeshRenderQueue& renderQueue,
				const OpaqueMeshPool& pool,
				const Core::ObjectManager& objMgr,
				const Core::TransformPool& transformPool,
				CullFunc cullFunc)
			{
				renderQueue.DeleteAllContent();
				
				pool.Iterate(
						[&objMgr, &transformPool, &renderQueue, &cullFunc](const Mesh& mesh)
						{
							Core::ObjectID id					= mesh.GetObjectID();
							const Core::Object* object			= objMgr.Find(id); assert(object);
							const Core::Transform& transform	= _FindTransform(id, transformPool);
							
							bool use = object->GetUse() | cullFunc(mesh, transform);
							if(use)
								renderQueue.Add(mesh);
						}
					);				
			}
			
			
		private:
			static const Core::Transform&
				_FindTransform(Core::ObjectID id, const Core::TransformPool& transformPool);
			static void
				_SortTransparentMesh(RenderQueue::TransparentMeshRenderQueue& renderQueue,
									 const Math::Vector3& viewDir, const Core::TransformPool& transformPool);
		};
	}
}
{'fraction_non_alphanumeric': 0.11677235950142138, 'fraction_numerical': 0.0008746993221080254, 'mean_word_length': 3.3854266538830298, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '3306549', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1416, 'n_words': 315}