Unravel Engine C++ Reference
Loading...
Searching...
No Matches
box_mesh.hpp
Go to the documentation of this file.
1#ifndef GENERATOR_BOXMESH_HPP
2#define GENERATOR_BOXMESH_HPP
3
4#include "axis_swap_mesh.hpp"
5#include "flip_mesh.hpp"
6#include "merge_mesh.hpp"
7#include "plane_mesh.hpp"
8#include "translate_mesh.hpp"
9#include "uv_flip_mesh.hpp"
10#include "uv_swap_mesh.hpp"
11
12namespace generator
13{
14
15namespace detail
16{
17
19{
20private:
22 impl_t translate_mesh_;
23
24public:
25 box_face_t(const gml::dvec2& size, const gml::ivec2& segments, double delta);
26
28
29 triangles_t triangles() const noexcept
30 {
31 return translate_mesh_.triangles();
32 }
33
35
36 vertices_t vertices() const noexcept
37 {
38 return translate_mesh_.vertices();
39 }
40};
41
43{
44private:
46 impl_t merge_mesh_;
47
48public:
49 box_faces_t(const gml::dvec2& size, const gml::ivec2& segments, double delta);
50
51 using triangles_t = typename impl_t::triangles_t;
52
53 triangles_t triangles() const noexcept
54 {
55 return merge_mesh_.triangles();
56 }
57
58 using vertices_t = typename impl_t::vertices_t;
59
60 vertices_t vertices() const noexcept
61 {
62 return merge_mesh_.vertices();
63 }
64};
65} // namespace detail
66
70{
71private:
75 impl_t merge_mesh_;
76
77public:
82 explicit box_mesh_t(const gml::dvec3& size = {1.0, 1.0, 1.0}, const gml::ivec3& segments = {8, 8, 8}) noexcept;
83
84 using triangles_t = typename impl_t::triangles_t;
85
86 triangles_t triangles() const noexcept
87 {
88 return merge_mesh_.triangles();
89 }
90
91 using vertices_t = typename impl_t::vertices_t;
92
93 vertices_t vertices() const noexcept
94 {
95 return merge_mesh_.vertices();
96 }
97};
98} // namespace generator
99
100#endif
typename impl_t::triangles_t triangles_t
Definition box_mesh.hpp:84
triangles_t triangles() const noexcept
Definition box_mesh.hpp:86
box_mesh_t(const gml::dvec3 &size={1.0, 1.0, 1.0}, const gml::ivec3 &segments={8, 8, 8}) noexcept
Definition box_mesh.cpp:17
vertices_t vertices() const noexcept
Definition box_mesh.hpp:93
typename impl_t::vertices_t vertices_t
Definition box_mesh.hpp:91
vertices_t vertices() const noexcept
Definition box_mesh.hpp:36
triangles_t triangles() const noexcept
Definition box_mesh.hpp:29
typename impl_t::vertices_t vertices_t
Definition box_mesh.hpp:34
typename impl_t::triangles_t triangles_t
Definition box_mesh.hpp:27
box_face_t(const gml::dvec2 &size, const gml::ivec2 &segments, double delta)
Definition box_mesh.cpp:7
typename impl_t::vertices_t vertices_t
Definition box_mesh.hpp:58
typename impl_t::triangles_t triangles_t
Definition box_mesh.hpp:51
box_faces_t(const gml::dvec2 &size, const gml::ivec2 &segments, double delta)
Definition box_mesh.cpp:12
triangles_t triangles() const noexcept
Definition box_mesh.hpp:53
vertices_t vertices() const noexcept
Definition box_mesh.hpp:60
vertices_t vertices() const noexcept
triangles_t triangles() const noexcept
Flips texture coordinate axis directions.
const segment_list * segments