CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CapsuleMesh.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 "MergeMesh.hpp"
12#include "SphereMesh.hpp"
13#include "TranslateMesh.hpp"
14
16
20 private:
23
24 public:
31 CapsuleMesh(double radius = 1.0, double size = 0.5, int slices = 32, int segments = 4, int rings = 8, double start = 0.0, double sweep = radians(360.0));
32
33 using Triangles = typename Impl::Triangles;
34 [[nodiscard]] Triangles triangles() const noexcept { return mMergeMesh.triangles(); }
35
36 using Vertices = typename Impl::Vertices;
37 [[nodiscard]] Vertices vertices() const noexcept { return mMergeMesh.vertices(); }
38 };
39
40} // namespace CeresEngine::MeshGenerator
Capsule (cylinder with spherical caps) centered at origin aligned along z-axis.
Definition CapsuleMesh.hpp:19
Vertices vertices() const noexcept
Definition CapsuleMesh.hpp:37
CapsuleMesh(double radius=1.0, double size=0.5, int slices=32, int segments=4, int rings=8, double start=0.0, double sweep=radians(360.0))
typename Impl::Vertices Vertices
Definition CapsuleMesh.hpp:36
Triangles triangles() const noexcept
Definition CapsuleMesh.hpp:34
typename Impl::Triangles Triangles
Definition CapsuleMesh.hpp:33
Impl mMergeMesh
Definition CapsuleMesh.hpp:22
Translates the position of each vertex by given amount.
Definition TranslateMesh.hpp:15
Definition AnyGenerator.hpp:12
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25