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:
@@ -524,7 +524,7 @@ class MyTransformCallback : public osg::NodeCallback
|
||||
osg::MatrixTransform* transform = dynamic_cast<osg::MatrixTransform*>(node);
|
||||
if (nv && transform && nv->getFrameStamp())
|
||||
{
|
||||
double time = nv->getFrameStamp()->getReferenceTime();
|
||||
double time = nv->getFrameStamp()->getSimulationTime();
|
||||
transform->setMatrix(osg::Matrix::translate(0.0f,1.0f+cosf(time*_angular_velocity),0.0f));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user