Unravel Engine C++ Reference
Loading...
Searching...
No Matches
rounded_box_mesh.cpp
Go to the documentation of this file.
1
#include "
rounded_box_mesh.hpp
"
2
3
using namespace
generator
;
4
using namespace
generator::detail
;
5
6
box_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
11
box_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
16
box_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
23
box_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
28
rounded_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
}
generator::detail::box_corner_t::box_corner_t
box_corner_t(const gml::dvec3 &position, double radius, int slices)
Definition
rounded_box_mesh.cpp:16
generator::detail::box_corners_t::box_corners_t
box_corners_t(const gml::dvec3 &size, double radius, int slices)
Definition
rounded_box_mesh.cpp:23
generator::detail::box_edge_t::box_edge_t
box_edge_t(const gml::dvec2 &position, double radius, double size, int slices, int segments)
Definition
rounded_box_mesh.cpp:6
generator::detail::box_edges_t::box_edges_t
box_edges_t(const gml::dvec3 &size, double radius, int slices, int segments)
Definition
rounded_box_mesh.cpp:11
generator::rounded_box_mesh_t::rounded_box_mesh_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})
Definition
rounded_box_mesh.cpp:28
position
math::vec3 position
Definition
defaults.cpp:52
generator::detail
Definition
box_mesh.hpp:16
generator
Definition
any_generator.hpp:7
generator::axis_t::X
@ X
generator::axis_t::Z
@ Z
generator::axis_t::Y
@ Y
segments
const segment_list * segments
Definition
text_component.cpp:442
rounded_box_mesh.hpp
size
Definition
basetypes.hpp:43
size
float size
Definition
volume_resolver.cpp:31
engine
engine
rendering
generator
rounded_box_mesh.cpp
Generated by
1.12.0