Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
create_actor_subobject.hpp
Go to the documentation of this file.
1// This file is part of the Rendering Engine project.
2// Author: Alexander Obzherin <alexanderobzherin@gmail.com>
3// Copyright (c) 2026 Alexander Obzherin
4// Distributed under the terms of the zlib License. See LICENSE.md for details.
5
6#pragma once
7
8#include "actor.hpp"
9#include "scene.hpp"
10
11#include "static_mesh.hpp"
12
13namespace rendering_engine
14{
15
16template <>
17StaticMesh* Actor::CreateSubobject<StaticMesh>(StaticMeshParams params)
18{
19 auto staticMesh = mScene.Spawn<StaticMesh>(params);
20 mWards.push_back(staticMesh);
21 staticMesh->UpdateOnTick(bUpdateOnTick);
22
23 return staticMesh;
24}
25
26
27} // namespace rendering_engine
T * Spawn(V arg)
Spawns and registers a drawable of type T.
3D drawable component for rendering static (non-animated) meshes.
Definition: static_mesh.hpp:37