X3DTK::X3DRoute
class from a scene graph.Some important functions and classes:
X3DTK::X3DRoute
to send the values.#include <X3DTK/kernel.h> #include <X3DTK/X3D/scenegraph.h> #include <X3DTK/X3D/scenesaver.h> #include <iostream> using namespace X3DTK; using namespace std; int main(int argc, char *argv[]) { if (argc <= 1) { cerr << "usage: routetester input" << endl; exit(0); } // Loader to load the default X3D Nodes X3D::Loader *loader = new X3D::Loader(); X3D::Scene *s = loader->load(argv[1], false); X3D::SceneSaver *saver = new X3D::SceneSaver(); // Getting the routes of the scene MFRoute routes = s->getRoutes(); // Iterating the routes for (MFRoute::const_iterator it = routes.begin(); it != routes.end(); ++it) { cout << "route = " << (*it)->getFromNode() << ", " << (*it)->getFromField() << " - " << (*it)->getToNode() << ", " << (*it)->getToField() << endl; (*it)->send(); } saver->saveAs(s, "myFile.x3d"); return 1; }