Submitted with fixes by Julian Valentin

This commit is contained in:
Cedric Pinson
2016-06-25 07:49:56 +01:00
committed by Robert Osfield
parent 295da33cdf
commit 0ecb52ff82
26 changed files with 298 additions and 189 deletions

View File

@@ -47,6 +47,9 @@ namespace osgAnimation
// addChannel insert the channel and call the computeDuration function
void addChannel (Channel* pChannel);
// removeChannel remove the channel from channels list and call the computeDuration function
void removeChannel (Channel* pChannel);
/** Those accessors let you add and remove channels
* if you modify something that can change the duration
* you are supposed to call computeDuration or setDuration
@@ -61,16 +64,13 @@ namespace osgAnimation
*/
void setDuration(double duration);
/** Compute duration from channel and keyframes
* if the duration is not specified you should
* call this method before using it
*/
void computeDuration();
double getDuration() const;
void setWeight (float weight);
float getWeight() const;
@@ -85,10 +85,10 @@ namespace osgAnimation
protected:
double computeDurationFromChannels() const;
~Animation() {}
double computeDurationFromChannels() const;
double _duration;
double _originalDuration;
float _weight;