CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
TeapotMesh.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 "BezierMesh.hpp"
11#include "MeshVertex.hpp"
12#include "Triangle.hpp"
13#include "Utility.hpp"
14
16
17#include <array>
18
20
24 class TeapotMesh {
25 public:
43
45 public:
48 void next();
49
50 private:
52
53 int mIndex;
54
55 // Needs be a shared_ptr in order to make copy/move not to mess up the
56 // internal pointer in mTriangles.
58
60
62
64 };
65
71
74
75 private:
77
79 };
80
81} // namespace CeresEngine::MeshGenerator
A bezier patch with D0xD1 control points.
Definition BezierMesh.hpp:21
Definition MeshVertex.hpp:14
int mIndex
Definition TeapotMesh.hpp:34
const TeapotMesh * mMesh
Definition TeapotMesh.hpp:33
TriangleGeneratorType< BezierMesh< 4, 4 > >::Type mTriangles
Definition TeapotMesh.hpp:37
SPtr< const BezierMesh< 4, 4 > > mPatchMesh
Definition TeapotMesh.hpp:35
The Utah Teapot.
Definition TeapotMesh.hpp:24
int mPatchVertexCount
Definition TeapotMesh.hpp:78
Triangles triangles() const noexcept
int mSegments
Definition TeapotMesh.hpp:76
Vertices vertices() const noexcept
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
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25