Crate impact_rs

Source
Expand description

This crate provides utilities for performing collision queries between rectangles and rays, including swept checks for moving rectangles. It leverages fixed-point arithmetic provided by the fixed32 crate to handle the computations.

Modules§

prelude

Structs§

RayIntersectionResult

Functions§

ray_vs_rect
Performs a ray-rectangle intersection test.
ray_vs_rect_horizontal_time
Computes the intersection time of a horizontal ray with a target rectangle.
ray_vs_rect_vertical_time
Computes the intersection time of a vertical ray with a target rectangle.
swept_rect_vs_rect
Checks for intersection between a swept rectangle and a target rectangle.
swept_rect_vs_rect_horizontal_time
Checks for intersection between a swept rectangle and a target rectangle along the horizontal axis.
swept_rect_vs_rect_vertical_time
Checks for intersection between a vertically swept rectangle and a target rectangle.