mirror of
https://github.com/overte-org/overte.git
synced 2025-06-24 13:19:47 +02:00
some cleanup
This commit is contained in:
parent
6ff8abcbdd
commit
d2ab3e69f0
2 changed files with 6 additions and 31 deletions
|
@ -138,26 +138,12 @@ void AnimationHandle::simulate(float deltaTime) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// TODO: When moving the loop/frame calculations to AnimationLoop class, we changed this behavior
|
||||||
float endFrameIndex = qMin(_lastFrame, animationGeometry.animationFrames.size() - (_loop ? 0.0f : 1.0f));
|
// see AnimationLoop class for more details. Do we need to support clamping the endFrameIndex to
|
||||||
float startFrameIndex = qMin(_firstFrame, endFrameIndex);
|
// the max number of frames in the geometry???
|
||||||
if ((!_loop && (_frameIndex < startFrameIndex || _frameIndex > endFrameIndex)) || startFrameIndex == endFrameIndex) {
|
//
|
||||||
// passed the end; apply the last frame
|
// float endFrameIndex = qMin(_lastFrame, animationGeometry.animationFrames.size() - (_loop ? 0.0f : 1.0f));
|
||||||
applyFrame(glm::clamp(_frameIndex, startFrameIndex, endFrameIndex));
|
|
||||||
if (!_hold) {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// wrap within the the desired range
|
|
||||||
if (_frameIndex < startFrameIndex) {
|
|
||||||
_frameIndex = endFrameIndex - glm::mod(endFrameIndex - _frameIndex, endFrameIndex - startFrameIndex);
|
|
||||||
|
|
||||||
} else if (_frameIndex > endFrameIndex) {
|
|
||||||
_frameIndex = startFrameIndex + glm::mod(_frameIndex - startFrameIndex, endFrameIndex - startFrameIndex);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// blend between the closest two frames
|
// blend between the closest two frames
|
||||||
applyFrame(getFrameIndex());
|
applyFrame(getFrameIndex());
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,17 +104,6 @@ private:
|
||||||
QVector<int> _jointMappings;
|
QVector<int> _jointMappings;
|
||||||
|
|
||||||
AnimationLoop _animationLoop;
|
AnimationLoop _animationLoop;
|
||||||
|
|
||||||
/*
|
|
||||||
float _fps;
|
|
||||||
bool _loop;
|
|
||||||
bool _hold;
|
|
||||||
bool _startAutomatically;
|
|
||||||
float _firstFrame;
|
|
||||||
float _lastFrame;
|
|
||||||
bool _running;
|
|
||||||
float _frameIndex;
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue