Files
Tahgibu/source/core/Project.cpp
T
2026-09-29 23:35:03 -03:00

31 lines
644 B
C++

#include "core/Project.hpp"
namespace tahgibu {
Project::Project() : name_("Sin título") {
frames_.emplace_back();
}
void Project::setBaseFps(float fps) noexcept {
baseFps_ = Frame::clampFps(fps);
}
std::size_t Project::addFrame() {
frames_.emplace_back();
return frames_.size() - 1;
}
double Project::frameDurationSeconds(std::size_t index) const {
return frames_.at(index).durationSeconds(baseFps_);
}
double Project::totalDurationSeconds() const {
double total = 0.0;
for (const Frame& frame : frames_) {
total += frame.durationSeconds(baseFps_);
}
return total;
}
} // namespace tahgibu