8 #ifndef META_OCEAN_SCENEDESCRIPTION_SDL_OBJ_MATERIAL_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDL_OBJ_MATERIAL_H
21 namespace SceneDescription
37 class OCEAN_SCENEDESCRIPTION_SDL_OBJ_EXPORT
Material
57 inline const std::string& name()
const;
63 inline const RGBAColor& ambientColor()
const;
69 inline const RGBAColor& diffuseColor()
const;
75 inline const RGBAColor& emissiveColor()
const;
81 inline const RGBAColor& specularColor()
const;
88 inline float transparency()
const;
94 inline const RGBAColor& transmissionFilter()
const;
106 inline Scalar specularExponent()
const;
112 inline const std::string& textureName()
const;
126 inline void setName(
const std::string& name);
132 inline void setAmbientColor(
const RGBAColor& color);
138 inline void setDiffuseColor(
const RGBAColor& color);
144 inline void setEmissiveColor(
const RGBAColor& color);
150 inline void setSpecularColor(
const RGBAColor& color);
157 inline void setTransparency(
const float transparency);
163 inline void setTransmissionFilter(
const RGBAColor& filter);
175 inline void setSpecularExponent(
const Scalar exponent);
181 inline void setTextureName(
const std::string& name);
201 float transparency_ = 0.0f;
This class implements a color defined by red, green, blue and alpha parameters.
Definition: RGBAColor.h:41
This class hold a material defined in a mtl obj material file.
Definition: scenedescription/sdl/obj/Material.h:38
void setEmissiveColor(const RGBAColor &color)
Sets the emissive color of this material.
Definition: scenedescription/sdl/obj/Material.h:284
void setSpecularColor(const RGBAColor &color)
Sets the specular color of this material.
Definition: scenedescription/sdl/obj/Material.h:289
RGBAColor emissiveColor_
Holds the emissive color of this material.
Definition: scenedescription/sdl/obj/Material.h:195
void setTransmissionFilter(const RGBAColor &filter)
Sets the transmission filter of this material.
Definition: scenedescription/sdl/obj/Material.h:299
RGBAColor diffuseColor_
Holds the diffuse color of this material.
Definition: scenedescription/sdl/obj/Material.h:192
void setTransparency(const float transparency)
Sets the transparency value of this material with range [0.0, 1.0].
Definition: scenedescription/sdl/obj/Material.h:294
void setDiffuseColor(const RGBAColor &color)
Sets the diffuse color of this material.
Definition: scenedescription/sdl/obj/Material.h:279
const RGBAColor & emissiveColor() const
Returns the emissive color of this material.
Definition: scenedescription/sdl/obj/Material.h:234
std::string name_
Holds the name of this material.
Definition: scenedescription/sdl/obj/Material.h:186
Rendering::AttributeSetRef attributeSet(const Rendering::EngineRef &engine, const SDLScene &scene)
Returns the attribute set of this material.
const RGBAColor & ambientColor() const
Returns the ambient color of this material.
Definition: scenedescription/sdl/obj/Material.h:224
float transparency() const
Returns the transparency of this material with range [0.0, 1.0] 0 means fully opaque,...
Definition: scenedescription/sdl/obj/Material.h:244
unsigned int IlluminationModel
Definition of illumination models.
Definition: scenedescription/sdl/obj/Material.h:44
void setSpecularExponent(const Scalar exponent)
Sets the specular exponent of this material.
Definition: scenedescription/sdl/obj/Material.h:309
IlluminationModel illuminationModel() const
Returns the illumination model of this material.
Definition: scenedescription/sdl/obj/Material.h:254
const std::string & textureName() const
Returns the texture name of this material.
Definition: scenedescription/sdl/obj/Material.h:264
Scalar specularExponent_
Holds the specular exponent of this material.
Definition: scenedescription/sdl/obj/Material.h:210
Material()=default
Creates a new material object with default values.
float transparency_
Holds the transparency value of this material with range [0 (opaque), 1 (transparent)].
Definition: scenedescription/sdl/obj/Material.h:201
std::string textureName_
Holds the texture name of this material.
Definition: scenedescription/sdl/obj/Material.h:213
void setAmbientColor(const RGBAColor &color)
Sets the ambient color of this material.
Definition: scenedescription/sdl/obj/Material.h:274
const RGBAColor & specularColor() const
Returns the specular color of this material.
Definition: scenedescription/sdl/obj/Material.h:239
void setIlluminationModel(const IlluminationModel model)
Sets the illumination model of this material.
Definition: scenedescription/sdl/obj/Material.h:304
RGBAColor transmissionFilter_
Holds the transmission filter of this material.
Definition: scenedescription/sdl/obj/Material.h:204
void setTextureName(const std::string &name)
Sets the texture name of this material.
Definition: scenedescription/sdl/obj/Material.h:314
Scalar specularExponent() const
Returns the specular exponent of this material.
Definition: scenedescription/sdl/obj/Material.h:259
const RGBAColor & transmissionFilter() const
Returns the transmission filter of this material.
Definition: scenedescription/sdl/obj/Material.h:249
RGBAColor specularColor_
Holds the specular color of this material.
Definition: scenedescription/sdl/obj/Material.h:198
RGBAColor ambientColor_
Holds the ambient color of this material.
Definition: scenedescription/sdl/obj/Material.h:189
void setName(const std::string &name)
Sets the name of this material.
Definition: scenedescription/sdl/obj/Material.h:269
IlluminationModel iIlluminationModel_
Holds the illumination model of this material, a diffuse illumination model by default.
Definition: scenedescription/sdl/obj/Material.h:207
const std::string & name() const
Returns the name of this material.
Definition: scenedescription/sdl/obj/Material.h:219
const RGBAColor & diffuseColor() const
Returns the diffuse color of this material.
Definition: scenedescription/sdl/obj/Material.h:229
Rendering::AttributeSetRef attributeSet_
Rendering attribute set.
Definition: scenedescription/sdl/obj/Material.h:216
This class implements the base class for all sdl scene object providing access to all elements of a s...
Definition: SDLScene.h:39
float Scalar
Definition of a scalar type.
Definition: Math.h:128
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15