Loading [MathJax]/extensions/TeX/AMSsymbols.js
Radium Engine
1.5.20
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
z
Functions
a
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
b
d
f
i
m
s
v
w
Typedefs
a
b
c
f
g
i
k
o
r
s
t
v
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Macros
▼
Radium Engine
►
Radium Basics
►
Radium Concepts
►
Developer manual
►
Licenses
Todo List
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
►
Core
▼
Engine
▼
Data
BlinnPhongMaterial.cpp
BlinnPhongMaterial.hpp
DisplayableObject.hpp
DrawPrimitives.cpp
DrawPrimitives.hpp
EnvironmentTexture.cpp
EnvironmentTexture.hpp
LambertianMaterial.cpp
LambertianMaterial.hpp
Material.cpp
Material.hpp
MaterialConverters.cpp
MaterialConverters.hpp
MaterialTextureSet.hpp
Mesh.cpp
Mesh.hpp
PlainMaterial.cpp
PlainMaterial.hpp
RawShaderMaterial.cpp
RawShaderMaterial.hpp
RenderParameters.cpp
RenderParameters.hpp
ShaderConfigFactory.cpp
ShaderConfigFactory.hpp
ShaderConfiguration.cpp
ShaderConfiguration.hpp
ShaderProgram.cpp
ShaderProgram.hpp
ShaderProgramManager.cpp
ShaderProgramManager.hpp
SimpleMaterial.cpp
SimpleMaterial.hpp
stb.cpp
Texture.cpp
Texture.hpp
TextureManager.cpp
TextureManager.hpp
ViewingParameters.hpp
VolumeObject.cpp
VolumeObject.hpp
VolumetricMaterial.cpp
VolumetricMaterial.hpp
►
Rendering
►
Scene
FrameInfo.hpp
OpenGL.hpp
pch.hpp
RadiumEngine.cpp
RadiumEngine.hpp
RaEngine.hpp
►
Gui
►
Headless
►
IO
►
PluginBase
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
SimpleMaterial.hpp
1
#pragma once
2
3
#include <Engine/RaEngine.hpp>
4
5
#include <Core/Utils/Color.hpp>
6
#include <Engine/Data/Material.hpp>
7
#include <Engine/Data/Texture.hpp>
8
9
#include <string>
10
11
namespace
Ra
{
12
namespace
Engine {
13
namespace
Data {
14
20
namespace
TextureSemantics {
22
enum class
SimpleMaterial
{ TEX_COLOR, TEX_MASK };
23
}
// namespace TextureSemantics
24
29
class
RA_ENGINE_API
SimpleMaterial
:
public
Material
,
30
public
ParameterSetEditingInterface
,
31
public
MaterialTextureSet
<TextureSemantics::SimpleMaterial>
32
{
33
public
:
34
using
TextureSemantic
=
TextureSemantics::SimpleMaterial
;
38
explicit
SimpleMaterial
(
const
std::string
& instanceName,
39
const
std::string
& materialName,
40
MaterialAspect
aspect = MaterialAspect::MAT_OPAQUE );
41
46
void
updateGL()
override
final
;
47
48
inline
void
setColoredByVertexAttrib(
bool
state )
override
;
49
50
inline
bool
isColoredByVertexAttrib
()
const override
{
return
m_perVertexColor; }
51
52
inline
void
setColor(
Core::Utils::Color
c ) {
53
m_color =
std::move
( c );
54
needUpdate();
55
}
56
57
protected
:
59
static
void
loadMetaData( nlohmann::json& destination );
60
61
private
:
64
void
updateRenderingParameters();
66
Core::Utils::Color
m_color { 0.9, 0.9, 0.9, 1.0 };
68
bool
m_perVertexColor {
false
};
69
};
29
class
RA_ENGINE_API
SimpleMaterial
:
public
Material
, {
…
};
70
71
inline
void
SimpleMaterial::setColoredByVertexAttrib
(
bool
state ) {
72
if
( state != m_perVertexColor ) {
73
m_perVertexColor = state;
74
needUpdate
();
75
}
76
}
71
inline
void
SimpleMaterial::setColoredByVertexAttrib
(
bool
state ) {
…
}
77
78
}
// namespace Data
79
}
// namespace Engine
80
}
// namespace Ra
std::string
Ra::Core::Utils::ColorBase< Scalar >
Ra::Engine::Data::MaterialTextureSet
Base class to manage a set of textures indexed by semantic (enum).
Definition
MaterialTextureSet.hpp:14
Ra::Engine::Data::Material
Base class for materials.
Definition
Material.hpp:24
Ra::Engine::Data::Material::needUpdate
void needUpdate()
Mark the Material as needing update before the next OpenGL call.
Definition
Material.hpp:98
Ra::Engine::Data::Material::MaterialAspect
MaterialAspect
Identifies the type of the material.
Definition
Material.hpp:31
Ra::Engine::Data::ParameterSetEditingInterface
Interface to define metadata (constraints, description, ...) for the editing of parameter set.
Definition
RenderParameters.hpp:149
Ra::Engine::Data::SimpleMaterial
Base implementation for simple, monocolored, materials.
Definition
SimpleMaterial.hpp:32
Ra::Engine::Data::SimpleMaterial::isColoredByVertexAttrib
bool isColoredByVertexAttrib() const override
Indicates if the material takes the VERTEX_COLOR attribute into account.
Definition
SimpleMaterial.hpp:50
Ra::Engine::Data::SimpleMaterial::setColoredByVertexAttrib
void setColoredByVertexAttrib(bool state) override
Makes the Material take its base color from the VERTEX_COLOR attribute of the rendered geometry.
Definition
SimpleMaterial.hpp:71
std::move
T move(T... args)
Ra::Engine::Data::TextureSemantics::SimpleMaterial
SimpleMaterial
SimpleMaterial's textures.
Definition
SimpleMaterial.hpp:22
Ra
hepler function to manage enum as underlying types in VariableSet
Definition
Cage.cpp:3
src
Engine
Data
SimpleMaterial.hpp
Generated by
1.12.0