Unravel Engine C++ Reference
Loading...
Searching...
No Matches
rounded_box_mesh.cpp
Go to the documentation of this file.
2
3using namespace generator;
4using namespace generator::detail;
5
6box_edge_t::box_edge_t(const gml::dvec2& position, double radius, double size, int slices, int segments)
7 : translate_mesh_{{radius, size, slices, segments, 0.0, gml::radians(90.0)}, gml::dvec3{position, 0.0}}
8{
9}
10
11box_edges_t::box_edges_t(const gml::dvec3& size, double radius, int slices, int segments)
12 : mirrorMesh_{{{gml::dvec2{size}, radius, size[2], slices, segments}, axis_t::Y}, axis_t::X}
13{
14}
15
16box_corner_t::box_corner_t(const gml::dvec3& position, double radius, int slices)
17 : translate_mesh_{
18 {gml::dvec3{radius, 0.0, 0.0}, gml::dvec3{0.0, radius, 0.0}, gml::dvec3{0.0, 0.0, radius}, slices},
19 position}
20{
21}
22
23box_corners_t::box_corners_t(const gml::dvec3& size, double radius, int slices)
24 : mirrorMesh_{{{{size, radius, slices}, axis_t::X}, axis_t::Y}, axis_t::Z}
25{
26}
27
28rounded_box_mesh_t::rounded_box_mesh_t(double radius, const gml::dvec3& size, int slices, const gml::ivec3& segments)
29 : merge_mesh_{
30 {{{size[1], size[2]}, {segments[1], segments[2]}, size[0] + radius}, axis_t::Z, axis_t::X, axis_t::Y},
31 {{{{size[0], size[2]}, {segments[0], segments[2]}, size[1] + radius}, axis_t::X, axis_t::Z, axis_t::Y},
32 true,
33 false},
34 {{size[0], size[1]}, {segments[0], segments[1]}, size[2] + radius},
35 {{{size[2], size[1], size[0]}, radius, slices, segments[0]}, axis_t::Z, axis_t::Y, axis_t::X},
36 {{{size[0], size[2], size[1]}, radius, slices, segments[1]}, axis_t::X, axis_t::Z, axis_t::Y},
37 {size, radius, slices, segments[2]},
38 {size, radius, slices}}
39{
40}
box_corner_t(const gml::dvec3 &position, double radius, int slices)
box_corners_t(const gml::dvec3 &size, double radius, int slices)
box_edge_t(const gml::dvec2 &position, double radius, double size, int slices, int segments)
box_edges_t(const gml::dvec3 &size, double radius, int slices, int segments)
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})
const segment_list * segments