Graphite  Version 3
An experimental 3D geometry processing program
param_mesh_grob_shader.h
Go to the documentation of this file.
1 /*
2  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000-2009 INRIA - Project ALICE
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * If you modify this software, you should include a notice giving the
20  * name of the person performing the modification, the date of modification,
21  * and the reason for such modification.
22  *
23  * Contact: Bruno Levy - levy@loria.fr
24  *
25  * Project ALICE
26  * LORIA, INRIA Lorraine,
27  * Campus Scientifique, BP 239
28  * 54506 VANDOEUVRE LES NANCY CEDEX
29  * FRANCE
30  *
31  * Note that the GNU General Public License does not permit incorporating
32  * the Software into proprietary programs.
33  *
34  * As an exception to the GPL, Graphite can be linked with
35  * the following (non-GPL) libraries:
36  * Qt, SuperLU, WildMagic and CGAL
37  */
38 
39 
40 #ifndef H_OGF_MESH_GFX_SHADERS_PARAM_MESH_GROB_SHADER_H
41 #define H_OGF_MESH_GFX_SHADERS_PARAM_MESH_GROB_SHADER_H
42 
43 #include <OGF/mesh_gfx/common/common.h>
45 
51 namespace OGF {
55  gom_class MESH_GFX_API ParamMeshGrobShader : public MeshGrobShader {
56  public:
62 
67 
71  void draw() override;
72 
73  gom_properties:
74 
79  gom_attribute(visible_if, "has_facets")
80  void set_surface_style(const SurfaceStyle& value) {
81  surface_style_ = value;
82  update();
83  }
84 
90  return surface_style_;
91  }
92 
100  gom_attribute(visible_if, "has_facets or has_cells")
101  void set_mesh_style(const EdgeStyle& value) {
102  mesh_style_ = value;
103  update();
104  }
105 
113  const EdgeStyle& get_mesh_style() const {
114  return mesh_style_;
115  }
116 
117  private:
118  SurfaceStyle surface_style_;
119  EdgeStyle mesh_style_;
120  };
121 
122 }
123 
124 #endif
Base class for drawing and picking MeshGrob.
A Grob wrapper around Geogram's Mesh class.
Definition: mesh_grob.h:56
A MeshGrobShader to display parameter space.
update()
Redraws the scene.
const EdgeStyle & get_mesh_style() const
Gets the style used to draw the mesh in the facets and in the cells.
~ParamMeshGrobShader() override
PlainMeshGrobShader destructor.
const SurfaceStyle & get_surface_style() const
Gets the current surface drawing style.
void draw() override
Draws the Grob.
ParamMeshGrobShader(MeshGrob *grob)
PlainMeshGrobShader constructor.
Classes for drawing and picking MeshGrob.
Global Graphite namespace.
Definition: common.h:76
Drawing style for mesh edges.
Definition: properties.h:115
Drawing style for polygons.
Definition: properties.h:167