more pr comment edits

This commit is contained in:
ElonOlsson
2021-09-08 10:40:56 -04:00
parent 70424290b7
commit cd4ebd7532
5 changed files with 20 additions and 24 deletions

View File

@@ -297,6 +297,7 @@ void RenderablePlaneTimeVaryingImage::updateActiveTriggerTimeIndex(double curren
_activeTriggerTimeIndex = static_cast<int>(_sourceFiles.size() - 1);
}
}
void RenderablePlaneTimeVaryingImage::computeSequenceEndTime() {
if (_sourceFiles.size() > 1) {
const double lastTriggerTime = _startTimes[_sourceFiles.size() - 1];
@@ -305,11 +306,8 @@ void RenderablePlaneTimeVaryingImage::computeSequenceEndTime() {
(static_cast<double>(_sourceFiles.size() - 1.0));
_sequenceEndTime = lastTriggerTime + averageStateDuration;
}
else {
// If there's just one state it should never disappear!
_sequenceEndTime = std::numeric_limits<double>::max();
}
}
void RenderablePlaneTimeVaryingImage::loadTexture() {
if (_activeTriggerTimeIndex != -1) {
_texture = _textureFiles[_activeTriggerTimeIndex].get();

View File

@@ -60,7 +60,8 @@ private:
void updateActiveTriggerTimeIndex(double currenttime);
void computeSequenceEndTime();
double _sequenceEndTime;
// If there's just one state it should never disappear
double _sequenceEndTime = std::numeric_limits<double>::max();
std::vector<std::string> _sourceFiles;
std::vector<double> _startTimes;
int _activeTriggerTimeIndex = 0;