Added support for recording camera animation paths in osgGLUT::Viewer, and fixed
the osgGA::AnimationPathManipulator to handle it. Added a new Drawable::ConstAttributeFunctor and make the accept(PrimitiveFunctor) be a const method so can disallows modification. Added Drawable::supports(...) methods for each of the AttributeFunctor, ConstAttributeFunctor and PrimitiveFunctor so that programs can querry whether it is possible to use functors with that object type.
This commit is contained in:
@@ -20,14 +20,14 @@ bool AnimationPath::getInterpolatedControlPoint(double time,ControlPoint& contro
|
||||
double fraction_part = modulated_time - floor(modulated_time);
|
||||
if (fraction_part>0.5) fraction_part = 1.0-fraction_part;
|
||||
|
||||
time = (fraction_part*2.0) * getPeriod();
|
||||
time = getFirstTime()+(fraction_part*2.0) * getPeriod();
|
||||
break;
|
||||
}
|
||||
case(LOOP):
|
||||
{
|
||||
double modulated_time = (time - getFirstTime())/getPeriod();
|
||||
double fraction_part = modulated_time - floor(modulated_time);
|
||||
time = fraction_part * getPeriod();
|
||||
time = getFirstTime()+fraction_part * getPeriod();
|
||||
break;
|
||||
}
|
||||
case(NO_LOOPING):
|
||||
|
||||
Reference in New Issue
Block a user