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:
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
osg::MatrixTransform *xform = dynamic_cast<osg::MatrixTransform *>(node);
|
||||
if (xform && enabled_) {
|
||||
double t = nv->getFrameStamp()->getReferenceTime();
|
||||
double t = nv->getFrameStamp()->getSimulationTime();
|
||||
xform->setMatrix(osg::Matrix::rotate(t, osg::Vec3(0, 0, 1)));
|
||||
}
|
||||
traverse(node, nv);
|
||||
|
||||
Reference in New Issue
Block a user