rect topic

CategoryRect

Some helper functions for managing rectangles and 2D points, in both integer and floating point versions.

Functions

sdlGetRectAndLineIntersection(Pointer<SdlRect> rect, Pointer<Int32> x1, Pointer<Int32> y1, Pointer<Int32> x2, Pointer<Int32> y2) bool rect
Calculate the intersection of a rectangle and line segment.
sdlGetRectAndLineIntersectionFloat(Pointer<SdlFRect> rect, Pointer<Float> x1, Pointer<Float> y1, Pointer<Float> x2, Pointer<Float> y2) bool rect
Calculate the intersection of a rectangle and line segment with float precision.
sdlGetRectEnclosingPoints(Pointer<SdlPoint> points, int count, Pointer<SdlRect> clip, Pointer<SdlRect> result) bool rect
Calculate a minimal rectangle enclosing a set of points.
sdlGetRectEnclosingPointsFloat(Pointer<SdlFPoint> points, int count, Pointer<SdlFRect> clip, Pointer<SdlFRect> result) bool rect
Calculate a minimal rectangle enclosing a set of points with float precision.
sdlGetRectIntersection(Pointer<SdlRect> a, Pointer<SdlRect> b, Pointer<SdlRect> result) bool rect
Calculate the intersection of two rectangles.
sdlGetRectIntersectionFloat(Pointer<SdlFRect> a, Pointer<SdlFRect> b, Pointer<SdlFRect> result) bool rect
Calculate the intersection of two rectangles with float precision.
sdlGetRectUnion(Pointer<SdlRect> a, Pointer<SdlRect> b, Pointer<SdlRect> result) bool rect
Calculate the union of two rectangles.
sdlGetRectUnionFloat(Pointer<SdlFRect> a, Pointer<SdlFRect> b, Pointer<SdlFRect> result) bool rect
Calculate the union of two rectangles with float precision.
sdlHasRectIntersection(Pointer<SdlRect> a, Pointer<SdlRect> b) bool rect
Determine whether two rectangles intersect.
sdlHasRectIntersectionFloat(Pointer<SdlFRect> a, Pointer<SdlFRect> b) bool rect
Determine whether two rectangles intersect with float precision.
sdlxGetRectAndLineIntersection(SdlxRect rect, SdlxPoint p1, SdlxPoint p2) bool rect
Calculate the intersection of a rectangle and line segment.
sdlxGetRectAndLineIntersectionFloat(SdlxFRect rect, SdlxFPoint p1, SdlxFPoint p2) bool rect
Calculate the intersection of a rectangle and line segment with float precision.
sdlxGetRectEnclosingPoints(List<SdlxPoint> points, SdlxRect? clip, SdlxRect result) bool rect
Calculate a minimal rectangle enclosing a set of points.
sdlxGetRectEnclosingPointsFloat(List<SdlxFPoint> points, SdlxFRect? clip, SdlxFRect result) bool rect
Calculate a minimal rectangle enclosing a set of points with float precision.
sdlxGetRectIntersection(SdlxRect a, SdlxRect b, SdlxRect result) bool rect
Calculate the intersection of two rectangles.
sdlxGetRectIntersectionFloat(SdlxFRect a, SdlxFRect b, SdlxFRect result) bool rect
Calculate the intersection of two rectangles with float precision.
sdlxGetRectUnion(SdlxRect a, SdlxRect b, SdlxRect result) bool rect
Calculate the union of two rectangles.
sdlxGetRectUnionFloat(SdlxFRect a, SdlxFRect b, SdlxFRect result) bool rect
Calculate the union of two rectangles with float precision.
sdlxHasRectIntersection(SdlxRect a, SdlxRect b) bool rect
Determine whether two rectangles intersect.
sdlxHasRectIntersectionFloat(SdlxFRect a, SdlxFRect b) bool rect
Determine whether two rectangles intersect with float precision.