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:
@@ -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)
|
||||
|
||||
@@ -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] */
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user