36 lines
891 B
C++
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
|