diff options
Diffstat (limited to 'NT/src/rotor.cpp')
| -rw-r--r-- | NT/src/rotor.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/NT/src/rotor.cpp b/NT/src/rotor.cpp index d280029..bf0c26a 100644 --- a/NT/src/rotor.cpp +++ b/NT/src/rotor.cpp @@ -82,17 +82,28 @@ int main(){ delete m; delete p; */ -Rotor::Graph g; -cerr<<(g.load_file("testgraph.json","./")?"loaded ":"could not load ")<<"testgraph.json"<<endl; -/* -Json::Value js; -f.list_node("time",js); -Json::StyledWriter writer; -cerr<<writer.write(js)<<endl; -f.list_node("multiply",js); -cerr<<writer.write(js)<<endl; -f.list_node("print",js); -cerr<<writer.write(js)<<endl; -*/ + Rotor::Graph g; + cerr<<(g.load_file("testgraph.json","./")?"loaded ":"could not load ")<<"testgraph.json"<<endl; + /* + Json::Value js; + f.list_node("time",js); + Json::StyledWriter writer; + cerr<<writer.write(js)<<endl; + f.list_node("multiply",js); + cerr<<writer.write(js)<<endl; + f.list_node("print",js); + cerr<<writer.write(js)<<endl; + */ + + //now need a way to grab output + + Node* p=g.find_node("print"); + + if (p){ + for (double t=0;t<10.0;t+=0.765){ + Frame_parameters f=Frame_parameters(t,25.0,10.0,640,360); + printf("%04f %s\n",t,(dynamic_cast<Node_type<string>*>(p))->get_output(f).c_str()); + } + } } |
