Files
TSE/TSE_Core/src/BehaviourScripts/Renderable.hpp
2026-01-17 13:48:25 +01:00

36 lines
891 B
C++

#pragma once
#define RENDERABLE typeid(TSE::Renderable).name()
#include "elements/Material.hpp"
#include "interfaces/IRenderable.hpp"
#include "elements/BehaviourScript.hpp"
#include "Mesh.hpp"
namespace TSE
{
class Renderable : public BehaviourScript, public IRenderable
{
private:
Material* material = nullptr;
public:
Renderable();
explicit Renderable(Material* material);
const Vector3* GetVertices() const override;
const Vector2* GetUVs() const override;
const std::vector<ushort> GetIndices() const override;
size_t GetVertexCount() const override;
inline const char* GetName() override
{
return "Renderable";
}
void SetMaterial(Material* material);
Material* GetMaterial();
private:
Mesh* GetMeshContainer() const;
};
} // namespace TSE