FrontISTR 5.2.0
Large-scale structural analysis program with finit element method
Loading...
Searching...
No Matches
CHECDB_Visual.cpp
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2019 FrontISTR Commons
3 * This software is released under the MIT License, see LICENSE.txt
4 *****************************************************************************/
5/*
6 CHECDB_Visual Ver.1.0
7*/
8
9#include <stdarg.h>
10#include <vector>
11#include "CHECDB.h"
12#include "CHECDB_Visual.h"
13#include "CHECData.h"
14#include "hecd_util.h"
15
16using namespace std;
17using namespace hecd_util;
18
19//*****************************************************************************
20// CVis_ViewParams
21//*****************************************************************************
22
24 : position_of_lights(0), interval_mapping(0) {
25 Init();
26}
27
29 delete position_of_lights;
30 delete interval_mapping;
31}
32
34 x_resolution = 512;
35 y_resolution = 512;
36 num_of_lights = 1;
37 delete position_of_lights;
39 viewpoint[0] = viewpoint[1] = viewpoint[2] = 0;
40 fg_viewpoint = false;
42 fg_look_at_point = false;
43 up_direction[0] = 0;
44 up_direction[1] = 0;
45 up_direction[2] = 1;
46 ambient_coef = 0.3;
47 diffuse_coef = 0.7;
48 specular_coef = 0.6;
51 delete[] interval_mapping;
55 num_of_frame = 8;
58 num_of_scales = 3;
59 font_size = 1;
60 font_color[0] = font_color[1] = font_color[2] = 1;
64 range_value[0] = range_value[1] = 0;
65 fg_range_value = false;
66}
67
68void CVis_ViewParams::WriteVisParam(class CHECData *hecd, const char *name,
69 const char *fmt, ...) {
70 va_list va;
71 va_start(va, fmt);
72 char buff[256];
73 char ss[256];
74 sprintf(buff, "!%s", name);
75 int n = strlen(fmt);
76
77 if (n > 1) {
78 strcat(buff, " =");
79 }
80
81 for (int i = 0; i < n; i++) {
82 strcat(buff, " ");
83 char c = fmt[i];
84
85 switch (c) {
86 case 'S':
87 strcat(buff, va_arg(va, char *));
88 break;
89
90 case 'I':
91 sprintf(ss, "%d", va_arg(va, int));
92 strcat(buff, ss);
93 break;
94
95 case 'F':
96 sprintf(ss, "%lg", va_arg(va, double));
97 strcat(buff, ss);
98 break;
99
100 default:
101 assert(0);
102 }
103 }
104
105 hecd->WriteLine(buff);
106 va_end(va);
107}
108
109void CVis_ViewParams::WriteVisPArry(class CHECData *hecd, const char *name,
110 char type, int n, void *p) {
111 char buff[256];
112 char ss[256];
113 int *ip;
114 double *dp;
115 sprintf(buff, "!%s", name);
116
117 if (n > 1) {
118 strcat(buff, " =");
119 }
120
121 ip = (int *)p;
122 dp = (double *)p;
123
124 for (int i = 0; i < n; i++) {
125 strcat(buff, ", ");
126
127 switch (type) {
128 case 'I':
129 sprintf(ss, "%d", *ip);
130 strcat(buff, ss);
131 ip++;
132 break;
133
134 case 'F':
135 sprintf(ss, "%lg", *dp);
136 strcat(buff, ss);
137 dp++;
138 break;
139
140 default:
141 assert(0);
142 }
143 }
144
145 hecd->WriteLine(buff);
146}
147
149 WriteVisParam(hecd, "x_resolution", "I", x_resolution);
150 WriteVisParam(hecd, "y_resolution", "I", y_resolution);
151 WriteVisParam(hecd, "num_of_lights", "I", num_of_lights);
152
154 WriteVisPArry(hecd, "position_of_lights", 'F', num_of_lights,
156 }
157
158 if (fg_viewpoint) WriteVisPArry(hecd, "viewpoint", 'F', 3, viewpoint);
159
161 WriteVisPArry(hecd, "look_at_point", 'F', 3, look_at_point);
162
163 WriteVisParam(hecd, "up_direction", "F", 3, up_direction);
164 WriteVisParam(hecd, "ambient_coef", "F", ambient_coef);
165 WriteVisParam(hecd, "diffuse_coef", "F", diffuse_coef);
166 WriteVisParam(hecd, "specular_coef", "F", specular_coef);
167 WriteVisParam(hecd, "color_mapping_style", "I", color_mapping_style);
168 WriteVisParam(hecd, "interval_mapping_num", "I", interval_mapping_num);
169
170 if (interval_mapping_num > 0) {
171 if (!interval_mapping) assert(0);
172
173 WriteVisPArry(hecd, "nterval_mapping", 'F', interval_mapping_num * 2,
175 }
176
178 WriteVisParam(hecd, "rotate_style", "I", rotate_style);
179
180 WriteVisParam(hecd, "num_of_frame", "I", num_of_frame);
181 WriteVisParam(hecd, "color_mapping_bar_on", "I", color_mapping_bar_on);
182 WriteVisParam(hecd, "scale_marking_on", "I", scale_marking_on);
183 WriteVisParam(hecd, "num_of_scales", "I", num_of_scales);
184 WriteVisParam(hecd, "font_size", "F", font_size);
185 WriteVisPArry(hecd, "font_color", 'F', 3, font_color);
186 WriteVisPArry(hecd, "font_color", 'F', 3, font_color);
187 WriteVisPArry(hecd, "background_color", 'F', 3, background_color);
188 WriteVisParam(hecd, "color_system_type", "I", color_system_type);
189 WriteVisParam(hecd, "fixed_range_on", "I", fixed_range_on);
190
191 if (fg_range_value) WriteVisPArry(hecd, "range_value", 'F', 3, range_value);
192}
193
194//-----------------------------------------------------------------------------
195
196template <class T>
197int CVis_ViewParams::ReadVisValueT(char *s, int n, T *value, const char *fmt) {
198 const char *delim = ", \t\r\n";
199 int i = 0;
200 char *token = strtok(s, delim);
201
202 while (token && i < n) {
203 if (sscanf(token, fmt, &value[i]) != 1) return -(i + 1);
204
205 token = strtok(0, delim);
206 i++;
207 }
208
209 return i;
210}
211
212int CVis_ViewParams::ReadVisValue(char *s, int n, int *value) {
213 return ReadVisValueT<int>(s, n, value, "%d");
214}
215
216int CVis_ViewParams::ReadVisValue(char *s, int n, double *value) {
217 return ReadVisValueT<double>(s, n, value, "%lf");
218}
219
220int CVis_ViewParams::ReadVisValue(char *s, int n, char *value) {
221 cleanup_token(s);
222 int len = strlen(s);
223
224 if (len > n) return 0;
225
226 strcpy(value, s);
227 return len;
228}
229
230template <class T>
231T *CVis_ViewParams::ReadVisPArry(char *s, int &n, const char *fmt) {
232 const int max_data_n = 200;
233 T buff[max_data_n];
234 const char *delim = ", \t\r\n";
235 n = 0;
236 int i = 0;
237 char *token = strtok(s, delim);
238
239 while (token) {
240 if (max_data_n >= i) assert(0);
241
242 T x;
243
244 if (sscanf(token, fmt, &x) != 1) {
245 return 0;
246 }
247
248 buff[i] = x;
249 token = strtok(0, delim);
250 i++;
251 }
252
253 n = i;
254 T *data = new T[n];
255
256 for (i = 0; i < n; i++) {
257 data[i] = buff[i];
258 }
259
260 return data;
261}
262
263bool CVis_ViewParams::ReadData(const char *line) {
264 char buff[256];
265 strcpy(buff, line);
266 char *header = strtok(buff, " =,\r\n\t");
267
268 if (header[0] == 0 || header[0] != '!') return false;
269
270 tolower(header);
271#define GENERATE_CODE(x, n, fg) \
272 else if (strcmp(#x, header) == 0) { \
273 int r = ReadVisValue(0, n, &x); \
274 fg = (r > 0); \
275 return fg; \
276 }
277#define GENERATE_CODEA(x, n, fg) \
278 else if (strcmp(#x, header) == 0) { \
279 int r = ReadVisValue(0, n, x); \
280 fg = (r > 0); \
281 return fg; \
282 }
283 bool dummy;
284
285 if (false)
286 ; // dummy
287
288 GENERATE_CODE(x_resolution, 1, dummy)
289 GENERATE_CODE(y_resolution, 1, dummy)
293 GENERATE_CODE(ambient_coef, 1, dummy)
294 GENERATE_CODE(diffuse_coef, 1, dummy)
297 GENERATE_CODE(rotate_style, 1, dummy)
298 GENERATE_CODE(num_of_frame, 1, dummy)
302 GENERATE_CODE(font_size, 1, dummy)
303 GENERATE_CODEA(font_color, 3, dummy)
308#undef GENERATE_CODE
309#undef GENERATE_CODEA
310#define GENERATE_CODE(x, n, type, fmt) \
311 else if (strcmp(#x, header) == 0) { \
312 delete[] x; \
313 x = 0; \
314 x = ReadVisPArry<type>(0, n, fmt); \
315 return x != 0; \
316 }
317
318 if (false)
319 ;
320
323#undef GENERATE_CODE
324 return false;
325}
326
328 char line[256];
329
330 while (1) {
331 if (!hecd->ReadLine(line)) break;
332
333 if (!ReadData(line)) {
334 hecd->PushReadLine(line);
335 break;
336 }
337 }
338
339 return true;
340}
341
342//*****************************************************************************
343// CVis_PSR
344//*****************************************************************************
345
347
349
351 // common ------------------------------------------------
354 color_comp_name[0] = 0;
355 strcpy(color_subcomp_name, "x");
356 color_comp = 0;
357 color_subcomp = 1;
358 iso_number = 5;
359 specified_color = 0;
361 deform_comp_name[0] = 0;
362 deform_comp = 0;
363 deform_scale = 0;
364 fg_deform_scale = false;
367 initial_line_color[0] = 0;
368 initial_line_color[1] = 0;
369 initial_line_color[2] = 1;
370 deform_line_color[0] = 0;
371 deform_line_color[1] = 0;
372 deform_line_color[2] = 1;
373 strcpy(output_type, "AVS");
374 // for surface_style == surface_style_equivalent ---------
375 data_comp_name[0] = 0;
376 strcpy(data_subcomp_name, "x");
377 data_comp = 0;
378 data_subcomp = 1;
379 iso_value = 0;
380 // for surface_style == surface_style_user ---------------
382 point[0] = point[1] = point[2] = 0;
383 radius = 1;
384 length = 1;
385
386 for (int i = 0; i < 10; i++) coef[i] = 0;
387
388 // rendering parameters(output_type == "BMP") ------------
391 fg_isoline_color = false;
393}
394
395void CVis_PSR::Write(class CHECData *hecd) {
396 // common ------------------------------------------------
397 hecd->WriteLine("!!common of PSR ----------------------------------");
398 WriteVisParam(hecd, "surface_style", "I", surface_style);
399 WriteVisParam(hecd, "display_method", "I", display_method);
400
401 if (color_comp_name[0] != 0)
402 WriteVisParam(hecd, "display_method", "S", color_comp_name);
403
404 if (color_subcomp_name[0] != 0)
405 WriteVisParam(hecd, "color_subcomp_name", "S", color_subcomp_name);
406
407 WriteVisParam(hecd, "color_comp", "I", color_comp);
408 WriteVisParam(hecd, "color_subcomp", "I", color_subcomp);
409 WriteVisParam(hecd, "iso_number", "I", iso_number);
410 WriteVisParam(hecd, "specified_color", "F", specified_color);
411 WriteVisParam(hecd, "deform_display_on", "I", deform_display_on);
412
413 if (deform_comp_name[0] != 0)
414 WriteVisParam(hecd, "deform_comp_name", "S", deform_comp_name);
415
416 WriteVisParam(hecd, "deform_comp", "I", deform_comp);
417
418 if (fg_deform_scale) WriteVisParam(hecd, "deform_scale", "F", deform_scale);
419
421 WriteVisParam(hecd, "initial_style", "I", initial_style);
422
424 WriteVisParam(hecd, "deform_style", "I", deform_style);
425
426 WriteVisPArry(hecd, "initial_line_color", 'F', 3, initial_line_color);
427 WriteVisPArry(hecd, "deform_line_color", 'F', 3, deform_line_color);
428 WriteVisParam(hecd, "output_type", "S", output_type);
429 // for surface_style == surface_style_equivalent ---------
430 hecd->WriteLine("!!for equivalent value surface -------------------");
431
432 if (data_comp_name[0] != 0)
433 WriteVisParam(hecd, "data_comp_name", "S", data_comp_name);
434
435 WriteVisParam(hecd, "data_subcomp_name", "S", data_subcomp_name);
436 WriteVisParam(hecd, "data_comp", "I", data_comp);
437 WriteVisParam(hecd, "data_subcomp", "I", data_subcomp);
438 WriteVisParam(hecd, "iso_value", "F", iso_value);
439 // for surface_style == surface_style_user ---------------
440 hecd->WriteLine("!!for surface of user defined equation -----------");
441 WriteVisParam(hecd, "method", "I", method);
442 WriteVisPArry(hecd, "point", 'F', 3, point);
443 WriteVisParam(hecd, "radius", "F", radius);
444 WriteVisParam(hecd, "length", "F", length);
445 WriteVisPArry(hecd, "coef", 'F', 10, coef);
446 // rendering parameters(output_type == "BMP") ------------
447 // parameters defined in CVis_ScreenParams and followings
448 hecd->WriteLine("!!for BMP output ---------------------------------");
450
452 WriteVisPArry(hecd, "isoline_color", 'F', 3, isoline_color);
453
454 WriteVisParam(hecd, "boundary_line_on", "I", boundary_line_on);
455}
456
457bool CVis_PSR::ReadData(const char *line) {
458 if (CVis_ViewParams::ReadData(line)) return true;
459
460 char buff[256];
461 strcpy(buff, line);
462 char *header = strtok(buff, " =,\r\n\t");
463
464 if (header[0] == 0 || header[0] != '!') return false;
465
466 tolower(header);
467#define GENERATE_CODE(x, n, fg) \
468 else if (strcmp(#x, header) == 0) { \
469 int r = ReadVisValue(0, n, &x); \
470 fg = (r > 0); \
471 return fg; \
472 }
473#define GENERATE_CODEA(x, n, fg) \
474 else if (strcmp(#x, header) == 0) { \
475 int r = ReadVisValue(0, n, x); \
476 fg = (r > 0); \
477 return fg; \
478 }
479 bool dummy;
480
481 if (false)
482 ; // dummy
483
488 GENERATE_CODE(color_comp, 1, dummy)
490 GENERATE_CODE(iso_number, 1, dummy)
494 GENERATE_CODE(deform_comp, 1, dummy)
497 GENERATE_CODE(deform_style, 1, dummy)
500 GENERATE_CODEA(output_type, 3, dummy)
501 // for surface_style == surface_style_equivalent ---------
502 GENERATE_CODEA(data_comp_name, 100, dummy)
504 GENERATE_CODE(data_comp, 1, dummy)
505 GENERATE_CODE(data_subcomp, 1, dummy)
506 GENERATE_CODE(iso_value, 1, dummy)
507 // for surface_style == surface_style_user ---------------
508 GENERATE_CODE(method, 1, dummy)
509 GENERATE_CODEA(point, 3, dummy)
510 GENERATE_CODE(radius, 1, dummy)
511 GENERATE_CODE(length, 1, dummy)
512 GENERATE_CODEA(coef, 10, dummy)
513 // rendering parameters(output_type == "BMP") ------------
514 // parameters defined in CVis_ScreenParams and followings
517#undef GENERATE_CODE
518#undef GENERATE_CODEA
519 return false;
520}
521
522//*****************************************************************************
523// CVis_PVR
524//*****************************************************************************
525
526CVis_PVR::CVis_PVR() : CVis_ViewParams(), fea_point(0) { Init(); }
527
529
531 // for dividing ------------------------------------------
532 maximum_refinement = 100;
533 n_voxel_x = 0;
534 fg_n_voxel_x = false;
535 n_voxel_y = 0;
536 fg_n_voxel_y = false;
537 n_voxel_z = 0;
538 fg_n_voxel_z = false;
539 voxel_filename[0] = 0;
540 x_specified_level = 100;
541 y_specified_level = 100;
542 z_specified_level = 100;
543 // for opacity
545 opa_value = 0.02;
546 num_of_features = 0;
547 delete fea_point;
548 fea_point = 0;
549 name_lookup[0] = 0;
550 // parameters defined in CVis_ViewParams and followings
552 histogram_on = 0;
553
554 for (int i = 0; i < 6; i++) display_range[i] = 0;
555
556 fg_display_range = false;
557}
558
559void CVis_PVR::Write(class CHECData *hecd) {
560 // for dividing ------------------------------------------
561 hecd->WriteLine("!!for dividing -----------------------------------");
562 WriteVisParam(hecd, "maximum_refinement", "I", maximum_refinement);
563
564 if (fg_n_voxel_x) WriteVisParam(hecd, "n_voxel_x", "I", n_voxel_x);
565
566 if (fg_n_voxel_y) WriteVisParam(hecd, "n_voxel_y", "I", n_voxel_y);
567
568 if (fg_n_voxel_z) WriteVisParam(hecd, "n_voxel_z", "I", n_voxel_z);
569
570 if (voxel_filename[0] != 0)
571 WriteVisParam(hecd, "voxel_filename", "S", voxel_filename);
572
573 WriteVisParam(hecd, "x_specified_level", "I", x_specified_level);
574 WriteVisParam(hecd, "y_specified_level", "I", y_specified_level);
575 WriteVisParam(hecd, "z_specified_level", "I", z_specified_level);
576 // for opacity -------------------------------------------
577 hecd->WriteLine("!!for opacity ------------------------------------");
578 WriteVisParam(hecd, "transfer_function_type", "I", transfer_function_type);
579 WriteVisParam(hecd, "opa_value", "F", opa_value);
580 WriteVisParam(hecd, "num_of_features", "I", num_of_features);
581
582 if (num_of_features > 0 && fea_point)
583 WriteVisPArry(hecd, "fea_point", 'F', 3 * num_of_features, fea_point);
584
585 if (name_lookup[0] != 0) WriteVisParam(hecd, "name_lookup", "S", name_lookup);
586
587 // parameters defined in CVis_ViewParams and followings
588 hecd->WriteLine("!!view params ------------------------------------");
590 WriteVisParam(hecd, "histogram_on", "I", histogram_on);
591
593 WriteVisPArry(hecd, "display_range", 'F', 6, display_range);
594}
595
596bool CVis_PVR::ReadData(const char *line) {
597 if (CVis_ViewParams::ReadData(line)) return true;
598
599 char buff[256];
600 strcpy(buff, line);
601 char *header = strtok(buff, " =,\r\n\t");
602
603 if (header[0] == 0 || header[0] != '!') return false;
604
605 tolower(header);
606#define GENERATE_CODE(x, n, fg) \
607 else if (strcmp(#x, header) == 0) { \
608 int r = ReadVisValue(0, n, &x); \
609 fg = (r > 0); \
610 return fg; \
611 }
612#define GENERATE_CODEA(x, n, fg) \
613 else if (strcmp(#x, header) == 0) { \
614 int r = ReadVisValue(0, n, x); \
615 fg = (r > 0); \
616 return fg; \
617 }
618 bool dummy;
619
620 if (false)
621 ; // dummy
622
623 // for dividing ------------------------------------------
628 GENERATE_CODEA(voxel_filename, 100, dummy)
632 // for opacity
634 GENERATE_CODE(opa_value, 1, dummy)
636 GENERATE_CODEA(name_lookup, 100, dummy)
637 // parameters defined in CVis_ViewParams and followings
638 GENERATE_CODE(histogram_on, 1, dummy)
640#undef GENERATE_CODE
641#undef GENERATE_CODEA
642#define GENERATE_CODE(x, n, type, fmt) \
643 else if (strcmp(#x, header) == 0) { \
644 delete[] x; \
645 x = 0; \
646 x = ReadVisPArry<type>(0, n, fmt); \
647 return x != 0; \
648 }
649
650 if (num_of_features <= 0) return false;
651
652 int f_data_size = 3 * num_of_features;
653
654 if (false)
655 ;
656
657 GENERATE_CODE(fea_point, f_data_size, double, "%lf");
658#undef GENERATE_CODE
659 return false;
660}
661
662//-----------------------------------------------------------------------------
663// CHECDB_Visual
664//-----------------------------------------------------------------------------
665
669 visual_end_step = -1;
670 surface_num = 0;
671}
672
674
678 visual_end_step = -1;
679 surface_num = 0;
680 vector<CVis_PSR *>::iterator is;
681
682 for (is = psr.begin(); is != psr.end(); is++) {
683 delete *is;
684 }
685
686 psr.clear();
687 delete pvr;
688 pvr = 0;
689}
690
692 surface_num = psr.size();
693
694 if (surface_num > 0) {
695 hecd->WriteHeader("!VISUAL", "SIII", "method", "PSR", "visual_start_step",
696 visual_start_step, "visual_interval_step",
697 visual_interval_step, "visual_end_step", visual_end_step);
698 CVis_ViewParams::WriteVisParam(hecd, "surface_num", "I", surface_num);
699 vector<CVis_PSR *>::iterator is;
700
701 for (is = psr.begin(); is != psr.end(); is++) {
702 hecd->WriteLine("!SURFACE");
703 (*is)->Write(hecd);
704 }
705 }
706
707 if (pvr) {
708 hecd->WriteHeader("!VISUAL", "SIII", "method", "PVR", "visual_start_step",
709 visual_start_step, "visual_interval_step",
710 visual_interval_step, "visual_end_step", visual_end_step);
711 pvr->Write(hecd);
712 }
713}
714
715bool CHECDB_Visual::Read(CHECData *hecd, char *header_line) {
716 char s[256];
717 char method_s[256];
718 int rcode[10];
719
720 if (!hecd->ParseHeader(header_line, rcode, "SIII", "method", s,
721 "visual_start_step", &visual_start_step,
722 "visual_interval_step", &visual_interval_step,
723 "visual_end_step", &visual_end_step))
724 return false;
725
726 cleanup_token(s, method_s);
727 toupper(method_s);
728 bool fg_psr = (strcmp("PSR", method_s) == 0);
729
730 if (fg_psr) {
731 if (!hecd->ReadParameter(rcode, "I", "surface_num", &surface_num))
732 return false;
733
734 for (int i = 0; i < surface_num; i++) {
735 if (!hecd->ReadLine(s)) return false;
736
737 cleanup_token(s);
738 toupper(s);
739
740 if (strcmp("!SURFACE", s) != 0) return false;
741
742 CVis_PSR *vis_psr = new CVis_PSR();
743
744 if (!vis_psr->Read(hecd)) {
745 delete vis_psr;
746 return false;
747 }
748
749 psr.push_back(vis_psr);
750 }
751
752 } else {
753 delete pvr;
754 pvr = new CVis_PVR();
755
756 if (!pvr->Read(hecd)) {
757 delete pvr;
758 pvr = 0;
759 return false;
760 }
761 }
762
763 return true;
764}
@ HECDB_VISUAL
Definition: CHECDB.h:28
#define GENERATE_CODEA(x, n, fg)
#define GENERATE_CODE(x, n, fg)
int visual_interval_step
virtual ~CHECDB_Visual()
virtual void Write(class CHECData *hecd)
CVis_PVR * pvr
virtual void Clear()
virtual bool Read(class CHECData *hecd, char *header_line)
std::vector< CVis_PSR * > psr
virtual bool ParseHeader(char *header_line, int *rcode, const char *fmt,...)
Definition: CHECData.cpp:506
virtual bool ReadLine(char *s, int size=256)
Definition: CHECData.cpp:307
virtual bool ReadParameter(int *rcode, const char *fmt,...)
Definition: CHECData.cpp:525
virtual void WriteHeader(const char *name, const char *fmt="",...)
Definition: CHECData.cpp:68
virtual void WriteLine(const char *s)
Definition: CHECData.cpp:58
virtual void PushReadLine(const char *s)
Definition: CHECData.cpp:328
char deform_comp_name[100]
double radius
int data_subcomp
double length
int deform_display_on
virtual ~CVis_PSR()
int display_method
char data_subcomp_name[4]
@ deform_style_none
int color_comp
virtual bool ReadData(const char *line)
int surface_style
Definition: CHECDB_Visual.h:97
double iso_value
char color_comp_name[100]
char color_subcomp_name[4]
double deform_line_color[3]
double deform_scale
bool fg_isoline_color
int iso_number
int initial_style
double initial_line_color[3]
double specified_color
int deform_comp
int color_subcomp
double isoline_color[3]
bool fg_deform_scale
int boundary_line_on
virtual void Init()
@ surface_style_boundary
Definition: CHECDB_Visual.h:99
char output_type[3]
@ display_method_color
double coef[10]
@ initial_style_none
virtual void Write(class CHECData *hecd)
int deform_style
double point[3]
char data_comp_name[100]
int transfer_function_type
bool fg_n_voxel_z
double opa_value
double * fea_point
bool fg_n_voxel_x
int maximum_refinement
int z_specified_level
int histogram_on
virtual void Init()
virtual ~CVis_PVR()
double display_range[6]
virtual void Write(class CHECData *hecd)
bool fg_display_range
char voxel_filename[100]
int num_of_features
bool fg_n_voxel_y
virtual bool ReadData(const char *line)
int x_specified_level
int y_specified_level
char name_lookup[100]
virtual bool Read(class CHECData *hecd)
double up_direction[3]
Definition: CHECDB_Visual.h:27
virtual bool ReadData(const char *line)
double range_value[2]
Definition: CHECDB_Visual.h:64
double specular_coef
Definition: CHECDB_Visual.h:30
static void WriteVisParam(class CHECData *hecd, const char *name, const char *fmt,...)
double * position_of_lights
Definition: CHECDB_Visual.h:22
static T * ReadVisPArry(char *s, int &n, const char *fmt)
virtual void Write(class CHECData *hecd)
static void WriteVisPArry(class CHECData *hecd, const char *name, char type, int n, void *p)
virtual void Init()
double font_color[3]
Definition: CHECDB_Visual.h:54
static int ReadVisValueT(char *s, int n, T *value, const char *fmt)
double look_at_point[3]
Definition: CHECDB_Visual.h:25
double * interval_mapping
Definition: CHECDB_Visual.h:39
virtual ~CVis_ViewParams()
double background_color[3]
Definition: CHECDB_Visual.h:55
static int ReadVisValue(char *s, int n, int *value)
double viewpoint[3]
Definition: CHECDB_Visual.h:23
PVR_link * pvr
void tolower(char *s)
Definition: hecd_util.cpp:56
void toupper(char *s)
Definition: hecd_util.cpp:37
void cleanup_token(char *s)
Definition: hecd_util.cpp:13
CNFData data