MaxRectsPacker
binpacking.MaxRectsPacker (Class)
Implements: IOccupancy
Instance Members
binWidth: Int
binHeight: Int
binAllowFlip: Bool
insert(width: Int, height: Int, method: FreeRectChoiceHeuristic): Rect
Name | Type |
---|---|
width |
Int |
height |
Int |
method |
FreeRectChoiceHeuristic |
Returns |
---|
Rect |
occupancy(): Float
Returns |
---|
Float |
Name | Type | Default |
---|---|---|
width |
Int | 0 |
height |
Int | 0 |
allowFlip |
Bool | true |
Private Members
scoreRect(width: Int, height: Int, method: FreeRectChoiceHeuristic): MaxRectsPackerRectScore
Name | Type |
---|---|
width |
Int |
height |
Int |
method |
FreeRectChoiceHeuristic |
Returns |
---|
MaxRectsPackerRectScore |
Name | Type |
---|---|
x |
Int |
y |
Int |
width |
Int |
height |
Int |
Returns |
---|
Int |
findPositionForNewNodeBottomLeft(width: Int, height: Int, result: MaxRectsPackerBestFitPosition): MaxRectsPackerBestFitPosition
Name | Type |
---|---|
width |
Int |
height |
Int |
result |
MaxRectsPackerBestFitPosition |
Returns |
---|
MaxRectsPackerBestFitPosition |
findPositionForNewNodeBestShortSideFit(width: Int, height: Int, result: MaxRectsPackerBestFitPosition): MaxRectsPackerBestFitPosition
Name | Type |
---|---|
width |
Int |
height |
Int |
result |
MaxRectsPackerBestFitPosition |
Returns |
---|
MaxRectsPackerBestFitPosition |
findPositionForNewNodeBestLongSideFit(width: Int, height: Int, result: MaxRectsPackerBestFitPosition): MaxRectsPackerBestFitPosition
Name | Type |
---|---|
width |
Int |
height |
Int |
result |
MaxRectsPackerBestFitPosition |
Returns |
---|
MaxRectsPackerBestFitPosition |
findPositionForNewNodeBestAreaFit(width: Int, height: Int, result: MaxRectsPackerBestFitPosition): MaxRectsPackerBestFitPosition
Name | Type |
---|---|
width |
Int |
height |
Int |
result |
MaxRectsPackerBestFitPosition |
Returns |
---|
MaxRectsPackerBestFitPosition |
findPositionForNewNodeContactPoint(width: Int, height: Int, result: MaxRectsPackerBestFitPosition): MaxRectsPackerBestFitPosition
Name | Type |
---|---|
width |
Int |
height |
Int |
result |
MaxRectsPackerBestFitPosition |
Returns |
---|
MaxRectsPackerBestFitPosition |
Name | Type |
---|---|
freeNode |
Rect |
usedNode |
Rect |
Returns |
---|
Bool |
pruneFreeList(): Void
Name | Type |
---|---|
i1start |
Float |
i1end |
Float |
i2start |
Float |
i2end |
Float |
Returns |
---|
Float |