Renders a mesh using a Toon shader.
More...
#include <toon.hpp>
|
| Toon (void) |
| Default constructor. More...
|
|
void | setQuantizationLevel (int level) |
| Set the quantization level. More...
|
|
int | getQuantizationLevel (void) |
| Returns the quantization level. More...
|
|
virtual void | initialize (void) |
| Load and initialize shaders. More...
|
|
virtual void | render (Tucano::Mesh &mesh, const Tucano::Camera &cameraTrackball, const Tucano::Camera &lightTrackball) |
| Render the mesh given a camera and light trackball, using a Toon shader. More...
|
|
| Effect (string shadersDir="shaders/") |
| Default constructor. More...
|
|
virtual Shader * | loadShader (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 Shader * | loadShader (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...
|
|
|
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...
|
|
Renders a mesh using a Toon shader.
Tucano::Effects::Toon::Toon |
( |
void |
| ) |
|
|
inline |
int Tucano::Effects::Toon::getQuantizationLevel |
( |
void |
| ) |
|
|
inline |
Returns the quantization level.
- Returns
- Quantization levels.
virtual void Tucano::Effects::Toon::initialize |
( |
void |
| ) |
|
|
inlinevirtual |
Render the mesh given a camera and light trackball, using a Toon shader.
- Parameters
-
mesh | Given mesh |
cameraTrackball | Given camera trackball |
lightTrackball | Given light trackball |
void Tucano::Effects::Toon::setQuantizationLevel |
( |
int |
level | ) |
|
|
inline |
Set the quantization level.
- Parameters
-
level | Number of quantization levels. |
float Tucano::Effects::Toon::quantization_level = 8 |
|
private |
Number of colors that will be used in color quantization to create the toonish effect.
The documentation for this class was generated from the following file: