sample code for printing to Messages screen
Posted: Mon Jun 27, 2011 9:43 am
Hi,
I was wondering if there's a simple syntax for printing something to the 'messages' screen of the OpenSim GUI. I'm writing a plugin and just want to be able to see the function outputs (e.g. positions, rotations, etc) as I run things for error checking (without having to print them to an external .sto/.mot file).
Essentially, I'm just looking for something along the lines of:
computeMotion(const SimTK::State& s) const
{
stuffstuffstuff computationscomputationscomputations
--> print to the messages window what dq is before 'return dq;' <--
return dq;
}
It seems simple enough, but I don't know what appropriate syntax for it since I can't seem to find an example of a code snippet that does it.
Thanks!
adila
I was wondering if there's a simple syntax for printing something to the 'messages' screen of the OpenSim GUI. I'm writing a plugin and just want to be able to see the function outputs (e.g. positions, rotations, etc) as I run things for error checking (without having to print them to an external .sto/.mot file).
Essentially, I'm just looking for something along the lines of:
computeMotion(const SimTK::State& s) const
{
stuffstuffstuff computationscomputationscomputations
--> print to the messages window what dq is before 'return dq;' <--
return dq;
}
It seems simple enough, but I don't know what appropriate syntax for it since I can't seem to find an example of a code snippet that does it.
Thanks!
adila