Added: #1469 getDuration function to get the duration of the step (useful for timers)

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 13 years ago
parent e72956026a
commit 2b954a23db

@ -34,9 +34,12 @@ class ICameraAnimationStep
public: public:
/// This function is called when it's time to parse the primitive to load the camera animation step /// This function is called when it's time to parse the primitive to load the camera animation step
virtual bool parseStep(const NLLIGO::IPrimitive* prim, const std::string& filename) = 0; virtual bool parseStep(const NLLIGO::IPrimitive* prim, const std::string& filename) = 0;
// Function that adds a camera animation modifier to this step /// Function that adds a camera animation modifier to this step
void addModifier(ICameraAnimationModifier* modifier); void addModifier(ICameraAnimationModifier* modifier);
/// Function that returns the duration of the step (in seconds)
virtual float getDuration() const = 0;
protected: protected:
// The list of modifiers // The list of modifiers
std::vector<ICameraAnimationModifier*> Modifiers; std::vector<ICameraAnimationModifier*> Modifiers;

@ -70,6 +70,11 @@ public:
return true; return true;
} }
virtual float getDuration() const
{
return Duration;
}
}; // This class must not be registered because it a base class }; // This class must not be registered because it a base class
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -278,5 +283,10 @@ public:
return true; return true;
} }
virtual float getDuration() const
{
return Duration;
}
}; };
CAMERA_ANIMATION_REGISTR_STEP(CCameraAnimationStepReturn, "camera_animation_return"); CAMERA_ANIMATION_REGISTR_STEP(CCameraAnimationStepReturn, "camera_animation_return");
Loading…
Cancel
Save