Hi Robert,

Your proposed solution is not what I really want. I would like to have a 
capability where I can alter the behaviour of the simulated time determination 
from within a plugin without write my own Viewer class. This allows me to use 
the OSG software as is without writing my own stuff.

Regards,

Arend




MARIN news: Hydrodynamic software suites make design concept evaluation more 
efficient<http://www.marin.nl/web/News/News-items/Hydrodynamic-software-suites-make-design-concept-evaluation-more-efficient-1.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.


From: [email protected] 
[mailto:[email protected]] On Behalf Of Robert Osfield
Sent: Friday, March 21, 2014 10:05 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Controlling simulated time

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]<mailto:[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
[cid:[email protected]][cid:[email protected]]


ing. Arend Abbing


Software Engineer

Maritime Simulation & Software Group






MARIN





2, Haagsteeg

E [email protected]<mailto:[email protected]>

P.O. Box 28

T +31 317 49 39 11<tel:%2B31%20317%2049%2039%2011>


6700 AA Wageningen

F +31 317 49 32 45<tel:%2B31%20317%2049%2032%2045>

T  +31 317 49 32 55<tel:%2B31%20317%2049%2032%2055>

The Netherlands

I  www.marin.nl<http://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]<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

<<inline: image001.jpg>>

<<inline: image003.jpg>>

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to