Preparando la interfaz
This commit is contained in:
commit
66bedbb5f1
17 files changed
+876
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#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
|
||||
Reference in new issue
Block a user