~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

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