54#include "ACG/Scenegraph/DrawModes.hh"
55#include "DrawModeConverter.hh"
63 std::vector< QString > draw_modes;
66 draw_modes.push_back(
"DEFAULT");
68 draw_modes.push_back(
"SOLID_SMOOTH_SHADED");
70 draw_modes.push_back(
"HIDDENLINE");
72 draw_modes.push_back(
"WIREFRAME");
74 draw_modes.push_back(
"POINTS");
76 draw_modes.push_back(
"POINTS_COLORED");
78 draw_modes.push_back(
"POINTS_SHADED");
80 draw_modes.push_back(
"SOLID_FLAT_SHADED");
82 draw_modes.push_back(
"SOLID_PHONG_SHADED");
84 draw_modes.push_back(
"SOLID_FACES_COLORED");
86 draw_modes.push_back(
"SOLID_POINTS_COLORED");
88 draw_modes.push_back(
"SOLID_POINTS_COLORED_SHADED");
90 draw_modes.push_back(
"SOLID_ENV_MAPPED");
92 draw_modes.push_back(
"SOLID_TEXTURED");
94 draw_modes.push_back(
"SOLID_TEXTURED_SHADED");
96 draw_modes.push_back(
"SOLID_1DTEXTURED");
98 draw_modes.push_back(
"SOLID_1DTEXTURED_SHADED");
100 draw_modes.push_back(
"SOLID_3DTEXTURED");
102 draw_modes.push_back(
"SOLID_3DTEXTURED_SHADED");
104 draw_modes.push_back(
"SOLID_FACES_COLORED_FLAT_SHADED");
106 draw_modes.push_back(
"SOLID_FACES_COLORED_SMOOTH_SHADED");
108 draw_modes.push_back(
"SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED");
110 draw_modes.push_back(
"SOLID_2DTEXTURED_FACE");
112 draw_modes.push_back(
"SOLID_2DTEXTURED_FACE_SHADED");
114 draw_modes.push_back(
"SOLID_SHADER");
116 draw_modes.push_back(
"SOLID_SMOOTH_SHADED_FEATURES");
126 for ( uint i = 0 ; i < _draw_modes.size() ; ++i ) {
127 if( _draw_modes[i] ==
"DEFAULT" ) {
129 }
else if( _draw_modes[i] ==
"SOLID_SMOOTH_SHADED" ) {
131 }
else if( _draw_modes[i] ==
"HIDDENLINE" ) {
133 }
else if( _draw_modes[i] ==
"WIREFRAME" ) {
135 }
else if( _draw_modes[i] ==
"POINTS" ) {
137 }
else if( _draw_modes[i] ==
"POINTS_COLORED" ) {
139 }
else if( _draw_modes[i] ==
"POINTS_SHADED" ) {
141 }
else if( _draw_modes[i] ==
"SOLID_FLAT_SHADED" ) {
143 }
else if( _draw_modes[i] ==
"SOLID_PHONG_SHADED" ) {
145 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED" ) {
147 }
else if( _draw_modes[i] ==
"SOLID_POINTS_COLORED" ) {
149 }
else if( _draw_modes[i] ==
"SOLID_POINTS_COLORED_SHADED" ) {
151 }
else if( _draw_modes[i] ==
"SOLID_ENV_MAPPED" ) {
153 }
else if( _draw_modes[i] ==
"SOLID_TEXTURED" ) {
155 }
else if( _draw_modes[i] ==
"SOLID_TEXTURED_SHADED" ) {
157 }
else if( _draw_modes[i] ==
"SOLID_1DTEXTURED" ) {
159 }
else if( _draw_modes[i] ==
"SOLID_1DTEXTURED_SHADED" ) {
161 }
else if( _draw_modes[i] ==
"SOLID_3DTEXTURED" ) {
163 }
else if( _draw_modes[i] ==
"SOLID_3DTEXTURED_SHADED" ) {
165 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED_FLAT_SHADED" ) {
167 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED_SMOOTH_SHADED" ) {
169 }
else if (_draw_modes[i] ==
"SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED") {
171 }
else if (_draw_modes[i] ==
"SOLID_2DTEXTURED_FACE") {
173 }
else if( _draw_modes[i] ==
"SOLID_2DTEXTURED_FACE_SHADED" ) {
175 }
else if( _draw_modes[i] ==
"SOLID_SHADER" ) {
177 }
else if( _draw_modes[i] ==
"SOLID_SMOOTH_SHADED_FEATURES" ) {
193 for ( uint i = 0 ; i < _draw_modes.size() ; ++i ) {
194 if( _draw_modes[i] ==
"Default" ) {
196 }
else if( _draw_modes[i] ==
"Solid (smooth shaded)" ) {
198 }
else if( _draw_modes[i] ==
"Hiddenline" ) {
200 }
else if( _draw_modes[i] ==
"Wireframe" ) {
202 }
else if( _draw_modes[i] ==
"Points" ) {
204 }
else if( _draw_modes[i] ==
"Points (colored)" ) {
206 }
else if( _draw_modes[i] ==
"Points (shaded)" ) {
208 }
else if( _draw_modes[i] ==
"Solid (flat shaded)" ) {
210 }
else if( _draw_modes[i] ==
"Solid (Phong shaded)" ) {
212 }
else if( _draw_modes[i] ==
"Solid (colored per-face)" ) {
214 }
else if( _draw_modes[i] ==
"Solid (colored per-vertex)" ) {
216 }
else if( _draw_modes[i] ==
"Solid (colored per-vertex, shaded)" ) {
218 }
else if( _draw_modes[i] ==
"Solid (environment mapped)" ) {
220 }
else if( _draw_modes[i] ==
"Solid (textured)" ) {
222 }
else if( _draw_modes[i] ==
"Solid (textured, shaded)" ) {
224 }
else if( _draw_modes[i] ==
"Solid (scalar field)" ) {
226 }
else if( _draw_modes[i] ==
"Solid (scalar field, shaded)" ) {
228 }
else if( _draw_modes[i] ==
"Solid (3D textured)" ) {
230 }
else if( _draw_modes[i] ==
"Solid (3D textured, shaded)" ) {
232 }
else if( _draw_modes[i] ==
"Solid (colored per-face, flat shaded)" ) {
234 }
else if( _draw_modes[i] ==
"Solid (colored per-face, smooth shaded)" ) {
236 }
else if( _draw_modes[i] ==
"Solid (colored per-face, face textured, smooth shaded)" ) {
238 }
else if( _draw_modes[i] ==
"Solid (face textured)" ) {
240 }
else if( _draw_modes[i] ==
"Solid (face textured, shaded)" ) {
242 }
else if( _draw_modes[i] ==
"Shader controlled" ) {
244 }
else if( _draw_modes[i] ==
"Solid (smooth shaded, features)" ) {
256 std::vector< QString > draw_modes;
259 draw_modes.push_back(
"Default");
261 draw_modes.push_back(
"Solid (smooth shaded)");
263 draw_modes.push_back(
"Hiddenline");
265 draw_modes.push_back(
"Wireframe");
267 draw_modes.push_back(
"Points");
269 draw_modes.push_back(
"Points (colored)");
271 draw_modes.push_back(
"Points (shaded)");
273 draw_modes.push_back(
"Solid (flat shaded)");
275 draw_modes.push_back(
"Solid (Phong shaded)");
277 draw_modes.push_back(
"Solid (colored per-face)");
279 draw_modes.push_back(
"Solid (colored per-vertex)");
281 draw_modes.push_back(
"Solid (colored per-vertex, shaded)");
283 draw_modes.push_back(
"Solid (environment mapped)");
285 draw_modes.push_back(
"Solid (textured)");
287 draw_modes.push_back(
"Solid (textured, shaded)");
289 draw_modes.push_back(
"Solid (scalar field)");
291 draw_modes.push_back(
"Solid (scalar field, shaded)");
293 draw_modes.push_back(
"Solid (3D textured)");
295 draw_modes.push_back(
"Solid (3D textured, shaded)");
297 draw_modes.push_back(
"Solid (colored per-face, flat shaded)");
299 draw_modes.push_back(
"Solid (colored per-face, smooth shaded)");
301 draw_modes.push_back(
"Solid (colored per-face, face textured, smooth shaded)");
303 draw_modes.push_back(
"Solid (face textured)");
305 draw_modes.push_back(
"Solid (face textured, shaded)");
307 draw_modes.push_back(
"Shader controlled");
309 draw_modes.push_back(
"Solid (smooth shaded, features)");
DrawMode SOLID_SMOOTH_SHADED
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode SOLID_PHONG_SHADED
draw phong shaded faces
DrawMode SOLID_ENV_MAPPED
draw environment mapped
DrawMode SOLID_3DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_POINTS_COLORED_SHADED
draw faces, but use Gouraud shading to interpolate vertex colors
DrawMode SOLID_FACES_COLORED_SMOOTH_SHADED
draw smooth shaded and colored faces (requires vertex normals and face colors)
DrawMode POINTS_COLORED
draw colored, but not lighted points (requires point colors)
DrawMode SOLID_TEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_2DTEXTURED_FACE
draw per halfedge textured faces
DrawMode SOLID_2DTEXTURED_FACE_SHADED
draw per halfedge textured faces
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
const DrawMode & getDrawMode(const std::string &_name)
Get a custom DrawMode.
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
DrawMode WIREFRAME
draw wireframe
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED
draw per halfedge texture faces modulated with face colors with smooth shading
DrawMode POINTS
draw unlighted points using the default base color
DrawMode POINTS_SHADED
draw shaded points (requires point normals)
DrawMode SOLID_1DTEXTURED
draw textured faces
DrawMode NONE
not a valid draw mode
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
DrawMode SOLID_3DTEXTURED
draw textured faces
DrawMode SOLID_SMOOTH_SHADED_FEATURES
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode SOLID_TEXTURED
draw textured faces
DrawMode SOLID_1DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
ACG::SceneGraph::DrawModes::DrawMode drawMode(int _viewer)
Get the current draw Mode of a Viewer.