added basic structures
This commit is contained in:
35
TSE_Core/src/BehaviourScripts/Renderable.hpp
Normal file
35
TSE_Core/src/BehaviourScripts/Renderable.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user