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

@@ -62,7 +62,7 @@ LightTransformCallback::operator()(Node* node, NodeVisitor* nv)
const FrameStamp* fs = nv->getFrameStamp();
if (!fs) return; // not frame stamp, no handle on the time so can't move.
double new_time = fs->getReferenceTime();
double new_time = fs->getSimulationTime();
if (nv->getTraversalNumber() != _previous_traversal_number)
{
_angle += _angular_velocity * (new_time - _previous_time);