Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
LayeredSurface.h
Go to the documentation of this file.
1#pragma once
2
5#include "SDL/sdl_interface.h"
6
7#include <vector>
8
9namespace ph
10{
11
13{
14public:
16
17 void genSurface(const CookingContext& ctx, SurfaceBehavior& behavior) const override;
18
19 void addLayer();
20 void setLayer(std::size_t layerIndex, const SurfaceLayerInfo& layer);
21
22private:
23 std::vector<SurfaceLayerInfo> m_layers;
24
25public:
27 {
28 ClassType clazz("layered-surface");
29 clazz.docName("Layered Surface");
30 clazz.description("Model a surface as having multiple coating layers.");
31 clazz.baseOn<SurfaceMaterial>();
32
33 TSdlStructArray<SurfaceLayerInfo, OwnerType> layers("layers", &OwnerType::m_layers);
34 layers.description("Physical properties of each layer.");
35 layers.required();
36 clazz.addField(layers);
37
38 return clazz;
39 }
40};
41
42}// end namespace ph
Information about the world being cooked.
Definition CookingContext.h:24
Definition LayeredSurface.h:13
void setLayer(std::size_t layerIndex, const SurfaceLayerInfo &layer)
Definition LayeredSurface.cpp:43
void addLayer()
Definition LayeredSurface.cpp:38
void genSurface(const CookingContext &ctx, SurfaceBehavior &behavior) const override
Definition LayeredSurface.cpp:15
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< LayeredSurface >)
Definition LayeredSurface.h:26
LayeredSurface()
Definition LayeredSurface.cpp:10
Definition SurfaceBehavior.h:15
Definition SurfaceLayerInfo.h:15
Definition SurfaceMaterial.h:15
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
Definition TSdlStructArray.h:15
The root for all renderer implementations.
Definition EEngineProject.h:6