Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ADome.h
Go to the documentation of this file.
1#pragma once
2
7#include "Math/TVector2.h"
8#include "SDL/sdl_interface.h"
9
10#include <memory>
11
12namespace ph
13{
14
16{
18 bool isAnalytical = false;
19};
20
25class ADome : public PhysicalActor
26{
27public:
28 virtual std::shared_ptr<TTexture<math::Spectrum>> loadRadianceFunction(
29 const CookingContext& ctx, DomeRadianceFunctionInfo* out_info) const = 0;
30
31 PreCookReport preCook(const CookingContext& ctx) const override;
32 TransientVisualElement cook(const CookingContext& ctx, const PreCookReport& report) const override;
33 CookOrder getCookOrder() const override;
34
35private:
36 real m_energyScale;
37
38public:
40 {
41 ClassType clazz("dome");
42 clazz.docName("Dome Actor");
43 clazz.description("A large energy emitting source encompassing the whole scene.");
44 clazz.baseOn<PhysicalActor>();
45
46 TSdlReal<OwnerType> energyScale("energy-scale", &OwnerType::m_energyScale);
47 energyScale.description("A non-physical scale factor for artistic purpose.");
48 energyScale.defaultTo(1);
49 energyScale.optional();
50 clazz.addField(energyScale);
51
52 return clazz;
53 }
54};
55
56}// end namespace ph
An actor that models the sky of the scene. Model the sky in latitude-longitude format....
Definition ADome.h:26
PreCookReport preCook(const CookingContext &ctx) const override
Cooking supplemental data before cook(). This method allows user to specify additional configurations...
Definition ADome.cpp:26
virtual std::shared_ptr< TTexture< math::Spectrum > > loadRadianceFunction(const CookingContext &ctx, DomeRadianceFunctionInfo *out_info) const =0
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< ADome >)
Definition ADome.h:39
TransientVisualElement cook(const CookingContext &ctx, const PreCookReport &report) const override
Definition ADome.cpp:52
CookOrder getCookOrder() const override
Definition ADome.cpp:124
Controls the order actors are cooked.
Definition CookOrder.h:31
Information about the world being cooked.
Definition CookingContext.h:24
Definition PhysicalActor.h:18
Definition PreCookReport.h:13
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
A field class that binds a floating point member variable.
Definition TSdlReal.h:21
A group of cooked data that represent the visible part of the scene at a specific time....
Definition TransientVisualElement.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6
Definition ADome.h:16
math::Vector2S resolution
Definition ADome.h:17
bool isAnalytical
Definition ADome.h:18