Orbiter 2022
Combinatorial Objects
povray_job_description.cpp
Go to the documentation of this file.
1/*
2 * povray_job_description.cpp
3 *
4 * Created on: Jan 1, 2022
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16
17namespace orbiter {
18namespace layer1_foundations {
19namespace graphics {
20
21
22
24{
26 //output_mask;
29 f_round = FALSE;
30 round = 0;
32 //rounds_as_string;
33 Video_draw_options = NULL;
34
35
36 S = NULL;
37}
38
39
41{
42}
43
44
46 int argc, std::string *argv,
47 int verbose_level)
48{
49 int f_v = (verbose_level >= 1);
50 int i;
52
53 if (f_v) {
54 cout << "povray_job_description::read_arguments" << endl;
55 }
56
57 for (i = 0; i < argc; i++) {
58
59
60 if (ST.stringcmp(argv[i], "-video_options") == 0) {
62 i += Video_draw_options->read_arguments(argc - (i + 1),
63 argv + i + 1, verbose_level);
64
65 if (f_v) {
66 cout << "-video_options" << endl;
67 cout << "done with -video_options " << endl;
68 cout << "i = " << i << endl;
69 cout << "argc = " << argc << endl;
70 if (i < argc) {
71 cout << "next argument is " << argv[i] << endl;
72 }
73 }
74 }
75 else if (ST.stringcmp(argv[i], "-round") == 0) {
76 f_round = TRUE;
77 round = ST.strtoi(argv[++i]);
78 if (f_v) {
79 cout << "-round " << round << endl;
80 }
81 }
82
83 else if (ST.stringcmp(argv[i], "-rounds") == 0) {
84 f_rounds = TRUE;
85 rounds_as_string.assign(argv[++i]);
86 if (f_v) {
87 cout << "-rounds " << rounds_as_string << endl;
88 }
89 }
90 else if (ST.stringcmp(argv[i], "-nb_frames_default") == 0) {
92 nb_frames_default = ST.strtoi(argv[++i]);
93 if (f_v) {
94 cout << "-nb_frames_default " << nb_frames_default << endl;
95 }
96 }
97 else if (ST.stringcmp(argv[i], "-output_mask") == 0) {
99 output_mask.assign(argv[++i]);
100 if (f_v) {
101 cout << "-output_mask " << output_mask << endl;
102 }
103 }
104 else if (ST.stringcmp(argv[i], "-scene_objects") == 0) {
105 if (f_v) {
106 cout << "-scene_objects " << endl;
107 }
108 i++;
109 S = NEW_OBJECT(scene);
110
111 S->init(verbose_level);
112 i = S->read_scene_objects(argc, argv, i, verbose_level);
113 if (f_v) {
114 cout << "done with -scene_objects " << endl;
115 cout << "i = " << i << endl;
116 cout << "argc = " << argc << endl;
117 if (i < argc) {
118 cout << "next argument is " << argv[i] << endl;
119 }
120 }
121 }
122 else if (ST.stringcmp(argv[i], "-end") == 0) {
123 cout << "-end" << endl;
124 break;
125 }
126 else {
127 cout << "povray_job_description::read_arguments "
128 "unrecognized option " << argv[i] << endl;
129 }
130 } // next i
131 if (f_v) {
132 cout << "povray_job_description::read_arguments done" << endl;
133 }
134 return i + 1;
135}
136
138{
139 if (Video_draw_options) {
141 }
142 if (f_round) {
143 cout << "-round " << round << endl;
144 }
145 if (f_rounds) {
146 cout << "-rounds " << rounds_as_string << endl;
147 }
149 cout << "-nb_frames_default " << nb_frames_default << endl;
150 }
151 if (f_output_mask) {
152 cout << "-output_mask " << output_mask << endl;
153 }
154 if (S) {
155 S->print();
156 }
157}
158
159
160
161
162
163}}}
164
functions related to strings and character arrays
int read_arguments(int argc, std::string *argv, int verbose_level)
a collection of 3D geometry objects
Definition: graphics.h:1152
int read_scene_objects(int argc, std::string *argv, int i0, int verbose_level)
Definition: scene2.cpp:1177
int read_arguments(int argc, std::string *argv, int verbose_level)
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects