Photon Engine
2.0.0-beta
A physically based renderer.
Toggle main menu visibility
Home
Components
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
a
b
c
d
e
f
g
h
k
m
p
r
s
t
u
x
y
z
Typedefs
a
b
c
d
e
f
h
i
k
l
m
p
q
r
s
t
v
Enumerations
e
Enumerator
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
a
b
c
d
e
f
i
k
m
n
o
p
r
s
t
v
w
Enumerations
Related Symbols
Files
File List
File Members
All
b
c
f
i
k
m
p
s
Functions
Typedefs
Macros
▼
Photon Engine
Home
Components
►
Engine
►
Engine Directories
Bibliography
►
Namespaces
►
Concepts
►
Classes
▼
Files
▼
File List
Documentation
►
Include
▼
Source
▼
Actor
►
Basic
►
Dome
►
Geometry
►
Image
►
Light
▼
Material
►
Component
►
Volume
AbradedOpaque.cpp
►
AbradedOpaque.h
AbradedSurface.cpp
►
AbradedSurface.h
AbradedTranslucent.cpp
►
AbradedTranslucent.h
►
BinaryMixedSurfaceMaterial.cpp
►
BinaryMixedSurfaceMaterial.h
►
FullMaterial.cpp
►
FullMaterial.h
►
IdealSubstance.cpp
►
IdealSubstance.h
LayeredSurface.cpp
►
LayeredSurface.h
Material.cpp
►
Material.h
MatteOpaque.cpp
►
MatteOpaque.h
SurfaceMaterial.cpp
►
SurfaceMaterial.h
ThinDielectricSurface.cpp
►
ThinDielectricSurface.h
ThinFilm.cpp
►
ThinFilm.h
VolumeMaterial.cpp
►
VolumeMaterial.h
►
ModelParser
►
MotionSource
►
SDLExtension
►
Actor.cpp
►
Actor.h
►
ADome.cpp
►
ADome.h
AMaskedModel.cpp
►
AMaskedModel.h
►
AModel.cpp
►
AModel.h
APhantomModel.cpp
►
APhantomModel.h
►
ATransformedInstance.cpp
►
ATransformedInstance.h
ModelBuilder.cpp
ModelBuilder.h
ModelLoader.cpp
ModelLoader.h
PhysicalActor.cpp
►
PhysicalActor.h
StandaloneSdlResource.h
►
Api
►
Common
►
Core
►
DataIO
►
EngineEnv
►
Frame
►
Math
►
SDL
►
Utility
►
World
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
MatteOpaque.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Actor/Material/SurfaceMaterial.h
"
4
#include "
Actor/Image/Image.h
"
5
#include "
Math/math_fwd.h
"
6
#include "
SDL/sdl_interface.h
"
7
8
#include <memory>
9
10
namespace
ph
11
{
12
13
class
MatteOpaque
:
public
SurfaceMaterial
14
{
15
public
:
16
void
genSurface
(
const
CookingContext
& ctx,
SurfaceBehavior
& behavior)
const override
;
17
21
void
setAlbedo
(
const
math::Vector3R
& albedo);
22
25
void
setAlbedo
(
const
real r,
const
real g,
const
real b);
26
27
void
setAlbedo
(std::shared_ptr<Image> albedo);
28
29
private
:
33
static
std::shared_ptr<Image> makeConstantAlbedo(
const
math::Vector3R
& albedo);
34
35
std::shared_ptr<Image> m_albedo;
36
std::shared_ptr<Image> m_sigmaDegrees;
37
38
public
:
39
PH_DEFINE_SDL_CLASS
(
TSdlOwnerClass<MatteOpaque>
)
40
{
41
ClassType clazz(
"matte-opaque"
);
42
clazz.docName(
"Matte Opaque Material"
);
43
clazz.description(
"A material model for surfaces with matte look, such as chalk and moon."
);
44
clazz.baseOn<
SurfaceMaterial
>();
45
46
TSdlReference<Image, OwnerType>
albedo(
"albedo"
, &OwnerType::m_albedo);
47
albedo.description(
"An image or constant color that will be used for describing albedo."
);
48
clazz.addField(albedo);
49
50
TSdlReference<Image, OwnerType>
sigmaDegrees(
"sigma-degrees"
, &OwnerType::m_sigmaDegrees);
51
sigmaDegrees.
description
(
"Roughness in standard deviation of surface orientation (unit: degrees)."
);
52
sigmaDegrees.
optional
();
53
clazz.addField(sigmaDegrees);
54
55
return
clazz;
56
}
39
PH_DEFINE_SDL_CLASS
(
TSdlOwnerClass<MatteOpaque>
) {
…
}
57
};
13
class
MatteOpaque
:
public
SurfaceMaterial
{
…
};
58
59
}
// end namespace ph
Image.h
SurfaceMaterial.h
ph::CookingContext
Information about the world being cooked.
Definition
CookingContext.h:24
ph::MatteOpaque
Definition
MatteOpaque.h:14
ph::MatteOpaque::PH_DEFINE_SDL_CLASS
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< MatteOpaque >)
Definition
MatteOpaque.h:39
ph::MatteOpaque::genSurface
void genSurface(const CookingContext &ctx, SurfaceBehavior &behavior) const override
Definition
MatteOpaque.cpp:17
ph::MatteOpaque::setAlbedo
void setAlbedo(const math::Vector3R &albedo)
Definition
MatteOpaque.cpp:47
ph::SurfaceBehavior
Definition
SurfaceBehavior.h:15
ph::SurfaceMaterial
Definition
SurfaceMaterial.h:15
ph::TSdlOwnerClass
SDL binding type for a canonical SDL resource class.
Definition
TSdlOwnerClass.h:23
ph::TSdlReference
A value that points to a SDL resource.
Definition
TSdlReference.h:21
ph::TSdlReference::optional
TSdlReference & optional()
Definition
TSdlReference.ipp:214
ph::TSdlReference::description
TSdlReference & description(std::string descriptionStr)
Definition
TSdlReference.ipp:206
ph::math::TVector3< real >
math_fwd.h
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
sdl_interface.h
Source
Actor
Material
MatteOpaque.h
Generated by
1.11.0