\BinContainerPacking\HandlersIntersectionHandler

Class to handle intersection between items.

Summary

Methods
Properties
Constants
isIntersected()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
isRectangleIntersected()
No private properties found
N/A

Methods

isIntersected()

isIntersected(\BinContainerPacking\Item  $firstItem, \BinContainerPacking\Item  $secondItem) : bool

The two 3d-plane intersection checker.

Parameters

\BinContainerPacking\Item $firstItem

The first 3d-plane item.

\BinContainerPacking\Item $secondItem

The second 3d-plane item.

Returns

bool —

The flag indicates whether both items are intersected with each other or not, return true if both items are intersected with each other, otherwise false.

isRectangleIntersected()

isRectangleIntersected(\BinContainerPacking\Item  $firstItem, \BinContainerPacking\Item  $secondItem, int  $xAxis, int  $yAxis) : bool

The two rectangles intersection checker.

Parameters

\BinContainerPacking\Item $firstItem

The first item, in this case a rectangle.

\BinContainerPacking\Item $secondItem

The second item, in this case a rectangle as well.

int $xAxis

The x axis.

int $yAxis

The y axis.

Returns

bool —

The flag indicates whether both items are intersected with each other or not, return true if both items are intersected with each other, otherwise false.