#pragma once
#include "math/vector3.h"
#include "math/vector2.h"
// 顶点最多关联4个骨骼
#define MAX_NUM_BONES_PER_VERTEX 4

namespace engineapi {
	struct Vertex {
		//virtual Vector3& GetPosition() = 0;
	};
	struct PosVertex : public Vertex{
		Vector3 Position = {};
	};
	struct TexVertex : public Vertex {
		Vector3 Position = {};
		Vector3 Normal = {};
		Vector2 TexCoords = {};
	};
	struct BoneVertex : public Vertex
	{
		Vector3 Position = {};
		Vector2 TexCoords = {};
		Vector3 Normal = {};
		Vector3 Tangent = {};
		// 骨骼蒙皮数据
		float    Weights[MAX_NUM_BONES_PER_VERTEX] = {};
		uint32_t BoneIDs[MAX_NUM_BONES_PER_VERTEX] = {};

		void AddBoneData(uint32_t boneID, float weight);
	};
};