Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
static_mesh.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
9#include "drawable_3d.hpp"
10
11#include <unordered_map>
12#include <string>
13#include <cstdint>
14
15namespace rendering_engine
16{
17class Scene;
19{
20 std::string meshName;
21
22 // {slot number, material name}
23 std::unordered_map<uint32_t, std::string> materials;
24
25 bool castShadows = false;
26 bool receiveShadows = false;
27};
28
29/**
30 * @class StaticMesh
31 * @brief 3D drawable component for rendering static (non-animated) meshes.
32 *
33 * @note Not copyable or assignable.
34 * @see Drawable3D, DrawableComponent, SceneComponent, Camera
35 */
37{
38public:
39 /**
40 * @brief Constructs a StaticMesh component associated with a given render context.
41 * @param renderContext Rendering resource context for material and mesh initialization.
42 */
43 StaticMesh(RenderResourceContext renderContext, Scene& scene, StaticMeshParams params);
44
45 /**
46 * @copydoc DrawableComponent::Initialize
47 */
48 void Initialize() override;
49
50 /**
51 * @copydoc DrawableComponent::Update
52 */
53 void Update(float deltaTime) override;
54
55 /**
56 * @copydoc Drawable3D::Draw
57 */
58 void Draw(const Camera& camera) override;
59
60 StaticMesh(const StaticMesh& rhs) = delete;
61 StaticMesh& operator=(const StaticMesh& rhs) = delete;
62
63protected:
65};
66
67
68} // namespace rendering_engine
Represents a 3D perspective camera with world transform and projection settings.
Definition: camera.hpp:48
3D drawable component for rendering objects in 3D space.
Definition: drawable_3d.hpp:27
Base class representing a renderable scene.
Definition: scene.hpp:44
3D drawable component for rendering static (non-animated) meshes.
Definition: static_mesh.hpp:37
StaticMesh & operator=(const StaticMesh &rhs)=delete
StaticMesh(const StaticMesh &rhs)=delete
#define RE_API
Aggregates pointers to global rendering resource managers.
std::unordered_map< uint32_t, std::string > materials
Definition: static_mesh.hpp:23