60 #include "DrawModeConverter.hh" 68 std::vector< QString > draw_modes;
71 draw_modes.push_back(
"DEFAULT");
73 draw_modes.push_back(
"SOLID_SMOOTH_SHADED");
75 draw_modes.push_back(
"HIDDENLINE");
77 draw_modes.push_back(
"WIREFRAME");
79 draw_modes.push_back(
"POINTS");
81 draw_modes.push_back(
"POINTS_COLORED");
83 draw_modes.push_back(
"POINTS_SHADED");
85 draw_modes.push_back(
"SOLID_FLAT_SHADED");
87 draw_modes.push_back(
"SOLID_PHONG_SHADED");
89 draw_modes.push_back(
"SOLID_FACES_COLORED");
91 draw_modes.push_back(
"SOLID_POINTS_COLORED");
93 draw_modes.push_back(
"SOLID_POINTS_COLORED_SHADED");
95 draw_modes.push_back(
"SOLID_ENV_MAPPED");
97 draw_modes.push_back(
"SOLID_TEXTURED");
99 draw_modes.push_back(
"SOLID_TEXTURED_SHADED");
101 draw_modes.push_back(
"SOLID_1DTEXTURED");
103 draw_modes.push_back(
"SOLID_1DTEXTURED_SHADED");
105 draw_modes.push_back(
"SOLID_3DTEXTURED");
107 draw_modes.push_back(
"SOLID_3DTEXTURED_SHADED");
109 draw_modes.push_back(
"SOLID_FACES_COLORED_FLAT_SHADED");
111 draw_modes.push_back(
"SOLID_FACES_COLORED_SMOOTH_SHADED");
113 draw_modes.push_back(
"SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED");
115 draw_modes.push_back(
"SOLID_2DTEXTURED_FACE");
117 draw_modes.push_back(
"SOLID_2DTEXTURED_FACE_SHADED");
119 draw_modes.push_back(
"SOLID_SHADER");
121 draw_modes.push_back(
"SOLID_SMOOTH_SHADED_FEATURES");
131 for ( uint i = 0 ; i < _draw_modes.size() ; ++i ) {
132 if( _draw_modes[i] ==
"DEFAULT" ) {
134 }
else if( _draw_modes[i] ==
"SOLID_SMOOTH_SHADED" ) {
136 }
else if( _draw_modes[i] ==
"HIDDENLINE" ) {
138 }
else if( _draw_modes[i] ==
"WIREFRAME" ) {
140 }
else if( _draw_modes[i] ==
"POINTS" ) {
142 }
else if( _draw_modes[i] ==
"POINTS_COLORED" ) {
144 }
else if( _draw_modes[i] ==
"POINTS_SHADED" ) {
146 }
else if( _draw_modes[i] ==
"SOLID_FLAT_SHADED" ) {
148 }
else if( _draw_modes[i] ==
"SOLID_PHONG_SHADED" ) {
150 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED" ) {
152 }
else if( _draw_modes[i] ==
"SOLID_POINTS_COLORED" ) {
154 }
else if( _draw_modes[i] ==
"SOLID_POINTS_COLORED_SHADED" ) {
156 }
else if( _draw_modes[i] ==
"SOLID_ENV_MAPPED" ) {
158 }
else if( _draw_modes[i] ==
"SOLID_TEXTURED" ) {
160 }
else if( _draw_modes[i] ==
"SOLID_TEXTURED_SHADED" ) {
162 }
else if( _draw_modes[i] ==
"SOLID_1DTEXTURED" ) {
164 }
else if( _draw_modes[i] ==
"SOLID_1DTEXTURED_SHADED" ) {
166 }
else if( _draw_modes[i] ==
"SOLID_3DTEXTURED" ) {
168 }
else if( _draw_modes[i] ==
"SOLID_3DTEXTURED_SHADED" ) {
170 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED_FLAT_SHADED" ) {
172 }
else if( _draw_modes[i] ==
"SOLID_FACES_COLORED_SMOOTH_SHADED" ) {
174 }
else if (_draw_modes[i] ==
"SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED") {
176 }
else if (_draw_modes[i] ==
"SOLID_2DTEXTURED_FACE") {
178 }
else if( _draw_modes[i] ==
"SOLID_2DTEXTURED_FACE_SHADED" ) {
180 }
else if( _draw_modes[i] ==
"SOLID_SHADER" ) {
182 }
else if( _draw_modes[i] ==
"SOLID_SMOOTH_SHADED_FEATURES" ) {
196 for ( uint i = 0 ; i < _draw_modes.size() ; ++i ) {
197 if( _draw_modes[i] ==
"Default" ) {
199 }
else if( _draw_modes[i] ==
"Solid (smooth shaded)" ) {
201 }
else if( _draw_modes[i] ==
"Hiddenline" ) {
203 }
else if( _draw_modes[i] ==
"Wireframe" ) {
205 }
else if( _draw_modes[i] ==
"Points" ) {
207 }
else if( _draw_modes[i] ==
"Points (colored)" ) {
209 }
else if( _draw_modes[i] ==
"Points (shaded)" ) {
211 }
else if( _draw_modes[i] ==
"Solid (flat shaded)" ) {
213 }
else if( _draw_modes[i] ==
"Solid (Phong shaded)" ) {
215 }
else if( _draw_modes[i] ==
"Solid (colored per-face)" ) {
217 }
else if( _draw_modes[i] ==
"Solid (colored per-vertex)" ) {
219 }
else if( _draw_modes[i] ==
"Solid (colored per-vertex, shaded)" ) {
221 }
else if( _draw_modes[i] ==
"Solid (environment mapped)" ) {
223 }
else if( _draw_modes[i] ==
"Solid (textured)" ) {
225 }
else if( _draw_modes[i] ==
"Solid (textured, shaded)" ) {
227 }
else if( _draw_modes[i] ==
"Solid (scalar field)" ) {
229 }
else if( _draw_modes[i] ==
"Solid (scalar field, shaded)" ) {
231 }
else if( _draw_modes[i] ==
"Solid (3D textured)" ) {
233 }
else if( _draw_modes[i] ==
"Solid (3D textured, shaded)" ) {
235 }
else if( _draw_modes[i] ==
"Solid (colored per-face, flat shaded)" ) {
237 }
else if( _draw_modes[i] ==
"Solid (colored per-face, smooth shaded)" ) {
239 }
else if( _draw_modes[i] ==
"Solid (colored per-face, face textured, smooth shaded)" ) {
241 }
else if( _draw_modes[i] ==
"Solid (face textured)" ) {
243 }
else if( _draw_modes[i] ==
"Solid (face textured, shaded)" ) {
245 }
else if( _draw_modes[i] ==
"Shader controlled" ) {
247 }
else if( _draw_modes[i] ==
"Solid (smooth shaded, features)" ) {
257 std::vector< QString > draw_modes;
259 if ( _drawMode & ACG::SceneGraph::DrawModes::DEFAULT )
260 draw_modes.push_back(
"Default");
261 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_SMOOTH_SHADED)
262 draw_modes.push_back(
"Solid (smooth shaded)");
263 if ( _drawMode & ACG::SceneGraph::DrawModes::HIDDENLINE)
264 draw_modes.push_back(
"Hiddenline");
265 if ( _drawMode & ACG::SceneGraph::DrawModes::WIREFRAME)
266 draw_modes.push_back(
"Wireframe");
267 if ( _drawMode & ACG::SceneGraph::DrawModes::POINTS)
268 draw_modes.push_back(
"Points");
269 if ( _drawMode & ACG::SceneGraph::DrawModes::POINTS_COLORED)
270 draw_modes.push_back(
"Points (colored)");
271 if ( _drawMode & ACG::SceneGraph::DrawModes::POINTS_SHADED)
272 draw_modes.push_back(
"Points (shaded)");
273 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED)
274 draw_modes.push_back(
"Solid (flat shaded)");
275 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_PHONG_SHADED)
276 draw_modes.push_back(
"Solid (Phong shaded)");
277 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED)
278 draw_modes.push_back(
"Solid (colored per-face)");
279 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED)
280 draw_modes.push_back(
"Solid (colored per-vertex)");
281 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_POINTS_COLORED_SHADED)
282 draw_modes.push_back(
"Solid (colored per-vertex, shaded)");
283 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_ENV_MAPPED)
284 draw_modes.push_back(
"Solid (environment mapped)");
285 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_TEXTURED)
286 draw_modes.push_back(
"Solid (textured)");
287 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_TEXTURED_SHADED)
288 draw_modes.push_back(
"Solid (textured, shaded)");
289 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_1DTEXTURED)
290 draw_modes.push_back(
"Solid (scalar field)");
291 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_1DTEXTURED_SHADED)
292 draw_modes.push_back(
"Solid (scalar field, shaded)");
293 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_3DTEXTURED)
294 draw_modes.push_back(
"Solid (3D textured)");
295 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_3DTEXTURED_SHADED)
296 draw_modes.push_back(
"Solid (3D textured, shaded)");
297 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED_FLAT_SHADED)
298 draw_modes.push_back(
"Solid (colored per-face, flat shaded)");
299 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED_SMOOTH_SHADED)
300 draw_modes.push_back(
"Solid (colored per-face, smooth shaded)");
301 if (_drawMode & ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED)
302 draw_modes.push_back(
"Solid (colored per-face, face textured, smooth shaded)");
303 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_2DTEXTURED_FACE)
304 draw_modes.push_back(
"Solid (face textured)");
305 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_2DTEXTURED_FACE_SHADED)
306 draw_modes.push_back(
"Solid (face textured, shaded)");
307 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_SHADER)
308 draw_modes.push_back(
"Shader controlled");
309 if ( _drawMode & ACG::SceneGraph::DrawModes::SOLID_SMOOTH_SHADED_FEATURES)
310 draw_modes.push_back(
"Solid (smooth shaded, features)");
DrawMode POINTS_COLORED
draw colored, but not lighted points (requires point colors)
DrawMode SOLID_SMOOTH_SHADED
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode SOLID_POINTS_COLORED_SHADED
draw faces, but use Gouraud shading to interpolate vertex colors
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawMode SOLID_1DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode DEFAULT
use the default (global) draw mode and not the node's own.
DrawMode WIREFRAME
draw wireframe
DrawMode SOLID_FACES_COLORED_SMOOTH_SHADED
draw smooth shaded and colored faces (requires vertex normals and face colors)
DrawMode SOLID_3DTEXTURED
draw textured faces
DrawMode SOLID_2DTEXTURED_FACE
draw per halfedge textured faces
DrawMode SOLID_FACES_COLORED_FLAT_SHADED
draw flat shaded and colored faces (requires face normals and colors)
DrawMode SOLID_2DTEXTURED_FACE_SHADED
draw per halfedge textured faces
DrawMode POINTS
draw unlighted points using the default base color
DrawMode SOLID_FACES_COLORED_2DTEXTURED_FACE_SMOOTH_SHADED
draw per halfedge texture faces modulated with face colors with smooth shading
DrawMode SOLID_TEXTURED
draw textured faces
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
DrawMode SOLID_PHONG_SHADED
draw phong shaded faces
DrawMode POINTS_SHADED
draw shaded points (requires point normals)
DrawMode SOLID_SMOOTH_SHADED_FEATURES
draw smooth shaded (Gouraud shaded) faces (requires halfedge normals)
DrawMode NONE
not a valid draw mode
DrawMode SOLID_ENV_MAPPED
draw environment mapped
DrawMode SOLID_1DTEXTURED
draw textured faces
ACG::SceneGraph::DrawModes::DrawMode drawMode(int _viewer)
Get the current draw Mode of a Viewer.
DrawMode SOLID_POINTS_COLORED
draw colored, but not lighted faces using interpolated vertex colors
DrawMode SOLID_3DTEXTURED_SHADED
draw smooth shaded textured faces
DrawMode SOLID_TEXTURED_SHADED
draw smooth shaded textured faces