Module polystrip::vertex [−][src]
Vertices and shapes, the core of the rendering process.
Linear algebra libraries
A number of linear algebra libraries exist for rust. polystrip
provides Vector2
, Vector3
, and Matrix4
as wrappers
around definitions provided by the mint
library, which is compatible with most of these linear
algebra libraries
Coordinates
Screen space
(0.0, 0.0)
is the screen center. (1.0, 1.0)
is the top-right corner.
(-1.0, -1.0)
is the bottom-left corner.
Texture space
(0.0, 0.0)
is the top-left corner
(1.0, 1.0)
is the bottom-right corner
Structs
Color | A color in the sRGB color space, with red, green, blue, and alpha components all represented with |
ColorVertex | A vertex describing a position and a color. |
ColoredShape | A set of vertices and indices describing a geometric shape as a set of triangles. |
Matrix4 | A 4 x 4 column major matrix in screen space |
Rect | A rectangle in pixel coordinates. (x, y) is the top-left corner; (w, h) expanding rightward and downward. |
StrokedShape | A set of vertices and indices describing an outlined geometric shape as a set of lines. |
TextureVertex | A vertex describing a position and a position on a texture. |
TexturedShape | A set of vertices and indices describing a geometric shape as a set of triangles. |
Vector2 | A 2D vector in screen space |
Vector3 | A 3D vector in screen space |