Unravel Engine C++ Reference
Loading...
Searching...
No Matches
rounded_box_mesh.hpp
Go to the documentation of this file.
1#ifndef GENERATOR_ROUNDEDBOXMESH_HPP
2#define GENERATOR_ROUNDEDBOXMESH_HPP
3
4#include "axis_flip_mesh.hpp"
5#include "box_mesh.hpp"
6#include "cylinder_mesh.hpp"
7#include "merge_mesh.hpp"
8#include "mirror_mesh.hpp"
9#include "plane_mesh.hpp"
10#include "rotate_mesh.hpp"
12#include "translate_mesh.hpp"
13
14namespace generator
15{
16
17namespace detail
18{
19
21{
22private:
24 impl_t translate_mesh_;
25
26public:
27 box_edge_t(const gml::dvec2& position, double radius, double size, int slices, int segments);
28
30
31 triangles_t triangles() const noexcept
32 {
33 return translate_mesh_.triangles();
34 }
35
37
38 vertices_t vertices() const noexcept
39 {
40 return translate_mesh_.vertices();
41 }
42};
43
45{
46private:
48 impl_t mirrorMesh_;
49
50public:
51 box_edges_t(const gml::dvec3& size, double radius, int slices, int segments);
52
54
55 triangles_t triangles() const noexcept
56 {
57 return mirrorMesh_.triangles();
58 }
59
61
62 vertices_t vertices() const noexcept
63 {
64 return mirrorMesh_.vertices();
65 }
66};
67
69{
70private:
72 impl_t translate_mesh_;
73
74public:
75 box_corner_t(const gml::dvec3& position, double radius, int slices);
76
78
79 triangles_t triangles() const noexcept
80 {
81 return translate_mesh_.triangles();
82 }
83
85
86 vertices_t vertices() const noexcept
87 {
88 return translate_mesh_.vertices();
89 }
90};
91
93{
94private:
96 impl_t mirrorMesh_;
97
98public:
99 box_corners_t(const gml::dvec3& size, double radius, int slices);
100
102
103 triangles_t triangles() const noexcept
104 {
105 return mirrorMesh_.triangles();
106 }
107
109
110 vertices_t vertices() const noexcept
111 {
112 return mirrorMesh_.vertices();
113 }
114};
115} // namespace detail
116
121{
122private:
130 impl_t merge_mesh_;
131
132public:
138 rounded_box_mesh_t(double radius = 0.25,
139 const gml::dvec3& size = {0.75, 0.75, 0.75},
140 int slices = 4,
141 const gml::ivec3& segments = {8, 8, 8});
142
143 using triangles_t = typename impl_t::triangles_t;
144
145 triangles_t triangles() const noexcept
146 {
147 return merge_mesh_.triangles();
148 }
149
150 using vertices_t = typename impl_t::vertices_t;
151
152 vertices_t vertices() const noexcept
153 {
154 return merge_mesh_.vertices();
155 }
156};
157} // namespace generator
158
159#endif
Swaps any number of axis in the mesh.
typename impl_t::triangles_t triangles_t
box_corner_t(const gml::dvec3 &position, double radius, int slices)
vertices_t vertices() const noexcept
typename impl_t::vertices_t vertices_t
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
triangles_t triangles() const noexcept
typename impl_t::vertices_t vertices_t
typename impl_t::triangles_t triangles_t
box_corners_t(const gml::dvec3 &size, double radius, int slices)
typename impl_t::triangles_t triangles_t
typename impl_t::vertices_t vertices_t
box_edge_t(const gml::dvec2 &position, double radius, double size, int slices, int segments)
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
triangles_t triangles() const noexcept
typename impl_t::triangles_t triangles_t
typename impl_t::vertices_t vertices_t
vertices_t vertices() const noexcept
box_edges_t(const gml::dvec3 &size, double radius, int slices, int segments)
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
vertices_t vertices() const noexcept
typename impl_t::triangles_t triangles_t
rounded_box_mesh_t(double radius=0.25, const gml::dvec3 &size={0.75, 0.75, 0.75}, int slices=4, const gml::ivec3 &segments={8, 8, 8})
typename impl_t::vertices_t vertices_t
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
triangles_t triangles() const noexcept
Flips texture coordinate axis directions.
const segment_list * segments