~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/eltopo/eltopo3d/meshrenderer.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// ---------------------------------------------------------
2
 
//
3
 
//  meshrenderer.h
4
 
//  Tyson Brochu 2011
5
 
//  
6
 
//  OpenGL rendering for a triangle mesh.
7
 
//
8
 
// ---------------------------------------------------------
9
 
 
10
 
#ifndef EL_TOPO_MESHRENDERER_H
11
 
#define EL_TOPO_MESHRENDERER_H
12
 
 
13
 
// ---------------------------------------------------------
14
 
//  Nested includes
15
 
// ---------------------------------------------------------
16
 
 
17
 
#include <vec.h>
18
 
 
19
 
// ---------------------------------------------------------
20
 
//  Forwards and typedefs
21
 
// ---------------------------------------------------------
22
 
 
23
 
class DynamicSurface;
24
 
 
25
 
// ---------------------------------------------------------
26
 
//  Class definitions
27
 
// ---------------------------------------------------------
28
 
 
29
 
// ---------------------------------------------------------
30
 
///
31
 
/// Mesh rendering object.  Contains current rendering options and functions for doing OpenGL render of a mesh.
32
 
///
33
 
// ---------------------------------------------------------
34
 
 
35
 
class MeshRenderer
36
 
{
37
 
    
38
 
public:
39
 
    
40
 
    /// Constructor
41
 
    ///
42
 
    MeshRenderer() :
43
 
    render_edges( true ),
44
 
    render_fill_triangles( true ),
45
 
    render_vertex_rank( false ),
46
 
    smooth_shading( true ),
47
 
    two_sided( true )
48
 
    {}
49
 
    
50
 
    /// Whether to show mesh edges (wireframe)
51
 
    ///
52
 
    bool render_edges;
53
 
    
54
 
    /// Whether to render opaque triangles
55
 
    ///
56
 
    bool render_fill_triangles;
57
 
    
58
 
    /// Whether to render the primary-space rank for each vertex
59
 
    ///
60
 
    bool render_vertex_rank;
61
 
    
62
 
    /// Whether to use smooth or flat shading
63
 
    ///    
64
 
    bool smooth_shading;
65
 
 
66
 
    /// Render both sides of the triangles
67
 
    ///    
68
 
    bool two_sided;
69
 
    
70
 
    /// Display the surface in OpenGL using the current options settings
71
 
    ///
72
 
    void render( const DynamicSurface& surface );
73
 
 
74
 
    /// Display the specified geometry in OpenGL using the current options settings
75
 
    ///
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 );
80
 
    
81
 
    
82
 
};
83
 
 
84
 
 
85
 
#endif