scenepic 1.1.0
3D Visualization Made Easy
|
Parameters of the shaders. More...
#include <shading.h>
Public Member Functions | |
Shading (const Color &bg_color=Color(0, 0, 0), const Color &ambient_light_color=Color(0.7f, 0.7f, 0.7f), const Color &directional_light_color=Color(0.3f, 0.3f, 0.3f), const Vector &directional_light_dir=Vector(2, 1, 2)) | |
Constructor. More... | |
Shading (const Color4 &bg_color, const Color &ambient_light_color, const Color &directional_light_color, const Vector &directional_light_dir) | |
Constructor. More... | |
const Color4 & | bg_color () const |
const Color & | ambient_light_color () const |
const Color & | directional_light_color () const |
const Vector & | directional_light_dir () const |
std::string | to_string () const |
Return a JSON string representing the object. More... | |
JsonValue | to_json () const |
Convert this object into ScenePic json. More... | |
bool | is_none () const |
Whether this is a "no shading" instance. More... | |
Static Public Member Functions | |
static const Shading | None () |
A Shading value indication "no shading". More... | |
Parameters of the shaders.
scenepic::Shading::Shading | ( | const Color & | bg_color = Color(0, 0, 0) , |
const Color & | ambient_light_color = Color(0.7f, 0.7f, 0.7f) , |
||
const Color & | directional_light_color = Color(0.3f, 0.3f, 0.3f) , |
||
const Vector & | directional_light_dir = Vector(2, 1, 2) |
||
) |
Constructor.
bg_color | background color |
ambient_light_color | color of ambient light |
directional_light_color | color of directional light |
directional_light_dir | direction of directional light |
scenepic::Shading::Shading | ( | const Color4 & | bg_color, |
const Color & | ambient_light_color, | ||
const Color & | directional_light_color, | ||
const Vector & | directional_light_dir | ||
) |
Constructor.
bg_color | background color (RGBA) |
ambient_light_color | color of ambient light |
directional_light_color | color of directional light |
directional_light_dir | direction of directional light |
const Color & scenepic::Shading::ambient_light_color | ( | ) | const |
const Color4 & scenepic::Shading::bg_color | ( | ) | const |
const Color & scenepic::Shading::directional_light_color | ( | ) | const |
const Vector & scenepic::Shading::directional_light_dir | ( | ) | const |
bool scenepic::Shading::is_none | ( | ) | const |
Whether this is a "no shading" instance.
JsonValue scenepic::Shading::to_json | ( | ) | const |
Convert this object into ScenePic json.
std::string scenepic::Shading::to_string | ( | ) | const |
Return a JSON string representing the object.