Improved image caching logic, to better estimate max image sizes possible, based on clip scale and keyframe settings... so we are always dealing with the smallest possible frame sizes for performance (without losing quality)

This commit is contained in:
Jonathan Thomas
2016-09-17 17:14:27 -05:00
parent 183b0714e2
commit 1743558f99
5 changed files with 78 additions and 6 deletions

View File

@@ -220,6 +220,25 @@ Point Keyframe::GetClosestPoint(Point p) {
return closest;
}
// Get max point (by Y coordinate)
Point Keyframe::GetMaxPoint() {
Point maxPoint(-1, -1);
// loop through points, and find the largest Y value
for (long int x = 0; x < Points.size(); x++) {
// Get each point
Point existing_point = Points[x];
// Is point larger than max point
if (existing_point.co.Y >= maxPoint.co.Y) {
// New max point found
maxPoint = existing_point;
}
}
return maxPoint;
}
// Get the value at a specific index
float Keyframe::GetValue(long int index)
{