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

#include <ShadingParameters.h>

Public Member Functions

 ShadingParameters ()
 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

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

Instantiation constructor for the Shading struct.

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.
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

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
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

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

Color the material has even when its not directly lit.

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

Primary color of the material.

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

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

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

Color the specular highlight has.


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