Tucano  0.1
A library for rapid prototyping with modern OpenGL and GLSL
Tucano::Effects::OrenNayar Class Reference

Renders a mesh using a Oren-Nayar BRDF shader. More...

#include <orennayar.hpp>

Inheritance diagram for Tucano::Effects::OrenNayar:
Tucano::Effect

Public Member Functions

 OrenNayar (void)
 Default constructor. More...
 
virtual void initialize (void)
 Load and initialize shaders. More...
 
float getRoughnessCoeff (void)
 Get roughness coefficient. More...
 
void setRoughnessCoeff (float value)
 Set roughness coefficient. More...
 
void render (Tucano::Mesh &mesh, const Tucano::Camera &camera, const Tucano::Camera &light)
 Render the mesh given a camera and light, using a Oren Nayar brdf shader. More...
 
- Public Member Functions inherited from Tucano::Effect
 Effect (string shadersDir="shaders/")
 Default constructor. More...
 
virtual ShaderloadShader (string shader_name)
 Loads a shader by filename, initializes it, and inserts in shaders list. More...
 
virtual void loadShader (Shader &shader, string shader_name)
 
virtual ShaderloadShader (string shader_name, string vertex_name, string frag_name, string geom_name)
 Loads a shader by complete filenames (with extensions), initializes it, and inserts in shaders list. More...
 
void setShadersDir (string dir)
 
virtual void reloadShaders (void)
 Reloads all shaders needed for effect usage. More...
 

Private Attributes

Tucano::Shader orennayar_shader
 Phong Shader. More...
 
float roughness = 1.0
 Roughness coefficient, can be in range [0, inf) More...
 

Additional Inherited Members

- Protected Attributes inherited from Tucano::Effect
std::vector< Shader * > shaders_list
 Vector of pointers to shaders used in this effect, in case the user needs multiple pass rendering. More...
 
string shaders_dir
 Directory in which the shader files are stored. More...
 

Detailed Description

Renders a mesh using a Oren-Nayar BRDF shader.

Constructor & Destructor Documentation

Tucano::Effects::OrenNayar::OrenNayar ( void  )
inline

Default constructor.

Member Function Documentation

float Tucano::Effects::OrenNayar::getRoughnessCoeff ( void  )
inline

Get roughness coefficient.

Returns
Current roughness value (ro)
virtual void Tucano::Effects::OrenNayar::initialize ( void  )
inlinevirtual

Load and initialize shaders.

Implements Tucano::Effect.

void Tucano::Effects::OrenNayar::render ( Tucano::Mesh mesh,
const Tucano::Camera camera,
const Tucano::Camera light 
)
inline

Render the mesh given a camera and light, using a Oren Nayar brdf shader.

*

Parameters
meshGiven mesh
cameraGiven camera
lightTrackballGiven light camera
void Tucano::Effects::OrenNayar::setRoughnessCoeff ( float  value)
inline

Set roughness coefficient.

Parameters
valueNew roughness coeff (ro)

Member Data Documentation

Tucano::Shader Tucano::Effects::OrenNayar::orennayar_shader
private
float Tucano::Effects::OrenNayar::roughness = 1.0
private

Roughness coefficient, can be in range [0, inf)


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