Solar System - demo scence
parsing.cpp File Reference
#include <vector>
#include <stdio.h>
#include <string.h>
#include "tinyxml2.h"

Go to the source code of this file.

Functions

void operations_push_transform_attributes (tinyxml2::XMLElement *transform, std::vector< float > *operations)
 
void operations_push_transforms (tinyxml2::XMLElement *transforms, std::vector< float > *operations)
 
void operations_push_model (tinyxml2::XMLElement *model, std::vector< float > *operations)
 
void operations_push_models (tinyxml2::XMLElement *models, std::vector< float > *operations)
 
void operations_push_groups (tinyxml2::XMLElement *group, std::vector< float > *operations)
 
void operations_load_xml (const char *filename, std::vector< float > *operations)
 
void operations_print (std::vector< float > *operations)
 
void example1 (const char *filename)
 
int main2 (int argc, char *argv[])
 

Variables

static const int TRANSLATE = 1
 
static const int ROTATE = 2
 
static const int SCALE = 3
 
static const int LOAD_MODEL = 4
 
static const int BEGIN_GROUP = 5
 
static const int END_GROUP = 6
 

Function Documentation

◆ example1()

void example1 ( const char *  filename)
253 {
254 tinyxml2::XMLDocument doc;
255
256 if (doc.LoadFile(filename)) {
257 fprintf(stderr, "%s", doc.ErrorName());
258 exit(1);
259 }
260
261 std::vector<float> operations;
262 operations_load_xml(filename, &operations);
263 operations_print(&operations);
264}
void operations_print(std::vector< float > *operations)
Definition: parsing.cpp:172
void operations_load_xml(const char *filename, std::vector< float > *operations)
Definition: parsing.cpp:133

References operations_load_xml(), and operations_print().

Referenced by main2().

◆ main2()

int main2 ( int  argc,
char *  argv[] 
)
266 {
267 example1("test_files_phase_2/test_2_3.xml");
268 return 1;
269}
void example1(const char *filename)
Definition: parsing.cpp:253

References example1().

Variable Documentation

◆ BEGIN_GROUP

const int BEGIN_GROUP = 5
static

◆ END_GROUP

const int END_GROUP = 6
static

◆ LOAD_MODEL

const int LOAD_MODEL = 4
static

◆ ROTATE

const int ROTATE = 2
static

◆ SCALE

const int SCALE = 3
static

◆ TRANSLATE

const int TRANSLATE = 1
static