Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
quad_2d.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_2d.hpp"
10
11namespace rendering_engine
12{
13class Scene;
14/**
15 * @class Quad2D
16 * @brief 2D drawable component for rendering rectangular primitives.
17 *
18 * Represents a simple 2D quad used for sprites, UI widgets, text, or procedural
19 * materials. Provides a lightweight implementation of a 2D drawable
20 * with transform and material properties inherited from Drawable2D.
21 *
22 * @note Not copyable or assignable.
23 * @see Drawable2D, DrawableComponent, SceneComponent2D, Camera2D
24 */
25class RE_API Quad2D : public Drawable2D
26{
27public:
28 /**
29 * @brief Constructs the Quad2D with a render context.
30 * @param renderContext Resource context.
31 */
32 Quad2D(RenderResourceContext renderContext, Scene& scene);
33
34 /**
35 * @copydoc DrawableComponent::Initialize
36 */
37 void Initialize() override;
38
39 /**
40 * @copydoc DrawableComponent::Update
41 */
42 void Update(float deltaTime) override;
43
44 /**
45 * @copydoc Drawable2D::Draw
46 */
47 void Draw(const Camera2D& camera) override;
48
49 Quad2D(const Quad2D& rhs) = delete;
50 Quad2D& operator=(const Quad2D& rhs) = delete;
51};
52
53} // namespace rendering_engine
Represents a 2D camera with position, rotation, and zoom control.
Definition: camera_2d.hpp:36
2D drawable component for rendering objects in 2D space.
Definition: drawable_2d.hpp:27
2D drawable component for rendering rectangular primitives.
Definition: quad_2d.hpp:26
Quad2D(const Quad2D &rhs)=delete
Quad2D & operator=(const Quad2D &rhs)=delete
Base class representing a renderable scene.
Definition: scene.hpp:44
#define RE_API
Aggregates pointers to global rendering resource managers.