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
9namespace generator
10{
11
14{
15private:
24 impl_t merge_shape_;
25
26public:
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
Rectangle with rounded corners centered at origin aligned along the x and y axis.
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})
Translates the position of each vertex by given amount.
const segment_list * segments