isCollide

A function to check the intersection of two shapes. It does not give an intersection point, it gives a state that informs if there is an intersection.

@safe nothrow pure
bool
isCollide
(
Shape!float first
,,
Vecf firstPos = vecf(0, 0)
,
Vecf secondPos = vecf(0, 0)
)

Parameters

first Shape!float

First shape.

second Shape!float

Second shape.

firstPos Vecf

Position first shape.

secondPos Vecf

Position second shape.

Return Value

Type: bool

Gives a state indicating if there is an intersection.

Examples

isCollide(Shape.Rectangle(vecf(32,32),vecf(48,48)),
                 Shape.Line(vecf(48,32),vecf(32,48)));

Meta