Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Shape.hpp
Go to the documentation of this file.
1/**************************************************************************
2 * EngineSquared v0.1.1
3 *
4 * EngineSquared is a software package, part of the Engine² organization.
5 *
6 * This file is part of the EngineSquared project that is under MIT License.
7 * Copyright © 2025-present by @EngineSquared, All rights reserved.
8 *
9 * EngineSquared is a free software: you can redistribute it and/or modify
10 * it under the terms of the MIT License. See the project's LICENSE file for
11 * the full license text and details.
12 *
13 * @file Shape.hpp
14 * @brief Shape struct declaration.
15 *
16 * This struct is used to represent a shape.
17 *
18 * @author @EngineSquared
19 * @version 0.1.1
20 * @date 2025-10-04
21 **************************************************************************/
22
23#pragma once
24
26#include "component/Mesh.hpp"
27#include <glm/glm.hpp>
28#include <vector>
29
30namespace Object::Resource {
31
38struct Shape {
41 std::string name{};
42
43 Shape() = default;
44 ~Shape() = default;
45
46 // Move constructor
47 Shape(Shape &&other) = default;
48 // Move assignment operator
49 Shape &operator=(Shape &&other) = default;
50
51 // Copy constructor
52 Shape(const Shape &other) = default;
53 // Copy assignment operator
54 Shape &operator=(const Shape &other) = default;
55
62
68 const Component::Mesh &GetMesh() const { return mesh; }
69
76
82 const Component::Material &GetMaterial() const { return material; }
83
89 const std::string &GetName() const { return name; }
90};
91
92} // namespace Object::Resource
Definition ResourceManager.hpp:11
Material structure.
Definition Material.hpp:41
Mesh structure.
Definition Mesh.hpp:40
const std::string & GetName() const
Get the name of the shape.
Definition Shape.hpp:89
Component::Mesh & GetMesh()
Get the Mesh object of the shape.
Definition Shape.hpp:61
Shape & operator=(Shape &&other)=default
const Component::Mesh & GetMesh() const
Get the Mesh object of the shape (const version).
Definition Shape.hpp:68
Component::Material material
Definition Shape.hpp:40
Shape & operator=(const Shape &other)=default
Component::Material & GetMaterial()
Get the Material object of the shape.
Definition Shape.hpp:75
const Component::Material & GetMaterial() const
Get the Material object of the shape (const version).
Definition Shape.hpp:82
Shape(const Shape &other)=default
Shape(Shape &&other)=default
Component::Mesh mesh
Definition Shape.hpp:39
std::string name
Definition Shape.hpp:41