Added osg::FrameStamp::set/getSimulationTime().

Added setting of osg_SimulationTime and osg_DeltaSimulationTime to the uniforms set by SceneView

Added frame(double simulationTime) and advance(double simulationTime) parameters to
osgViewer::SimpleViewer, Vewer and CompositeViewer.

Updated various examples and Nodes to use SimulationTime where appropriate.
This commit is contained in:
Robert Osfield
2007-01-25 12:02:51 +00:00
parent 13dd5acb63
commit 7232a831da
48 changed files with 321 additions and 138 deletions

View File

@@ -230,7 +230,7 @@ void AnimationPathCallback::operator()(Node* node, NodeVisitor* nv)
nv->getVisitorType()==NodeVisitor::UPDATE_VISITOR &&
nv->getFrameStamp())
{
double time = nv->getFrameStamp()->getReferenceTime();
double time = nv->getFrameStamp()->getSimulationTime();
_latestTime = time;
if (!_pause)

View File

@@ -18,6 +18,7 @@ FrameStamp::FrameStamp():Referenced()
{
_frameNumber=0;
_referenceTime=0;
_simulationTime=0;
tm_sec=0; /* Seconds. [0-60] (1 leap second) */
tm_min=0; /* Minutes. [0-59] */

View File

@@ -127,7 +127,7 @@ void Sequence::traverse(NodeVisitor& nv)
if (framestamp)
{
double t = framestamp->getReferenceTime();
double t = framestamp->getSimulationTime();
if (_last == -1.0)
_last = t;