Module quicksilver::geom [−][src]
A 2D geometry module
It contains basic shapes such as rectangles and circles, as well as vectors, lines, and a universal Shape API. It also has matrix-backed Transforms for arbitrary constant-time 2D transformations, such as rotating, scaling, or translating.
The Tilemap allows 2D storage of data in a world-like grid, and also moving objects at given speeds around the map, which is highly useful for games like platformers.
Structs
Circle |
A circle with a center and a radius |
Rectangle |
A rectangle with a top-left position and a size |
Tile |
An individual tile |
Tilemap |
A grid of Tile values |
Transform |
A 2D transformation represented by a matrix |
Vector |
A 2D vector with an arbitrary numeric type |
Enums
Shape |
A universal shape union |
Traits
Positioned |
A trait that indicates something exists in space |
Scalar |
A Scalar type that can be converted to a component of a Vector |
Functions
about_equal |
Find if two floating points are about equal |
lerp |
Linearly interpolate between two values |
lerp_angle |
Linearly interpolate between two angles, trying to find the shortest path |