CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
DodecahedronMesh.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 "ConvexPolygonMesh.hpp"
11#include "MeshVertex.hpp"
12#include "Triangle.hpp"
13#include "Utility.hpp"
14
16
17#include <array>
18
20
25 private:
26 class Triangles {
27 public:
30 void next();
31
32 private:
35
36 // Needs be a shared_ptr in order to make copy/move not to mess up the
37 // internal pointer in mTriangles.
39
41
43
45 };
46
48 public:
51 void next();
52
53 private:
56
57 // Needs be a shared_ptr in order to make copy/move not to mess up the
58 // internal pointer in mTriangles.
60
62
64
66 };
67
68 double mRadius;
70 int mRings;
72
73 public:
79 explicit DodecahedronMesh(double radius = 1.0, int segments = 1, int rings = 1) noexcept;
80
83 };
84
85} // namespace CeresEngine::MeshGenerator
A polygonal disk with arbitrary number of corners.
Definition ConvexPolygonMesh.hpp:21
TriangleGeneratorType< ConvexPolygonMesh >::Type mTriangles
Definition DodecahedronMesh.hpp:40
UInt32 mFaceIndex
Definition DodecahedronMesh.hpp:34
const DodecahedronMesh * mMesh
Definition DodecahedronMesh.hpp:33
SPtr< const ConvexPolygonMesh > mFaceMesh
Definition DodecahedronMesh.hpp:38
A regular dodecahedron centered at origin with given radius.
Definition DodecahedronMesh.hpp:24
double mRadius
Definition DodecahedronMesh.hpp:68
int mSegments
Definition DodecahedronMesh.hpp:69
int mFaceVertexCount
Definition DodecahedronMesh.hpp:71
int mRings
Definition DodecahedronMesh.hpp:70
Definition MeshVertex.hpp:14
Will have a type named "Type" that has same type as value returned by method triangles() for type Pri...
Definition Utility.hpp:30
Definition Triangle.hpp:14
Will have a type named "Type" that has same type as value returned by method vertices() for type Prim...
Definition Utility.hpp:37
Represents a reflected C++ type. Can be used to get metadata from a C++ type.
Definition Type.hpp:32
Definition AnyGenerator.hpp:12
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25