diff --git a/apps/tutorials/pe/02_ConfinedGasExtended.dox b/apps/tutorials/pe/02_ConfinedGasExtended.dox index cbc7a572aa685feb0e50d43201d554d50220292e..89cd4a837becfdef61bc1c66212e73cafafb65f7 100644 --- a/apps/tutorials/pe/02_ConfinedGasExtended.dox +++ b/apps/tutorials/pe/02_ConfinedGasExtended.dox @@ -111,7 +111,7 @@ Raytracer raytracer(forest, storageID, globalBodyStorage, ccdID, lighting, Color(real_t(0.1), real_t(0.1), real_t(0.1)), radius, - customShadingFunction; + customShadingFunction); \endcode After the configuration is done, images can be generated each timestep by calling Raytracer::generateImage<BodyTuple>() which will be output to the specified directory. diff --git a/src/pe/raytracing/Lighting.h b/src/pe/raytracing/Lighting.h index 507eb255ea9c9b73dbfadd24a5cb1e8af3b065d0..ce2778c343b6ad08feae7dc9afbf495ce9d528bc 100644 --- a/src/pe/raytracing/Lighting.h +++ b/src/pe/raytracing/Lighting.h @@ -28,6 +28,8 @@ namespace walberla { namespace pe { namespace raytracing { +/*!\brief The Lighting struct defines the properties of a point light in the scene. + */ struct Lighting { Vec3 pointLightOrigin; Color diffuseColor; @@ -42,9 +44,9 @@ struct Lighting { /*!\brief Instantiation constructor for the Lighting struct. * \param pointLightOrigin Origin of the point light. - * \param diffuseColor Diffuse color. - * \param specularColor Specular color. - * \param ambientColor Color of the ambient light. + * \param diffuseColor Diffuse color (base color of the light). + * \param specularColor Specular color (color of light refractions on an objects surface). + * \param ambientColor Color of the ambient light in the scene. */ Lighting (const Vec3& _pointLightOrigin, const Color& _diffuseColor, const Color& _specularColor, const Color& _ambientColor) diff --git a/src/pe/raytracing/ShadingFunctions.h b/src/pe/raytracing/ShadingFunctions.h index 9fd267cc9138904d27064fc1ecbe95412dba6270..a4d22b5cc8b16ea414b5fb2d59dd27965b6be8c2 100644 --- a/src/pe/raytracing/ShadingFunctions.h +++ b/src/pe/raytracing/ShadingFunctions.h @@ -39,6 +39,7 @@ inline ShadingParameters lightGreyShadingParams (const BodyID body); inline ShadingParameters greyShadingParams (const BodyID body); inline ShadingParameters darkGreyShadingParams (const BodyID body); inline ShadingParameters redShadingParams (const BodyID body); +inline ShadingParameters greenShadingParams (const BodyID body); inline ShadingParameters blueShadingParams (const BodyID body); inline ShadingParameters violetShadingParams (const BodyID body); diff --git a/src/pe/raytracing/ShadingParameters.h b/src/pe/raytracing/ShadingParameters.h index c833f5f92b5984314e275617c5b6dd2fab21cf23..7d0930379729f0e9fd3a127a78bbcf7a4ac478d7 100644 --- a/src/pe/raytracing/ShadingParameters.h +++ b/src/pe/raytracing/ShadingParameters.h @@ -63,12 +63,17 @@ struct ShadingParameters { shininess = config.getParameter<real_t>("shininess"); } + /*!\brief Makes a rendered object shiny by setting the shininess and adjusting the specularColor. + * \param _shininess Shininess + */ ShadingParameters& makeGlossy(real_t _shininess = 30) { shininess = _shininess; specularColor.set(real_t(1), real_t(1), real_t(1)); return *this; } + /*!\brief Makes the rendered object matte by setting the shininess attribute to zero and adjusting the specularColor. + */ ShadingParameters& makeMatte() { shininess = 0; specularColor.set(real_t(0.1), real_t(0.1), real_t(0.1));