#pragma once

#include <vector>
#include "Mix/Tool/Win32/Core/Object.h"

namespace Mix{ namespace Tool{ namespace Win32{ namespace Graphics{

	class BlankMesh : public Mix::Tool::Win32::Object
	{
	private:
		//最適化 : フェイス構造体
		struct O_FACE
		{
			unsigned int indices[3];		//頂点座標の参照インデックス配列

			O_FACE( unsigned int i0, unsigned int i1, unsigned int i2 )
			{
				indices[0] = i0;
				indices[1] = i1;
				indices[2] = i2;
			}
		};

		//インデックス情報構造体(最適化用)
		struct O_INDEX_INFO
		{
			bool bAssign;
			unsigned int value;

			O_INDEX_INFO( void )
			{
				bAssign = false;
				value = 0;
			}
		};

	private:
		std::vector<Mix::Tool::Win32::Graphics::BLANK_VERTEX> m_VertexList;
		std::vector<unsigned int> m_IndexList;

	public:
		BlankMesh( void );
		BlankMesh( const std::vector<Mix::Tool::Win32::Graphics::POLYGON>& polygonList );
		virtual ~BlankMesh( void );

		void Build( const std::vector<Mix::Tool::Win32::Graphics::POLYGON>& polygonList );

		const std::vector<Mix::Tool::Win32::Graphics::BLANK_VERTEX>& GetVertexList( void ) const;
		const std::vector<unsigned int>& GetIndexList( void ) const;

	public:
		virtual Mix::Tool::Win32::Object::TYPE GetType( void ) const;
	};

}}}}
