CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
RoundedRectangleShape.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "CircleShape.hpp"
11#include "LineShape.hpp"
12#include "MergeShape.hpp"
13#include "TranslateShape.hpp"
14
16
19 private:
23
24 public:
29 RoundedRectangleShape(double radius = 0.25, const Vector2& size = {0.75, 0.75}, int slices = 4, const Vector2i& segments = {8, 8});
30
31 using Edges = typename Impl::Edges;
32
33 [[nodiscard]] Edges edges() const noexcept { return mMergeShape.edges(); }
34
35 using Vertices = typename Impl::Vertices;
36
37 [[nodiscard]] Vertices vertices() const noexcept { return mMergeShape.vertices(); }
38 };
39
40} // namespace CeresEngine::MeshGenerator
A line from a point to a point.
Definition LineShape.hpp:16
Rectangle with rounded corners centered at origin aligned along the x and y axis.
Definition RoundedRectangleShape.hpp:18
Impl mMergeShape
Definition RoundedRectangleShape.hpp:22
Vertices vertices() const noexcept
Definition RoundedRectangleShape.hpp:37
typename Impl::Edges Edges
Definition RoundedRectangleShape.hpp:31
RoundedRectangleShape(double radius=0.25, const Vector2 &size={0.75, 0.75}, int slices=4, const Vector2i &segments={8, 8})
Edges edges() const noexcept
Definition RoundedRectangleShape.hpp:33
typename Impl::Vertices Vertices
Definition RoundedRectangleShape.hpp:35
Translates the position of each vertex by given amount.
Definition TranslateShape.hpp:16
Definition AnyGenerator.hpp:12
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25