Module types
Common types used across the Trackforge library.
This module defines fundamental structures like BoundingBox.
Quick Reference
| Item | Kind | Description |
|---|---|---|
BoundingBox |
struct | Axis-aligned bounding box in TLWH (top-left, width, height) format. |
Types
BoundingBox
Axis-aligned bounding box in TLWH (top-left, width, height) format.
All coordinates are in pixels with the origin at the top-left corner of the image.
Fields
| Name | Type | Description |
|---|---|---|
x |
f32 |
Horizontal position of the top-left corner. |
y |
f32 |
Vertical position of the top-left corner. |
width |
f32 |
Width of the box. |
height |
f32 |
Height of the box. |
Implementations
Create a bounding box from top-left corner coordinates plus dimensions.
Trait Implementations