mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:24:07 +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;
|
||||
}
|
||||
|
||||
/*
|
||||
float endFrameIndex = qMin(_lastFrame, animationGeometry.animationFrames.size() - (_loop ? 0.0f : 1.0f));
|
||||
float startFrameIndex = qMin(_firstFrame, endFrameIndex);
|
||||
if ((!_loop && (_frameIndex < startFrameIndex || _frameIndex > endFrameIndex)) || startFrameIndex == endFrameIndex) {
|
||||
// passed the end; apply the last frame
|
||||
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);
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: When moving the loop/frame calculations to AnimationLoop class, we changed this behavior
|
||||
// see AnimationLoop class for more details. Do we need to support clamping the endFrameIndex to
|
||||
// the max number of frames in the geometry???
|
||||
//
|
||||
// float endFrameIndex = qMin(_lastFrame, animationGeometry.animationFrames.size() - (_loop ? 0.0f : 1.0f));
|
||||
|
||||
// blend between the closest two frames
|
||||
applyFrame(getFrameIndex());
|
||||
}
|
||||
|
|
|
@ -104,17 +104,6 @@ private:
|
|||
QVector<int> _jointMappings;
|
||||
|
||||
AnimationLoop _animationLoop;
|
||||
|
||||
/*
|
||||
float _fps;
|
||||
bool _loop;
|
||||
bool _hold;
|
||||
bool _startAutomatically;
|
||||
float _firstFrame;
|
||||
float _lastFrame;
|
||||
bool _running;
|
||||
float _frameIndex;
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue