CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
TubeMesh.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 "CylinderMesh.hpp"
11#include "FlipMesh.hpp"
12#include "MergeMesh.hpp"
13#include "UvFlipMesh.hpp"
14
16
19 class TubeMesh {
20 private:
23
24 public:
33 TubeMesh(double radius = 1.0, double innerRadius = 0.75, double size = 1.0, int slices = 32, int segments = 8, double start = 0.0,
34 double sweep = radians(360.0));
35
36 using Triangles = typename Impl::Triangles;
37 [[nodiscard]] Triangles triangles() const noexcept { return mMergeMesh.triangles(); }
38
39 using Vertices = typename Impl::Vertices;
40 [[nodiscard]] Vertices vertices() const noexcept { return mMergeMesh.vertices(); }
41 };
42
43} // namespace CeresEngine::MeshGenerator
Tube (thick cylinder) centered at origin aligned along the z-axis.
Definition TubeMesh.hpp:19
typename Impl::Triangles Triangles
Definition TubeMesh.hpp:36
Vertices vertices() const noexcept
Definition TubeMesh.hpp:40
typename Impl::Vertices Vertices
Definition TubeMesh.hpp:39
Triangles triangles() const noexcept
Definition TubeMesh.hpp:37
Impl mMergeMesh
Definition TubeMesh.hpp:22
TubeMesh(double radius=1.0, double innerRadius=0.75, double size=1.0, int slices=32, int segments=8, double start=0.0, double sweep=radians(360.0))
Definition AnyGenerator.hpp:12
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25