133 {
134 tinyxml2::XMLDocument doc;
135
136 if (doc.LoadFile(filename)) {
137 fprintf(stderr, "%s", doc.ErrorName());
138 exit(1);
139 }
140
141 tinyxml2::XMLElement *world = doc.FirstChildElement("world");
142
143
144 tinyxml2::XMLElement *camera = world->FirstChildElement("camera");
145
146 tinyxml2::XMLElement *position = camera->FirstChildElement("position");
148
149 tinyxml2::XMLElement *lookAt = camera->FirstChildElement("lookAt");
151
152 tinyxml2::XMLElement *up = camera->FirstChildElement("up");
154 else operations->insert(operations->end(), {0, 1, 0});
155
156 tinyxml2::XMLElement *projection = camera->FirstChildElement("projection");
157 if (projection) {
158 operations->push_back(projection->FloatAttribute("fov"));
159 operations->push_back(projection->FloatAttribute("near"));
160 operations->push_back(projection->FloatAttribute("far"));
161 } else operations->insert(operations->end(), {60, 1, 1000});
162
163
164
165 tinyxml2::XMLElement *group = world->FirstChildElement("group");
167}
void operations_push_groups(tinyxml2::XMLElement *group, std::vector< float > *operations)
Definition: parsing.cpp:112