cpe::opengl_drawer Class Reference

Helper class for OpenGL calls. More...

List of all members.

Static Public Member Functions

static void draw (const mesh &m, const std::vector< v3 > &normal)
 draw mesh with given normals
static void draw (const mesh &m)
 draw mesh (without normal information: only draw edges)
static void draw (const grid &g)
 draw grid
static void draw (const surface_param_drawable &surf)
 draw surface parametric
static void draw_curve (const std::vector< std::vector< cpe::v3 > > &curves)
 draw curves
static void draw_normals (const mesh &m, const std::vector< v3 > &normal, const double &L_scaling=1.0)
 draw normal associated to a given mesh
static void generate_texture (const unsigned int &id_texture, const std::string &filename)
 generate a texture identifiant from a data vector

Static Private Member Functions

static void draw_edges (const mesh &m)
 draw mesh edges only
static void draw_per_polygon_normal (const mesh &m, const std::vector< v3 > &normal)
 draw mesh with polygon per triangle
static void draw_per_vertex_normal (const mesh &m, const std::vector< v3 > &normal)
 draw mesh with polygon per vertex

Detailed Description

Helper class for OpenGL calls.


Member Function Documentation

void cpe::opengl_drawer::draw ( const surface_param_drawable surf  )  [static]
void cpe::opengl_drawer::draw ( const grid g  )  [static]

draw grid

References cpe::grid::size_u(), cpe::grid::size_v(), and cpe::v3::x().

Here is the call graph for this function:

void cpe::opengl_drawer::draw ( const mesh m  )  [static]

draw mesh (without normal information: only draw edges)

References draw_edges().

Here is the call graph for this function:

void cpe::opengl_drawer::draw ( const mesh m,
const std::vector< v3 > &  normal 
) [static]

draw mesh with given normals

Parameters:
mesh m: the mesh
std::vector<double> normal: the normal of the meshes Normal size must be either vertex_number():smooth shading or triangle_number():flat shading

References draw_per_polygon_normal(), draw_per_vertex_normal(), cpe::mesh::triangle_number(), and cpe::mesh::vertex_number().

Here is the call graph for this function:

void cpe::opengl_drawer::draw_curve ( const std::vector< std::vector< cpe::v3 > > &  curves  )  [static]

draw curves

References cpe::v3::x(), cpe::v3::y(), and cpe::v3::z().

Here is the call graph for this function:

void cpe::opengl_drawer::draw_edges ( const mesh m  )  [static, private]

draw mesh edges only

References cpe::mesh::get_connectivity(), cpe::mesh::get_vertex(), cpe::mesh::triangle_number(), and cpe::v3::x().

Referenced by draw().

Here is the call graph for this function:

void cpe::opengl_drawer::draw_normals ( const mesh m,
const std::vector< v3 > &  normal,
const double &  L_scaling = 1.0 
) [static]

draw normal associated to a given mesh

Parameters:
mesh m: the mesh
std::vector<double> normal: the per_face or per_vertex normal
L_scaling,: scale the normal size

References cpe::mesh::get_vertex(), cpe::mesh::triangle_number(), cpe::mesh::vertex_number(), cpe::v3::x(), cpe::v3::y(), and cpe::v3::z().

Here is the call graph for this function:

void cpe::opengl_drawer::draw_per_polygon_normal ( const mesh m,
const std::vector< v3 > &  normal 
) [static, private]

draw mesh with polygon per triangle

References cpe::mesh::get_connectivity(), cpe::mesh::get_texture(), cpe::mesh::get_vertex(), cpe::mesh::triangle_number(), cpe::mesh::vertex_number(), and cpe::v3::x().

Referenced by draw().

Here is the call graph for this function:

void cpe::opengl_drawer::draw_per_vertex_normal ( const mesh m,
const std::vector< v3 > &  normal 
) [static, private]

draw mesh with polygon per vertex

References cpe::mesh::get_connectivity(), cpe::mesh::get_texture(), cpe::mesh::get_vertex(), cpe::mesh::triangle_number(), cpe::mesh::vertex_number(), and cpe::v3::x().

Referenced by draw().

Here is the call graph for this function:

void cpe::opengl_drawer::generate_texture ( const unsigned int &  id_texture,
const std::string &  filename 
) [static]

generate a texture identifiant from a data vector

References cpe::texture::get_data(), cpe::texture::get_Nx(), cpe::texture::get_Ny(), and cpe::texture::load_picture().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Feb 27 18:30:21 2012 by  doxygen 1.6.3