Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
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_MESH_GROB_SHADER_H
41#define H_OGF_MESH_GFX_SHADERS_MESH_GROB_SHADER_H
42
43#include <OGF/mesh_gfx/common/common.h>
47
49
50
55
56namespace GEO {
57 class Image;
58}
59
60
61namespace OGF {
62
63 /**********************************************************/
64
65 class Builder;
66 class Texture;
67
68 enum CullingMode {NO_CULL, CULL_FRONT, CULL_BACK};
69
70 enum PaintingMode {SOLID_COLOR, ATTRIBUTE, COLOR, TEXTURE};
71
75 gom_attribute(abstract, "true")
76 gom_class MESH_GFX_API MeshGrobShader : public Shader {
77 public:
83
87 ~MeshGrobShader() override;
88
92 void draw() override;
93
100 virtual void pick(MeshElementsFlags what);
101
106 void pick_object(index_t object_id) override;
107
111 void blink() override;
112
116 virtual void show_vertices();
117
121 virtual void hide_vertices();
122
127
133
137 virtual void show_mesh();
138
142 virtual void hide_mesh();
143
147 virtual void show_borders();
148
152 virtual void hide_borders();
153
154 gom_properties:
155
163 bool get_has_edges() const {
164 return
165 mesh_grob() != nullptr &&
166 mesh_grob()->edges.nb() != 0;
167 }
168
176 bool get_has_facets() const {
177 return
178 mesh_grob() != nullptr &&
179 mesh_grob()->facets.nb() != 0;
180 }
181
189 bool get_has_cells() const {
190 return
191 mesh_grob() != nullptr &&
192 mesh_grob()->cells.nb() != 0;
193 }
194
203 bool get_is_hybrid() const {
204 return
205 mesh_grob() != nullptr &&
206 mesh_grob()->cells.nb() != 0 &&
207 !mesh_grob()->cells.are_simplices();
208 }
209
220 bool get_has_time() const {
221 return
222 mesh_grob() != nullptr &&
223 mesh_grob()->vertices.dimension() >= 6;
224 }
225
226 bool get_has_vertices_selection() const {
227 return mesh_grob() != nullptr &&
228 mesh_grob()->vertices.attributes().is_defined("selection");
229 }
230
231
232 bool get_has_weird_cells() const {
233 return mesh_grob() != nullptr &&
234 mesh_grob()->cells.attributes().is_defined("weird");
235 }
236
237 std::string get_scalar_attributes() const {
238 std::string result;
239 if(mesh_grob() != nullptr) {
240 result = mesh_grob()->get_scalar_attributes();
241 }
242 return result;
243 }
244
245 std::string get_vector_attributes() const {
246 std::string result;
247 if(mesh_grob() != nullptr) {
248 result = mesh_grob()->get_vector_attributes(3);
249 }
250 return result;
251 }
252
253 bool get_has_vertices_filter() const {
254 return
255 mesh_grob()->vertices.nb() != 0 &&
256 mesh_grob()->vertices.attributes().is_defined("filter") ;
257 }
258
259 bool get_has_edges_filter() const {
260 return
261 mesh_grob()->edges.nb() != 0 &&
262 mesh_grob()->edges.attributes().is_defined("filter") ;
263 }
264
265 bool get_has_facets_filter() const {
266 return
267 mesh_grob()->facets.nb() != 0 &&
268 mesh_grob()->facets.attributes().is_defined("filter") ;
269 }
270
271 bool get_has_cells_filter() const {
272 return
273 mesh_grob()->cells.nb() != 0 &&
274 mesh_grob()->cells.attributes().is_defined("filter") ;
275 }
276
277 protected:
283 return static_cast<MeshGrob*>(grob());
284 }
285 };
286
287 /****************************************************************/
288
292 gom_class MESH_GFX_API PlainMeshGrobShader : public MeshGrobShader {
293 public:
299
304
308 void draw() override;
309
313 void pick(MeshElementsFlags what) override;
314
318 void pick_object(index_t object_id) override;
319
323 void blink() override;
324
328 void show_vertices() override;
329
333 void hide_vertices() override;
334
338 void show_vertices_selection() override;
339
343 void hide_vertices_selection() override;
344
348 void show_mesh() override;
349
353 void hide_mesh() override;
354
358 void show_borders() override;
359
363 void hide_borders() override;
364
365 gom_properties:
366
372 bool get_attributes() const {
373 return (painting_mode_ == ATTRIBUTE);
374 }
375
376 gom_slots:
377
381 gom_attribute(visible_if, "attributes")
382 void autorange();
383
384
391 void set_time_smooth(double x) {
392 time_ = x;
393 update();
394 }
395
402 double get_time_smooth() const {
403 return time_;
404 }
405
406 gom_properties:
407
412 void set_painting(PaintingMode value);
413
418 PaintingMode get_painting() const {
419 return painting_mode_;
420 }
421
427 gom_attribute(visible_if, "attributes")
428 void set_attribute_min(double value) {
429 attribute_min_ = value;
430 update();
431 }
432
438 double get_attribute_min() const {
439 return attribute_min_;
440 }
441
447 gom_attribute(visible_if, "attributes")
448 void set_attribute_max(double value) {
449 attribute_max_ = value;
450 update();
451 }
452
458 double get_attribute_max() const {
459 return attribute_max_;
460 }
461
462
467 gom_attribute(visible_if, "attributes")
468 gom_attribute(handler, "combo_box")
469 gom_attribute(values, "$scalar_attributes")
470 void set_attribute(const std::string& value);
471
476 const std::string& get_attribute() const {
477 return attribute_;
478 }
479
484 gom_attribute(visible_if, "attributes")
485 void set_colormap(const ColormapStyle& value) {
486 colormap_style_ = value;
487 colormap_texture_.reset();
488 update();
489 }
490
491 const ColormapStyle& get_colormap() const {
492 return colormap_style_;
493 }
494
500 bool get_texturing() const {
501 return (painting_mode_ == TEXTURE);
502 }
503
509 bool get_coloring() const {
510 return (painting_mode_ == COLOR);
511 }
512
513
519 gom_attribute(visible_if, "texturing")
520 void set_tex_image(const ImageFileName& value) {
521 texture_filename_ = value;
522 texture_.reset();
523 update();
524 }
525
532 return texture_filename_;
533 }
534
539 gom_attribute(visible_if, "texturing")
540 gom_attribute(handler, "combo_box")
541 gom_attribute(values, "$vector_attributes")
542 void set_tex_coords(const std::string& value);
543
548 const std::string& get_tex_coords() const {
549 return tex_coord_attribute_;
550 }
551
552
557 gom_attribute(visible_if, "coloring")
558 gom_attribute(handler, "combo_box")
559 gom_attribute(values, "$vector_attributes")
560 void set_colors(const std::string& value) {
561 // It is an alias of tex_coord, because we use
562 // 3D texturing internally to display colors
563 // (it is stupid, but makes code simpler for now.
564 set_tex_coords(value);
565 }
566
571 const std::string& get_colors() const {
572 // It is an alias of tex_coord, because we use
573 // 3D texturing internally to display colors
574 // (it is stupid, but makes code simpler for now.
575 return get_tex_coords();
576 }
577
583 gom_attribute(visible_if, "texturing")
585 tex_coord_repeat_ = value;
586 update();
587 }
588
595 return tex_coord_repeat_;
596 }
597
598
599
605 gom_attribute(visible_if, "texturing")
606 void set_normal_map(bool value) {
607 tex_normal_mapping_ = value;
608 update();
609 }
610
616 bool get_normal_map() const {
617 return tex_normal_mapping_;
618 }
619
625 void set_lighting(bool value) {
626 gfx_.set_lighting(value);
627 update();
628 }
629
635 bool get_lighting() const {
636 return gfx_.get_lighting();
637 }
638
639
646 void set_clipping(bool value) {
647 clipping_ = value;
648 update();
649 }
650
657 bool get_clipping() const {
658 return clipping_;
659 }
660
661
666 gom_attribute(visible_if, "has_facets")
667 void set_surface_style(const SurfaceStyle& value) {
668 surface_style_ = value;
669 update();
670 }
671
677 return surface_style_;
678 }
679
684 gom_attribute(visible_if, "has_facets_filter")
685 void set_facets_filter(bool value) {
686 facets_filter_ = value;
687 gfx_.set_filter(
688 MESH_FACETS, value ? "filter" : ""
689 );
690 update();
691 }
692
693 bool get_facets_filter() const {
694 return facets_filter_;
695 }
696
701 gom_attribute(visible_if, "has_facets")
702 void set_culling_mode(const CullingMode value) {
703 culling_mode_ = value;
704 update();
705 }
706
711 CullingMode get_culling_mode() const {
712 return culling_mode_;
713 }
714
720 gom_attribute(visible_if, "has_facets or has_cells")
722 specular_ = x;
723 update();
724 }
725
731 return specular_;
732 }
733
745 gom_attribute(visible_if, "has_facets")
746 void set_two_sided(bool value) {
747 two_sided_ = value;
748 update();
749 }
750
756 bool get_two_sided() const {
757 return two_sided_;
758 }
759
765 gom_attribute(visible_if, "has_cells")
766 void set_volume_style(const SurfaceStyle& value) {
767 volume_style_ = value;
768 update();
769 }
770
778 return volume_style_;
779 }
780
781
786 gom_attribute(visible_if, "has_cells_filter")
787 void set_cells_filter(bool value) {
788 gfx_.set_filter(
789 MESH_CELLS, value ? "filter" : ""
790 );
791 cells_filter_ = value;
792 update();
793 }
794
795 bool get_cells_filter() const {
796 return cells_filter_;
797 }
798
799
806 gom_attribute(visible_if, "is_hybrid")
807 void set_colored_cells(bool value) {
808 colored_cells_ = value;
809 update();
810 }
811
817 bool get_colored_cells() const {
818 return colored_cells_;
819 }
820
821
827 gom_attribute(visible_if, "is_hybrid")
828 void set_tets(bool value) {
829 tets_ = value;
830 update();
831 }
832
838 bool get_tets() const {
839 return tets_;
840 }
841
847 gom_attribute(visible_if, "is_hybrid")
848 void set_hexes(bool value) {
849 hexes_ = value;
850 update();
851 }
852
858 bool get_hexes() const {
859 return hexes_;
860 }
861
862
868 gom_attribute(visible_if, "is_hybrid")
869 void set_prisms(bool value) {
870 prisms_ = value;
871 update();
872 }
873
879 bool get_prisms() const {
880 return prisms_;
881 }
882
883
889 gom_attribute(visible_if, "is_hybrid")
890 void set_pyramids(bool value) {
891 pyramids_ = value;
892 update();
893 }
894
900 bool get_pyramids() const {
901 return pyramids_;
902 }
903
904
910 gom_attribute(visible_if, "is_hybrid")
911 void set_connectors(bool value) {
912 connectors_ = value;
913 update();
914 }
915
921 bool get_connectors() const {
922 return connectors_;
923 }
924
930 gom_attribute(visible_if, "has_edges")
931 void set_edges_style(const EdgeStyle& value) {
932 edges_style_ = value;
933 update();
934 }
935
941 const EdgeStyle& get_edges_style() const {
942 return edges_style_;
943 }
944
945
953 gom_attribute(visible_if, "has_facets or has_cells")
954 void set_mesh_style(const EdgeStyle& value) {
955 mesh_style_ = value;
956 update();
957 }
958
966 const EdgeStyle& get_mesh_style() const {
967 return mesh_style_;
968 }
969
970
977 gom_attribute(visible_if, "has_facets")
978 void set_border_style(const EdgeStyle& value) {
979 border_style_ = value;
980 update();
981 }
982
990 return border_style_;
991 }
992
998 void set_vertices_style(const PointStyle& value) {
999 vertices_style_ = value;
1000 update();
1001 }
1002
1009 return vertices_style_;
1010 }
1011
1012
1017 gom_attribute(visible_if, "has_vertices_filter")
1018 void set_vertices_filter(bool value) {
1019 gfx_.set_filter(
1020 MESH_VERTICES, value ? "filter" : ""
1021 );
1022 vertices_filter_ = value;
1023 update();
1024 }
1025
1026 bool get_vertices_filter() const {
1027 return vertices_filter_;
1028 }
1029
1034 gom_attribute(visible_if, "has_edges_filter")
1035 void set_edges_filter(bool value) {
1036 edges_filter_ = value;
1037 gfx_.set_filter(
1038 MESH_EDGES, value ? "filter" : ""
1039 );
1040 update();
1041 }
1042
1043 bool get_edges_filter() const {
1044 return edges_filter_;
1045 }
1046
1047 gom_properties:
1048
1054 gom_attribute(visible_if, "has_vertices_selection")
1055 void set_vert_select_style(const PointStyle& value) {
1056 vertices_selection_style_ = value;
1058 }
1059
1065 return vertices_selection_style_;
1066 }
1067
1074 gom_attribute(visible_if, "has_cells")
1075 void set_shrink(index_t value) {
1076 gfx_.set_shrink(double(value)/10.0);
1077 update();
1078 }
1079
1087 return index_t(gfx_.get_shrink()*10.0);
1088 }
1089
1090
1101 gom_attribute(visible_if, "has_time")
1102 void set_animate(bool value) {
1103 animate_ = value;
1104 update();
1105 }
1106
1117 bool get_animate() const {
1118 return animate_;
1119 }
1120
1126 gom_attribute(visible_if, "has_time and animate")
1127 gom_attribute(handler, "slider_int")
1128 gom_attribute(min, "0")
1129 gom_attribute(max, "20")
1130 void set_time(index_t value) {
1131 time_ = double(value) / 20.0;
1132 update();
1133 }
1134
1140 return index_t(time_ * 20.0);
1141 }
1142
1143
1144 gom_attribute(visible_if, "has_cells")
1145 void set_slivers(double value) {
1146 slivers_ = value;
1147 update();
1148 }
1149
1150 double get_slivers() const {
1151 return slivers_;
1152 }
1153
1154 gom_attribute(visible_if, "has_weird_cells")
1155 void set_weird_cells(bool x) {
1156 weird_cells_ = x;
1157 update();
1158 }
1159
1160 bool get_weird_cells() const {
1161 return weird_cells_;
1162 }
1163
1164 bool get_glsl_source_visible() const {
1165 return false;
1166 }
1167
1168 gom_attribute(visible_if, "glsl_source_visible")
1169 void set_glsl_source(const std::string& value) {
1170 glsl_source_ = value;
1171 update_glsl_program();
1172 }
1173
1174 const std::string& get_glsl_source() const {
1175 return glsl_source_;
1176 }
1177
1178 public:
1179 void set_transparency(Transparency x) override;
1180
1181
1182 protected:
1183 void draw_slivers();
1184 void draw_weird_cells();
1185 void draw_surface_with_glsl_shader();
1186 void update_glsl_program();
1187
1188 protected:
1189 GEO::MeshGfx gfx_;
1190
1191 PaintingMode painting_mode_;
1192
1193 std::string attribute_;
1194 MeshElementsFlags attribute_subelements_;
1195 std::string attribute_name_;
1196 double attribute_min_;
1197 double attribute_max_;
1198 ColormapStyle colormap_style_;
1199 Texture_var colormap_texture_;
1200
1201 MeshElementsFlags tex_coord_subelements_;
1202 std::string tex_coord_attribute_;
1203 std::string tex_coord_name_;
1204 index_t tex_coord_repeat_;
1205 bool tex_normal_mapping_;
1206 Texture_var texture_;
1207 ImageFileName texture_filename_;
1208
1209 SurfaceStyle surface_style_;
1210 bool facets_filter_;
1211 CullingMode culling_mode_;
1212
1213 index_t specular_;
1214 bool two_sided_;
1215 SurfaceStyle volume_style_;
1216 bool cells_filter_;
1217 bool colored_cells_;
1218 bool tets_;
1219 bool hexes_;
1220 bool prisms_;
1221 bool pyramids_;
1222 bool connectors_;
1223 index_t shrink_;
1224 EdgeStyle edges_style_;
1225 EdgeStyle mesh_style_;
1226 EdgeStyle border_style_;
1227 PointStyle vertices_style_;
1228 bool vertices_filter_;
1229 bool edges_filter_;
1230 PointStyle vertices_selection_style_;
1231 bool animate_;
1232 double time_;
1233 bool picking_;
1234 double slivers_;
1235 bool weird_cells_;
1236 bool clipping_;
1237
1238 bool glsl_program_changed_;
1239 double glsl_start_time_;
1240 index_t glsl_frame_;
1241 std::string glsl_source_;
1242 GLuint glsl_program_;
1243 };
1244
1245 /**********************************************************/
1246
1250 gom_class MESH_GFX_API ExplodedViewMeshGrobShader :
1251 public PlainMeshGrobShader {
1252 public:
1258
1263
1264 gom_properties:
1265
1266 gom_attribute(handler, "combo_box")
1267 gom_attribute(values, "$scalar_attributes")
1268 void set_region(const std::string& value) {
1269 region_ = value;
1270 dirty_ = true;
1271 update();
1272 }
1273
1274 const std::string& get_region() const {
1275 return region_;
1276 }
1277
1278 void set_amount(index_t value) {
1279 amount_ = value;
1280 update();
1281 }
1282
1283 index_t get_amount() const {
1284 return amount_;
1285 }
1286
1287 public:
1288 void draw() override;
1289
1290 protected:
1291 bool dirty_;
1292 std::string region_;
1293 index_t amount_;
1294 int rgn_min_;
1295 int rgn_max_;
1296 vec3 bary_;
1297 vector<vec3> region_bary_;
1298 };
1299
1300 /**********************************************************/
1301
1302}
1303
1304#endif
An image.
Definition image.h:59
Draws a mesh using OpenGL.
Definition mesh_gfx.h:60
Vector with aligned memory allocation.
Definition memory.h:703
void draw() override
Draws the Grob.
~ExplodedViewMeshGrobShader() override
PlainMeshGrobShader destructor.
ExplodedViewMeshGrobShader(MeshGrob *grob)
PlainMeshGrobShader constructor.
virtual void hide_borders()
Makes surface borders invisible and triggers a drawing event.
virtual void hide_vertices()
Makes vertices invisible and triggers a drawing event.
virtual void show_borders()
Makes surface borders visible and triggers a drawing event.
void pick_object(index_t object_id) override
Draws the Grob in picking mode.
MeshGrobShader(MeshGrob *grob)
MeshGrobShader constructor.
bool get_has_cells() const
Tests whether the MeshGrob attached to this shader has cells.
virtual void hide_mesh()
Makes the mesh invisible and triggers a drawing event.
virtual void show_mesh()
Makes the mesh visible and triggers a drawing event.
virtual void show_vertices()
Makes vertices visible and triggers a drawing event.
virtual void show_vertices_selection()
Makes vertices selection visible and triggers a drawing event.
virtual void pick(MeshElementsFlags what)
Picks an element of a mesh.
void blink() override
Draws the current object several times, while chaning the value of one graphic attribute (e....
bool get_has_time() const
Tests whether the MeshGrob attached to this shader stores a time evolution.
MeshGrob * mesh_grob() const
Gets the MeshGrob.
virtual void hide_vertices_selection()
Makes vertices selection invisible and triggers a drawing event.
bool get_is_hybrid() const
Tests whether the MeshGrob attached to this shader is a volumetric hybrid mesh.
void draw() override
Draws the Grob.
~MeshGrobShader() override
MeshGrobShader destructor.
bool get_has_facets() const
Tests whether the MeshGrob attached to this shader has facets.
A Grob wrapper around Geogram's Mesh class.
Definition mesh_grob.h:56
void set_colors(const std::string &value)
Sets the name fo the color attribute to be displayed.
void set_shrink(index_t value)
Sets the shrinking coefficient of the volumetric cells.
const SurfaceStyle & get_volume_style() const
Gets the style used to draw the volumetric cells.
void set_border_style(const EdgeStyle &value)
Sets the style used to draw the border of the surface.
~PlainMeshGrobShader() override
PlainMeshGrobShader destructor.
const EdgeStyle & get_mesh_style() const
Gets the style used to draw the mesh in the facets and in the cells.
void set_cells_filter(bool value)
Sets cells filtering.
void blink() override
Draws the current object several times, while chaning the value of one graphic attribute (e....
bool get_clipping() const
Gets whether clipping should be used.
index_t get_specular() const
Gets the current surface specular factor.
void hide_mesh() override
Makes the mesh invisible and triggers a drawing event.
bool get_tets() const
Tests whether tetrahedra are displayed.
const std::string & get_attribute() const
Gets the name of the displayed attribute.
void hide_borders() override
Makes surface borders invisible and triggers a drawing event.
bool get_texturing() const
Tests whether texturing is active.
void set_tets(bool value)
Sets whether tetrahedra should be displayed.
void set_edges_style(const EdgeStyle &value)
Sets the style used to draw the edges.
void set_hexes(bool value)
Sets whether hexahedra should be displayed.
void show_mesh() override
Makes the mesh visible and triggers a drawing event.
bool get_coloring() const
Tests whether coloring is active.
bool get_hexes() const
Tests whether hexahedra are displayed.
void set_connectors(bool value)
Sets whether connectors should be displayed.
void set_specular(index_t x)
Sets the current surface specular factor.
PlainMeshGrobShader(MeshGrob *grob)
PlainMeshGrobShader constructor.
PaintingMode get_painting() const
Gets painting mode.
void hide_vertices() override
Makes vertices invisible and triggers a drawing event.
index_t get_time() const
Gets the time parameter used for time interpolation.
const ImageFileName & get_tex_image() const
Gets the image used for texturing.
void set_surface_style(const SurfaceStyle &value)
Sets surface drawing style.
bool get_colored_cells() const
Tests whether volumetric cells are colored by type.
void show_borders() override
Makes surface borders visible and triggers a drawing event.
double get_attribute_min() const
Gets the minimum of the displayed range for attribute values.
void set_lighting(bool value)
Sets whether lighting should be used.
const EdgeStyle & get_edges_style() const
Gets the style used to draw the edges.
void set_prisms(bool value)
Sets whether prisms should be displayed.
void set_animate(bool value)
Sets whether time interpolation should be used.
void set_tex_image(const ImageFileName &value)
Sets the image used for texturing.
void show_vertices() override
Makes vertices visible and triggers a drawing event.
void draw() override
Draws the Grob.
const SurfaceStyle & get_surface_style() const
Gets the current surface drawing style.
bool get_lighting() const
Gets whether lighting is used.
const std::string & get_tex_coords() const
Gets the name of the displayed attribute.
index_t get_shrink() const
Gets the shrinking coefficient of the volumetric cells.
void set_pyramids(bool value)
Sets whether pyramids should be displayed.
bool get_normal_map() const
Gets normal mapping mode.
void show_vertices_selection() override
Makes vertices selection visible and triggers a drawing event.
bool get_two_sided() const
Tests whether different colors are used for inside/outside.
void set_edges_filter(bool value)
Sets edge filtering.
void pick(MeshElementsFlags what) override
Picks an element of a mesh.
bool get_animate() const
Tests whether time interpolation should be used.
void set_two_sided(bool value)
Sets whether different colors should be used for inside/outside.
bool get_pyramids() const
Tests whether pyramids are displayed.
void set_colored_cells(bool value)
Sets whether volumetric cells should be colored by type.
void set_attribute_min(double value)
Sets the minimum of the displayed range for attribute values.
double get_attribute_max() const
Gets the maximum of the displayed range for attribute values.
const PointStyle & get_vert_select_style() const
Gets the vertices selection style.
void set_time_smooth(double x)
Sets the time with a floating point parameter.
void pick_object(index_t object_id) override
Draws the Grob in picking mode.
bool get_prisms() const
Tests whether prisms are displayed.
void set_time(index_t value)
Sets the time parameter used for time interpolation.
void set_attribute(const std::string &value)
Sets the name fo the attribute to be displayed.
CullingMode get_culling_mode() const
Gets the current culling mode.
const std::string & get_colors() const
Gets the name of the displayed attribute.
void set_volume_style(const SurfaceStyle &value)
Sets the style of the volumetric cells.
bool get_connectors() const
Tests whether connectors are displayed.
double get_time_smooth() const
Gets the time as floating point parameter.
void set_tex_repeat(index_t value)
Sets the texture repeat factor.
const PointStyle & get_vertices_style() const
Gets the style used to draw the vertices.
const EdgeStyle & get_border_style() const
Gets the style used to draw the border of the surface.
void set_vertices_filter(bool value)
Sets vertices filtering.
void set_normal_map(bool value)
Sets normal mapping mode.
void set_colormap(const ColormapStyle &value)
Sets the colormap used to display attributes.
index_t get_tex_repeat() const
Gets the texture repeat factor.
void set_mesh_style(const EdgeStyle &value)
Sets the style used to draw the mesh in the facets and in the cells.
void set_vertices_style(const PointStyle &value)
Sets the style used to draw the vertices.
void set_attribute_max(double value)
Sets the maximum of the displayed range for attribute values.
void set_tex_coords(const std::string &value)
Sets the name fo the attribute to be displayed.
void hide_vertices_selection() override
Makes vertices selection invisible and triggers a drawing event.
void set_transparency(Transparency x) override
Transparent rendering mode.
void set_facets_filter(bool value)
Sets facet filtering.
update()
Redraws the scene.
void set_clipping(bool value)
Sets whether clipping should be active.
void set_culling_mode(const CullingMode value)
Sets culling mode;.
Shader(Grob *grob)
Shader constructor.
Grob * grob() const
Gets the Grob.
Definition shader.h:196
An OpenGL texture.
Definition texture.h:56
A class to display a mesh using OpenGL/GLUP.
the MeshGrob class.
Global Vorpaline namespace.
vecng< 3, Numeric::float64 > vec3
Represents points and vectors in 3d.
Definition geometry.h:65
geo_index_t index_t
The type for storing and manipulating indices.
Definition numeric.h:341
Global Graphite namespace.
Definition common.h:76
Name< File< Image * > > ImageFileName
The name of an existing file that contains an Image.
Definition properties.h:339
The base class for all object shaders.
The style used to display colormapped colors.
Definition properties.h:433
Drawing style for mesh edges.
Definition properties.h:95
Drawing style for points.
Definition properties.h:64
Drawing style for polygons.
Definition properties.h:127