#pragma once

#include <glm/glm.hpp>

#include "Core/Constant.h"

class Mesh {
public:
    struct Vertex {
        glm::vec3 position_;
        glm::vec4 color_;
        glm::vec2 uv_;
        glm::vec3 normal_;
    };

public:
    Mesh();
    ~Mesh();

    void SetVertices(Vertex* vertices, uint32 vertexCount, bool copied);
    const Vertex* GetVertices() const {
        return vertices_;
    }
    uint32 GetVertexCount() const {
        return vertexCount_;
    }

    void SetIndices(uint32* indices, uint32 indexCount, bool copied);
    const uint32* GetIndices() const {
        return indices_;
    }
    uint32 GetIndexCount() const {
        return indexCount_;
    }

private:
    Vertex* vertices_{ nullptr };
    bool isVerticesCopied_{ false };
    uint32 vertexCount_{ 0 };
    uint32* indices_{ nullptr };
    bool isIndicesCopied_{ false };
    uint32 indexCount_{ 0 };
};
