10#include <Common/primitive_type.h>
28 SdlEnumType sdlEnum(
"ideal-substance");
29 sdlEnum.description(
"Type of the physical behavior of a perfectly smooth surface.");
31 sdlEnum.addEntry(EnumType::Absorber,
"absorber");
32 sdlEnum.addEntry(EnumType::DielectricReflector,
"dielectric-reflector");
33 sdlEnum.addEntry(EnumType::DielectricTransmitter,
"dielectric-transmitter");
34 sdlEnum.addEntry(EnumType::MetallicReflector,
"metallic-reflector");
35 sdlEnum.addEntry(EnumType::Dielectric,
"dielectric");
57 std::optional<math::Spectrum> m_iorInnerN;
58 std::optional<math::Spectrum> m_iorInnerK;
63 ClassType clazz(
"ideal-substance");
64 clazz.description(
"Models a perfectly smooth surface with various physical properties.");
65 clazz.docName(
"Ideal Substance Material");
69 substance.description(
"Specifying the physical property/behavior of the surface.");
72 clazz.addField(substance);
75 fresnel.
description(
"Type of the Fresnel for the interface.");
78 clazz.addField(fresnel);
81 iorOuter.
description(
"The index of refraction outside the surface.");
84 clazz.addField(iorOuter);
87 iorInner.
description(
"The index of refraction inside the surface.");
90 clazz.addField(iorInner);
94 "Surface reflectance on normal incidence. This value is expected "
95 "to be given in linear-sRGB space. When this parameter is used, "
96 "the underlying Fresnel model will be an approximated one (schlick) "
97 "which is pretty popular in real-time graphics.");
104 "A scaling factor for reflected energy. Note that this property is only for "
105 "artistic control and is not physically correct.");
108 clazz.addField(reflectionScale);
112 "A scaling factor for transmitted energy. Note that this property is only for "
113 "artistic control and is not physically correct.");
116 clazz.addField(transmissionScale);
119 iorInnerN.
description(
"The complex index of refraction (real part) inside the metallic interface.");
120 clazz.addField(iorInnerN);
123 iorInnerK.
description(
"The complex index of refraction (imaginary part) inside the metallic interface.");
124 clazz.addField(iorInnerK);
Information about the world being cooked.
Definition CookingContext.h:24
Definition IdealSubstance.h:41
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< IdealSubstance >)
Definition IdealSubstance.h:61
IdealSubstance()
Definition IdealSubstance.cpp:26
void genSurface(const CookingContext &ctx, SurfaceBehavior &behavior) const override
Definition IdealSubstance.cpp:41
void setSubstance(EIdealSubstance substance)
Definition IdealSubstance.cpp:138
Definition SurfaceBehavior.h:15
Definition SurfaceMaterial.h:15
Definition TSdlEnumField.h:23
SDL enum implementation with common features. Enum value and string mapping are done in a brute-force...
Definition TSdlGeneralEnum.h:26
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
Definition TSdlSpectrum.h:27
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
Definition TTristimulusSpectrum.h:11
The root for all renderer implementations.
Definition EEngineProject.h:6
EInterfaceFresnel
Definition sdl_component_enums.h:10
EIdealSubstance
Definition IdealSubstance.h:18
#define PH_DEFINE_SDL_ENUM(...)
Define a SDL enum with function-like syntax.
Definition sdl_interface.h:142