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

@@ -40,8 +40,27 @@ void Animation::addChannel(Channel* pChannel)
_originalDuration = computeDurationFromChannels();
}
void Animation::removeChannel(Channel* pChannel)
{
ChannelList::iterator it = _channels.begin();
while(it != _channels.end() && it->get() != pChannel)
{
++ it;
}
if (it != _channels.end())
{
_channels.erase(it);
}
computeDuration();
}
double Animation::computeDurationFromChannels() const
{
if(_channels.empty())
return 0;
double tmin = 1e5;
double tmax = -1e5;
ChannelList::const_iterator chan;