#include "MESH_MyStructureComputer.h" #include #include #include #include #include using namespace X3DTK; using namespace std; int main(int argc, char *argv[]) { if (argc <= 1) { cerr << "usage: MyStructureComputer input" << endl; exit(0); } // DefaultLoader to load the default X3D Nodes. X3D::Loader *loader = Singleton::getInstance(); // Instanciation of the new MeshBuilder. X3D::MeshBuilder *meshbuilder = Singleton::getInstance(); // Instanciation of the new MyStructureComputer. MESH::MyStructureComputer *msc = Singleton::getInstance(); // Loads the scene. X3D::Scene *s = loader->load(argv[1], false); MESH::Scene *ms = meshbuilder->build(s); MySimpleMesh *mesh = msc->compute(ms); GraphTester *gt = Singleton::getInstance(); gt->test(ms); // prints the content. mesh->print(); // removes all the instances. Singleton::removeInstance(); Singleton::removeInstance(); Singleton::removeInstance(); return 1; }