Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TAosTriMesh.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstddef>
6#include <memory>
7#include <vector>
8#include <type_traits>
9
10namespace ph
11{
12
13template<typename Index, typename Vertex, typename VerticesToTriFace>
15{
16 static_assert(std::is_invocable_r_v<
17 TriFace, VerticesToTriFace, std::size_t, Vertex, Vertex, Vertex>);
18
19public:
21 std::vector<Vertex> vertices,
22 std::vector<Index> indices,
23 VerticesToTriFace verticesToTriFace);
24
26 const Vertex* vertices,
27 std::size_t numVertices,
28 const Index* indices,
29 std::size_t numIndices,
30 VerticesToTriFace verticesToTriFace);
31
32 TriFace getFace(std::size_t faceIndex) const override;
33
34private:
35 std::unique_ptr<Vertex[]> m_vertices;
36 std::size_t m_numVertices;
37 std::unique_ptr<Index[]> m_indices;
38 std::size_t m_numIndices;
39 VerticesToTriFace m_verticesToTriFace;
40};
41
42}// end namespace ph
43
Definition IndexedTriMesh.h:15
Definition TAosTriMesh.h:15
TriFace getFace(std::size_t faceIndex) const override
Definition TAosTriMesh.ipp:79
TAosTriMesh(std::vector< Vertex > vertices, std::vector< Index > indices, VerticesToTriFace verticesToTriFace)
Definition TAosTriMesh.ipp:19
Definition TriFace.h:15
The root for all renderer implementations.
Definition EEngineProject.h:6