CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
BoxMesh.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "AxisSwapMesh.hpp"
11#include "FlipMesh.hpp"
12#include "MergeMesh.hpp"
13#include "PlaneMesh.hpp"
14#include "TranslateMesh.hpp"
15#include "UvFlipMesh.hpp"
16#include "UvSwapMesh.hpp"
17
19
20 namespace detail {
21
22 class BoxFace {
23 private:
26
27 public:
28 BoxFace(const Vector2& size, const Vector2i& segments, double delta);
29
30 using Triangles = typename Impl::Triangles;
31
33
34 using Vertices = typename Impl::Vertices;
35
37 };
38
39 class BoxFaces {
40 private:
43
44 public:
45 BoxFaces(const Vector2& size, const Vector2i& segments, double delta);
46
47 using Triangles = typename Impl::Triangles;
48 [[nodiscard]] Triangles triangles() const noexcept { return mMergeMesh.triangles(); }
49
50 using Vertices = typename Impl::Vertices;
51 [[nodiscard]] Vertices vertices() const noexcept { return mMergeMesh.vertices(); }
52 };
53
54 } // namespace detail
55
58 class BoxMesh {
59 private:
62
63 public:
68 explicit BoxMesh(const Vector3& size = {1.0, 1.0, 1.0}, const Vector3i& segments = {8, 8, 8}) noexcept;
69
70 using Triangles = typename Impl::Triangles;
71 [[nodiscard]] Triangles triangles() const noexcept { return mMergeMesh.triangles(); }
72
73 using Vertices = typename Impl::Vertices;
74 [[nodiscard]] Vertices vertices() const noexcept { return mMergeMesh.vertices(); }
75 };
76
77} // namespace CeresEngine::MeshGenerator
Rectangular box centered at origin aligned along the x, y and z axis.
Definition BoxMesh.hpp:58
Triangles triangles() const noexcept
Definition BoxMesh.hpp:71
Vertices vertices() const noexcept
Definition BoxMesh.hpp:74
typename Impl::Vertices Vertices
Definition BoxMesh.hpp:73
Impl mMergeMesh
Definition BoxMesh.hpp:61
BoxMesh(const Vector3 &size={1.0, 1.0, 1.0}, const Vector3i &segments={8, 8, 8}) noexcept
typename Impl::Triangles Triangles
Definition BoxMesh.hpp:70
Triangles triangles() const noexcept
Definition TranslateMesh.hpp:30
Vertices vertices() const noexcept
Definition TranslateMesh.hpp:34
typename Impl::Vertices Vertices
Definition TranslateMesh.hpp:32
typename Impl::Triangles Triangles
Definition TranslateMesh.hpp:28
Flips texture coordinate axis directions.
Definition UvFlipMesh.hpp:15
typename Impl::Vertices Vertices
Definition BoxMesh.hpp:34
Impl mTranslateMesh
Definition BoxMesh.hpp:25
typename Impl::Triangles Triangles
Definition BoxMesh.hpp:30
BoxFace(const Vector2 &size, const Vector2i &segments, double delta)
Triangles triangles() const noexcept
Definition BoxMesh.hpp:32
Vertices vertices() const noexcept
Definition BoxMesh.hpp:36
typename Impl::Vertices Vertices
Definition BoxMesh.hpp:50
typename Impl::Triangles Triangles
Definition BoxMesh.hpp:47
Vertices vertices() const noexcept
Definition BoxMesh.hpp:51
BoxFaces(const Vector2 &size, const Vector2i &segments, double delta)
Impl mMergeMesh
Definition BoxMesh.hpp:42
Triangles triangles() const noexcept
Definition BoxMesh.hpp:48
Definition AnyGenerator.hpp:12
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25