HI Arend, The viewer::run() method is just a convenience method, which is great for small examples that want to illustrate other things than the make up for the frame loop, however, for full blown apps I would typically recommend just rolling your own frame loop. The next simplicist form of frame loop is to expand the viewer.run() method to something like:
while(!viewer.done())
{
viewer.frame(simulationTime);
}
To further expand it you'd have:
while(!viewer.done())
{
viewer.advance(simulationTime);
viewer.eventTraversal();
viewer.updateTraversal();
viewer.renderingTraversals();
}
You have access to all the source code of the OSG so I'd encourage you to
look at the implementations on the Viewer::run() and Viewer::frame()
methods so you see what is happening under the hood.
Robert.
On 21 March 2014 08:31, Abbing, Arend <[email protected]> wrote:
> Hi,
>
>
>
> Is there an easy way of controlling the simulated time without creating a
> Viewer subclass and re-implementing the run method?
>
>
>
> I have a pseudo loader plugin that interfaces the HLA world and
> manipulates the scene graph. What I basically want is the setting of the
> simulated start time and the time scale.
>
>
>
> Regards,
>
>
>
> Arend
>
> ing. Arend Abbing
>
> Software Engineer
> Maritime Simulation & Software Group
>
>
>
> *MARIN*
>
>
> 2, Haagsteeg E [email protected] P.O. Box 28 T +31 317 49 39 11 6700
> AA Wageningen F +31 317 49 32 45 T +31 317 49 32 55 The Netherlands I
> www.marin.nl
>
>
>
> MARIN news: 32nd FPSO JIP Week, March 24-28,
> Monaco<http://www.marin.nl/web/News/News-items/32nd-FPSO-JIP-Week-March-2428-Monaco.htm>
>
> This e-mail may be confidential, privileged and/or protected by copyright.
> If you are not the intended recipient, you should return it to the sender
> immediately and delete your copy from your system.
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
<<inline: imagecc3753.JPG>>
<<inline: imagece06a5.JPG>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

