MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / Validate

Method Validate

modules/tools/animation_tool/src/raw_track.cc:82–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81template <typename _ValueType>
82bool RawTrack<_ValueType>::Validate() const {
83 float previous_ratio = -1.f;
84 for (size_t k = 0; k < keyframes.size(); ++k) {
85 const float frame_ratio = keyframes[k].ratio;
86 // Tests frame's ratio is in range [0:1].
87 if (frame_ratio < 0.f || frame_ratio > 1.f) {
88 return false;
89 }
90 // Tests that frames are sorted.
91 if (frame_ratio <= previous_ratio) {
92 return false;
93 }
94 previous_ratio = frame_ratio;
95 }
96 return true; // Validated.
97}
98
99template <typename _ValueType>
100void RawTrack<_ValueType>::Save(io::OArchive& _archive) const {

Callers 9

BuildMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
OptimizeFunction · 0.45
SampleTrackFunction · 0.45
SampleAnimationFunction · 0.45
operator()Method · 0.45
ImportMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected