Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
GIndexedTriangleMesh.h
Go to the documentation of this file.
1#pragma once
2
5#include "SDL/sdl_interface.h"
6
7namespace ph
8{
9
11{
12public:
13 void genPrimitive(
14 const PrimitiveBuildingMaterial& data,
15 std::vector<std::unique_ptr<Primitive>>& out_primitives) const override;
16
17private:
18 ResourceIdentifier m_meshFile;
19
20public:
22 {
23 ClassType clazz("indexed-triangle-mesh");
24 clazz.docName("Indexed Triangle Mesh");
25 clazz.description(
26 "A cluster of triangles forming a singe shape in 3-D space. Unlike basic `Triangle Mesh`, "
27 "this variant exploit redundancies in mesh vertices resulting in less memory usage in "
28 "most cases.");
29 clazz.baseOn<Geometry>();
30
31 TSdlResourceIdentifier<OwnerType> meshFile("mesh", &OwnerType::m_meshFile);
32 meshFile.description("File that stores the triangle mesh.");
33 meshFile.required();
34 clazz.addField(meshFile);
35
36 return clazz;
37 }
38};
39
40}// end namespace ph
Definition GIndexedTriangleMesh.h:11
void genPrimitive(const PrimitiveBuildingMaterial &data, std::vector< std::unique_ptr< Primitive > > &out_primitives) const override
Definition GIndexedTriangleMesh.cpp:10
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< GIndexedTriangleMesh >)
Definition GIndexedTriangleMesh.h:21
Definition Geometry.h:21
Definition PrimitiveBuildingMaterial.h:11
An general identifier that points to some resource. This is the most general form of a resource ident...
Definition ResourceIdentifier.h:20
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
A field class that binds a resource identifier member. Though the member type that is binded by defau...
Definition TSdlResourceIdentifier.h:28
The root for all renderer implementations.
Definition EEngineProject.h:6