CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CappedTubeMesh.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 "DiskMesh.hpp"
11#include "FlipMesh.hpp"
12#include "MergeMesh.hpp"
13#include "TranslateMesh.hpp"
14#include "TubeMesh.hpp"
15
17
18 namespace detail {
19
20 class TubeCap {
21 private:
24
25 public:
26 TubeCap(double radius, double innerRadius, double distance, int slices, int rings, double start, double sweep);
27
28 using Triangles = typename Impl::Triangles;
30
31 using Vertices = typename Impl::Vertices;
33 };
34
35 } // namespace detail
36
40 private:
43
44 public:
53 explicit CappedTubeMesh(double radius = 1.0, double innerRadius = 0.75, double size = 1.0, int slices = 32, int segments = 8, int rings = 1,
54 double start = 0.0, double sweep = radians(360.0));
55
56 using Triangles = typename Impl::Triangles;
57 [[nodiscard]] Triangles triangles() const noexcept { return mMergeMesh.triangles(); }
58
59 using Vertices = typename Impl::Vertices;
60 [[nodiscard]] Vertices vertices() const noexcept { return mMergeMesh.vertices(); }
61 };
62
63} // namespace CeresEngine::MeshGenerator
Like TubeMesh but with end caps.
Definition CappedTubeMesh.hpp:39
typename Impl::Triangles Triangles
Definition CappedTubeMesh.hpp:56
Vertices vertices() const noexcept
Definition CappedTubeMesh.hpp:60
CappedTubeMesh(double radius=1.0, double innerRadius=0.75, double size=1.0, int slices=32, int segments=8, int rings=1, double start=0.0, double sweep=radians(360.0))
typename Impl::Vertices Vertices
Definition CappedTubeMesh.hpp:59
Triangles triangles() const noexcept
Definition CappedTubeMesh.hpp:57
Impl mMergeMesh
Definition CappedTubeMesh.hpp:42
Triangles triangles() const noexcept
Definition TranslateMesh.hpp:30
Vertices vertices() const noexcept
Definition TranslateMesh.hpp:34
typename Impl::Vertices Vertices
Definition TranslateMesh.hpp:32
typename Impl::Triangles Triangles
Definition TranslateMesh.hpp:28
Definition CappedTubeMesh.hpp:20
typename Impl::Triangles Triangles
Definition CappedTubeMesh.hpp:28
TubeCap(double radius, double innerRadius, double distance, int slices, int rings, double start, double sweep)
Triangles triangles() const noexcept
Definition CappedTubeMesh.hpp:29
Impl mTranslateMesh
Definition CappedTubeMesh.hpp:23
typename Impl::Vertices Vertices
Definition CappedTubeMesh.hpp:31
Vertices vertices() const noexcept
Definition CappedTubeMesh.hpp:32
Definition AnyGenerator.hpp:12
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25