walberla::pe::raytracing::ShadingParameters Struct Reference

#include <ShadingParameters.h>

Public Member Functions

 ShadingParameters ()=default
 Instantiation constructor for the Shading struct. More...
 
 ShadingParameters (const Color &_diffuseColor, const Color &_ambientColor, const Color &_specularColor, real_t _shininess)
 Instantiation constructor for the Shading struct. More...
 
 ShadingParameters (const Config::BlockHandle &config)
 Instantiation constructor for the Shading struct. More...
 
ShadingParametersmakeGlossy (real_t _shininess=30)
 Makes a rendered object shiny by setting the shininess and adjusting the specularColor. More...
 
ShadingParametersmakeMatte ()
 Makes the rendered object matte by setting the shininess attribute to zero and adjusting the specularColor. More...
 

Public Attributes

Color diffuseColor
 Primary color of the material. More...
 
Color ambientColor
 Color the material has even when its not directly lit. More...
 
Color specularColor
 Color the specular highlight has. More...
 
real_t shininess
 How shiny a material is (approximate range is between 1 and 100). More...
 

Constructor & Destructor Documentation

◆ ShadingParameters() [1/3]

walberla::pe::raytracing::ShadingParameters::ShadingParameters ( )
default

Instantiation constructor for the Shading struct.

◆ ShadingParameters() [2/3]

walberla::pe::raytracing::ShadingParameters::ShadingParameters ( const Color _diffuseColor,
const Color _ambientColor,
const Color _specularColor,
real_t  _shininess 
)
inline

Instantiation constructor for the Shading struct.

Parameters
_diffuseColorPrimary color of the material.
_ambientColorColor the material has even when its not directly lit.
_specularColorColor this material contributes to on its specular highlights.
_shininessShininess of the material.

◆ ShadingParameters() [3/3]

walberla::pe::raytracing::ShadingParameters::ShadingParameters ( const Config::BlockHandle config)
inline

Instantiation constructor for the Shading struct.

Parameters
configConfig handle.

Config has to contain diffuseColor (Color), ambientColor (Color), specularColor (Color), shininess (real_t). Colors are Vec3's with values from 0 to 1.

Member Function Documentation

◆ makeGlossy()

ShadingParameters& walberla::pe::raytracing::ShadingParameters::makeGlossy ( real_t  _shininess = 30)
inline

Makes a rendered object shiny by setting the shininess and adjusting the specularColor.

Parameters
_shininessShininess

◆ makeMatte()

ShadingParameters& walberla::pe::raytracing::ShadingParameters::makeMatte ( )
inline

Makes the rendered object matte by setting the shininess attribute to zero and adjusting the specularColor.

Member Data Documentation

◆ ambientColor

Color walberla::pe::raytracing::ShadingParameters::ambientColor

Color the material has even when its not directly lit.

◆ diffuseColor

Color walberla::pe::raytracing::ShadingParameters::diffuseColor

Primary color of the material.

◆ shininess

real_t walberla::pe::raytracing::ShadingParameters::shininess

How shiny a material is (approximate range is between 1 and 100).

◆ specularColor

Color walberla::pe::raytracing::ShadingParameters::specularColor

Color the specular highlight has.


The documentation for this struct was generated from the following file: