1
// ---------------------------------------------------------
6
// OpenGL rendering for a triangle mesh.
8
// ---------------------------------------------------------
10
#ifndef EL_TOPO_MESHRENDERER_H
11
#define EL_TOPO_MESHRENDERER_H
13
// ---------------------------------------------------------
15
// ---------------------------------------------------------
19
// ---------------------------------------------------------
20
// Forwards and typedefs
21
// ---------------------------------------------------------
25
// ---------------------------------------------------------
27
// ---------------------------------------------------------
29
// ---------------------------------------------------------
31
/// Mesh rendering object. Contains current rendering options and functions for doing OpenGL render of a mesh.
33
// ---------------------------------------------------------
44
render_fill_triangles( true ),
45
render_vertex_rank( false ),
46
smooth_shading( true ),
50
/// Whether to show mesh edges (wireframe)
54
/// Whether to render opaque triangles
56
bool render_fill_triangles;
58
/// Whether to render the primary-space rank for each vertex
60
bool render_vertex_rank;
62
/// Whether to use smooth or flat shading
66
/// Render both sides of the triangles
70
/// Display the surface in OpenGL using the current options settings
72
void render( const DynamicSurface& surface );
74
/// Display the specified geometry in OpenGL using the current options settings
76
void render(const std::vector<Vec3d>& xs,
77
const std::vector<Vec3d>& normals,
78
const std::vector<Vec3st>& triangles,
79
const std::vector<Vec2st>& edges );