Vivid
Loading...
Searching...
No Matches
ModelComponent.h
1#pragma once
2
3#include "core/ecs/Component.h"
4#include "common/types/Types.h"
5#include "core/ecs/components/model/Mesh.h"
6#include "editor/camera/Camera.h"
7
8namespace Vivid
9{
18 {
19 private:
20 Vector<Mesh*> m_Meshes;
21
22 public:
24 virtual ~ModelComponent() = default;
25
26 void ImGuiRender() override;
27 void Draw(Camera* camera) override;
28
29 void AddMesh(Vivid::Mesh* mesh);
30 void RemoveMesh(Vivid::Mesh* mesh);
31
32 inline Vector<Vivid::Mesh*> GetMeshes() { return m_Meshes; }
33 ComponentType GetComponentType() override { return ComponentType::ModelComponent; }
34 };
35}
A class that represents the camera.
Definition: Camera.h:25
Contains a Component.
Definition: Component.h:15
Contains a Mesh.
Definition: Mesh.h:32
Contains a ModelComponent.