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

Renders a mesh with wireframe edges and flat faces in a single pass. More...

#include <wireframe.hpp>

Inheritance diagram for Tucano::Effects::Wireframe:
Tucano::Effect

Public Member Functions

 Wireframe (void)
 Default constructor. More...
 
virtual void initialize (void)
 Load and initialize shaders. More...
 
void setLineColor (const Eigen::Vector4f &color)
 Sets the line color. More...
 
void setEdgeThickness (float value)
 Set shininess exponent. More...
 
void render (Tucano::Mesh &mesh, const Tucano::Camera &camera, const Tucano::Camera &lightTrackball)
 Render the mesh given a camera and light, using a Wireframe 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 wireframe_shader
 Phong Shader. More...
 
Eigen::Vector4f line_color = Eigen::Vector4f (0.0, 0.0, 0.0, 1.0)
 Default color. More...
 
float thickness = 0.05
 Edge thickness. More...
 
bool draw_faces = true
 Flag to draw faces. 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 with wireframe edges and flat faces in a single pass.

Constructor & Destructor Documentation

Tucano::Effects::Wireframe::Wireframe ( void  )
inline

Default constructor.

Member Function Documentation

virtual void Tucano::Effects::Wireframe::initialize ( void  )
inlinevirtual

Load and initialize shaders.

Implements Tucano::Effect.

void Tucano::Effects::Wireframe::render ( Tucano::Mesh mesh,
const Tucano::Camera camera,
const Tucano::Camera lightTrackball 
)
inline

Render the mesh given a camera and light, using a Wireframe shader.

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

Set shininess exponent.

Parameters
Newshininess coeff (alpha)
void Tucano::Effects::Wireframe::setLineColor ( const Eigen::Vector4f &  color)
inline

Sets the line color.

Member Data Documentation

bool Tucano::Effects::Wireframe::draw_faces = true
private

Flag to draw faces.

Eigen::Vector4f Tucano::Effects::Wireframe::line_color = Eigen::Vector4f (0.0, 0.0, 0.0, 1.0)
private

Default color.

float Tucano::Effects::Wireframe::thickness = 0.05
private

Edge thickness.

Tucano::Shader Tucano::Effects::Wireframe::wireframe_shader
private

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