Unravel Engine C++ Reference
Loading...
Searching...
No Matches
rounded_rectangle_shape.hpp
Go to the documentation of this file.
1
#ifndef GENERATOR_ROUNDEDRECTANGLESHAPE_HPP
2
#define GENERATOR_ROUNDEDRECTANGLESHAPE_HPP
3
4
#include "
circle_shape.hpp
"
5
#include "
line_shape.hpp
"
6
#include "
merge_shape.hpp
"
7
#include "
translate_shape.hpp
"
8
9
namespace
generator
10
{
11
13
class
rounded_rectangle_shape_t
14
{
15
private
:
16
using
impl_t
=
merge_shape_t
<
line_shape_t
,
17
translate_shape_t<circle_shape_t>
,
18
line_shape_t
,
19
translate_shape_t<circle_shape_t>
,
20
line_shape_t
,
21
translate_shape_t<circle_shape_t>
,
22
line_shape_t
,
23
translate_shape_t<circle_shape_t>
>;
24
impl_t
merge_shape_;
25
26
public
:
31
rounded_rectangle_shape_t
(
double
radius = 0.25,
32
const
gml::dvec2&
size
= {0.75, 0.75},
33
int
slices = 4,
34
const
gml::ivec2&
segments
= {8, 8});
35
36
using
edges_t
=
typename
impl_t::edges_t;
37
38
edges_t
edges
() const noexcept
39
{
40
return
merge_shape_.edges();
41
}
42
43
using
vertices_t
=
typename
impl_t::vertices_t;
44
45
vertices_t
vertices
() const noexcept
46
{
47
return
merge_shape_.vertices();
48
}
49
};
50
}
// namespace generator
51
52
#endif
circle_shape.hpp
generator::line_shape_t
Definition
line_shape.hpp:12
generator::merge_shape_t< line_shape_t, translate_shape_t< circle_shape_t >, line_shape_t, translate_shape_t< circle_shape_t >, line_shape_t, translate_shape_t< circle_shape_t >, line_shape_t, translate_shape_t< circle_shape_t > >
generator::rounded_rectangle_shape_t
Rectangle with rounded corners centered at origin aligned along the x and y axis.
Definition
rounded_rectangle_shape.hpp:14
generator::rounded_rectangle_shape_t::edges
edges_t edges() const noexcept
Definition
rounded_rectangle_shape.hpp:38
generator::rounded_rectangle_shape_t::rounded_rectangle_shape_t
rounded_rectangle_shape_t(double radius=0.25, const gml::dvec2 &size={0.75, 0.75}, int slices=4, const gml::ivec2 &segments={8, 8})
Definition
rounded_rectangle_shape.cpp:5
generator::rounded_rectangle_shape_t::vertices_t
typename impl_t::vertices_t vertices_t
Definition
rounded_rectangle_shape.hpp:43
generator::rounded_rectangle_shape_t::vertices
vertices_t vertices() const noexcept
Definition
rounded_rectangle_shape.hpp:45
generator::rounded_rectangle_shape_t::edges_t
typename impl_t::edges_t edges_t
Definition
rounded_rectangle_shape.hpp:36
generator::translate_shape_t
Translates the position of each vertex by given amount.
Definition
translate_shape.hpp:14
line_shape.hpp
merge_shape.hpp
generator
Definition
any_generator.hpp:7
segments
const segment_list * segments
Definition
text_component.cpp:442
size
Definition
basetypes.hpp:43
translate_shape.hpp
UnravelEngine
UnravelEngine
engine
engine
rendering
generator
rounded_rectangle_shape.hpp
Generated by
1.12.0