Dawn/src/dawn/scene/components/display/mesh/MeshRenderer.hpp

31 lines
749 B
C++

// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/mesh/Mesh.hpp"
namespace Dawn {
class MeshHost;
class MeshRenderer : public SceneItemComponent {
protected:
std::shared_ptr<MeshHost> meshHost;
public:
// @optional
Mesh * mesh = nullptr;
/**
* Constructs a MeshRenderer scene item component.
*
* @param item Scene Item this mesh renderer belongs to.
*/
MeshRenderer(std::weak_ptr<SceneItem> item);
std::vector<std::shared_ptr<SceneItemComponent>> getDependencies() override;
void onStart() override;
};
}