Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
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) 2025 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
11namespace rendering_engine
12{
13/**
14 * @class StaticMesh
15 * @brief 3D drawable component for rendering static (non-animated) meshes.
16 *
17 * @note Not copyable or assignable.
18 * @see Drawable3D, DrawableComponent, SceneComponent, Camera
19 */
21{
22public:
23 /**
24 * @brief Constructs a StaticMesh component associated with a given render context.
25 * @param renderContext Rendering resource context for material and mesh initialization.
26 */
27 StaticMesh(RenderResourceContext renderContext);
28
29 /**
30 * @copydoc DrawableComponent::Initialize
31 */
32 void Initialize() override;
33
34 /**
35 * @copydoc DrawableComponent::Update
36 */
37 void Update(float deltaTime) override;
38
39 /**
40 * @copydoc Drawable3D::Draw
41 */
42 void Draw(const Camera& camera) override;
43
44 using DrawableComponent::SetMaterialName; ///< @copydoc DrawableComponent::SetMaterialName
45 using DrawableComponent::SetMeshName; ///< @copydoc DrawableComponent::SetMeshName
46
47 StaticMesh(const StaticMesh& rhs) = delete;
48 StaticMesh& operator=(const StaticMesh& rhs) = delete;
49};
50
51
52} // namespace rendering_engine
Represents a 3D perspective camera with world transform and projection settings.
Definition camera.hpp:48
Drawable3D(RenderResourceContext renderContext)
Constructs the Drawable3D with a render context.
void SetMaterialName(const std::string &materialName)
Sets the material to use (by name).
void SetMeshName(const std::string &meshName)
Sets the mesh to use (by name).
StaticMesh(RenderResourceContext renderContext)
Constructs a StaticMesh component associated with a given render context.
StaticMesh & operator=(const StaticMesh &rhs)=delete
void Initialize() override
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material an...
void Update(float deltaTime) override
Updates logic (animation, movement, etc.) for this drawable.
StaticMesh(const StaticMesh &rhs)=delete
<
void Draw(const Camera &camera) override
Submits this mesh to the renderer for drawing.
#define RE_API
Aggregates pointers to global rendering resource managers.