Using the API Visualizer
Available in 3.0:
For the most basic visualization, all you need to do is call the Model method setUseVisualizer() prior to calling initSystem():
Model myModel;
myModel.setUseVisualizer(true);
// usual stuff ...
myModel.initSystem();
This should result in a graphics window popping up with a reasonable display of your model in it.
For more information, look in the OpenSim API's Doxygen documentation for the ModelVisualizer class. For advanced users, OpenSim::ModelVisualizer is based on the SimTK::Visualizer class that you can read more about in Simbody's Doxygen documentation.
More to come ...
OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.