Added quaternion serialization; serialization methods now always work on references to improve performance; removed dead code from CygonRectanglePacker; improved commenting on Progression framework

git-svn-id: file:///srv/devel/repo-conversion/nusu@29 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2007-06-12 19:15:55 +00:00
parent 979e6328fb
commit 991fab9721
4 changed files with 42 additions and 14 deletions

View file

@ -107,7 +107,7 @@ namespace Nuclex.Support.Packing {
return fits;
}
/// <summary>Finds the best position for a rectangle of the given width</summary>
/// <summary>Finds the best position for a rectangle of the given dimensions</summary>
/// <param name="rectangleWidth">Width of the rectangle to find a position for</param>
/// <param name="rectangleHeight">Height of the rectangle to find a position for</param>
/// <param name="placement">Received the best placement found for the rectangle</param>
@ -116,9 +116,6 @@ namespace Nuclex.Support.Packing {
int rectangleWidth, int rectangleHeight, out Point placement
) {
// Total surface area of the rectangle
int rectangleArea = rectangleWidth * rectangleHeight;
// Slice index, vertical position and score of the best placement we could find
int bestSliceIndex = -1; // Slice index where the best placement was found
int bestSliceY = 0; // Y position of the best placement found
@ -254,6 +251,7 @@ namespace Nuclex.Support.Packing {
} else { // No direct hit, rectangle ends inside another slice
// Make index from negative BinarySearch() result
endSlice = ~endSlice;
// Find out to which height we need to return at the right end of