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
3
#include "
Actor/PhysicalActor.h
"
4
#include "
DataIO/FileSystem/Path.h
"
5
#include "
Core/Texture/TTexture.h
"
6
#include "
Math/Color/Spectrum.h
"
7
#include "
Math/TVector2.h
"
8
#include "
SDL/sdl_interface.h
"
9
10
#include <memory>
11
12
namespace
ph
13
{
14
15
struct
DomeRadianceFunctionInfo
final
16
{
17
math::Vector2S
resolution
= {1, 1};
18
bool
isAnalytical
=
false
;
19
};
20
25
class
ADome
:
public
PhysicalActor
26
{
27
public
:
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
35
private
:
36
real m_energyScale;
37
38
public
:
39
PH_DEFINE_SDL_CLASS
(
TSdlOwnerClass<ADome>
)
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
Path.h
PhysicalActor.h
Spectrum.h
TTexture.h
TVector2.h
ph::ADome
An actor that models the sky of the scene. Model the sky in latitude-longitude format....
Definition
ADome.h:26
ph::ADome::preCook
PreCookReport preCook(const CookingContext &ctx) const override
Cooking supplemental data before cook(). This method allows user to specify additional configurations...
Definition
ADome.cpp:26
ph::ADome::loadRadianceFunction
virtual std::shared_ptr< TTexture< math::Spectrum > > loadRadianceFunction(const CookingContext &ctx, DomeRadianceFunctionInfo *out_info) const =0
ph::ADome::PH_DEFINE_SDL_CLASS
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< ADome >)
Definition
ADome.h:39
ph::ADome::cook
TransientVisualElement cook(const CookingContext &ctx, const PreCookReport &report) const override
Definition
ADome.cpp:52
ph::ADome::getCookOrder
CookOrder getCookOrder() const override
Definition
ADome.cpp:124
ph::CookOrder
Controls the order actors are cooked.
Definition
CookOrder.h:31
ph::CookingContext
Information about the world being cooked.
Definition
CookingContext.h:24
ph::PhysicalActor
Definition
PhysicalActor.h:18
ph::PreCookReport
Definition
PreCookReport.h:13
ph::TSdlOwnerClass
SDL binding type for a canonical SDL resource class.
Definition
TSdlOwnerClass.h:23
ph::TSdlReal
A field class that binds a floating point member variable.
Definition
TSdlReal.h:21
ph::TransientVisualElement
A group of cooked data that represent the visible part of the scene at a specific time....
Definition
TransientVisualElement.h:19
ph::math::TVector2< std::size_t >
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
sdl_interface.h
ph::DomeRadianceFunctionInfo
Definition
ADome.h:16
ph::DomeRadianceFunctionInfo::resolution
math::Vector2S resolution
Definition
ADome.h:17
ph::DomeRadianceFunctionInfo::isAnalytical
bool isAnalytical
Definition
ADome.h:18
Source
Actor
ADome.h
Generated by
1.11.0