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:
@@ -200,7 +200,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
|
||||
if (cv->getFrameStamp())
|
||||
{
|
||||
drawable->setReferenceTime(cv->getFrameStamp()->getReferenceTime());
|
||||
drawable->setSimulationTime(cv->getFrameStamp()->getSimulationTime());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
// need to update the drawable's frame count.
|
||||
if (cv->getFrameStamp())
|
||||
{
|
||||
drawable->updateReferenceTime(cv->getFrameStamp()->getReferenceTime());
|
||||
drawable->updateSimulationTime(cv->getFrameStamp()->getSimulationTime());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -246,8 +246,8 @@ void LightPointNode::traverse(osg::NodeVisitor& nv)
|
||||
const float minimumIntensity = 1.0f/256.0f;
|
||||
const osg::Vec3 eyePoint = cv->getEyeLocal();
|
||||
|
||||
double time=drawable->getReferenceTime();
|
||||
double timeInterval=drawable->getReferenceTimeInterval();
|
||||
double time=drawable->getSimulationTime();
|
||||
double timeInterval=drawable->getSimulationTimeInterval();
|
||||
|
||||
const osg::Polytope clipvol(cv->getCurrentCullingSet().getFrustum());
|
||||
const bool computeClipping = false;//(clipvol.getCurrentMask()!=0);
|
||||
|
||||
Reference in New Issue
Block a user