create entity class

This commit is contained in:
lightling 2022-02-05 22:25:20 -05:00
parent 18cda59205
commit ff0d41c301
Signed by: lightling
GPG key ID: 016F11E0AA296B67
2 changed files with 34 additions and 0 deletions

16
Entity.cpp Normal file
View file

@ -0,0 +1,16 @@
#include "Entity.h"
Entity::Entity(std::shared_ptr<Mesh> _mesh)
{
mesh = _mesh;
}
Transform* Entity::GetTransform()
{
return &transform;
}
std::shared_ptr<Mesh> Entity::GetMesh()
{
return mesh;
}

18
Entity.h Normal file
View file

@ -0,0 +1,18 @@
#pragma once
#include "Mesh.h"
#include "Transform.h"
#include <memory>
class Entity
{
public:
Entity(std::shared_ptr<Mesh> _mesh);
Transform* GetTransform();
std::shared_ptr<Mesh> GetMesh();
private:
Transform transform;
std::shared_ptr<Mesh> mesh;
};