Expand description
Vectors, matrices, directions, and geometry.
Modules§
Macros§
- impl_
affine - impl_
approx - Implement
approxtraits on a type. - impl_
bytemuck - impl_
casts - Impl
Castableon a generic type. - impl_
interp - impl_
neg - impl_op
- impl_
op_ scalar - impl_
serde - impl_
tuple_ arr - Impl from/to tuples and arrays for a simple struct.
Structs§
- Affine2
- A 2D affine matrix (translation, rotation, scaling and shear).
- Affine3
- A 3D affine matrix (translation, rotation, and scaling).
- Circle
- A circle, represented by a center point and radius.
- Degrees
- An angle represented in degrees.
- Line
- A line segment connecting two points.
- Mat2
- A 2x2 column major matrix.
- Mat3
- A 3x3 column major matrix.
- Mat4
- A 4x4 column major matrix.
- Polygon
- A convex polygon.
- Projection
- Represents the projection of a 2D shape on an axis.
- Quad
- A quad, represented by 4 points.
- Radians
- An angle represented in radians.
- Ray
- A ray with an origin and direction.
- RayHit
- A raycast hit on the surface of a shape.
- Rect
- A 2D axis-aligned rectangle.
- Rotations
- An angle represented in rotations.
- Transform
- Triangle
- A triangle, represented by 3 points.
- Vec2
- A 2-dimensional vector.
- Vec3
- A 3-dimensional vector.
- Vec4
- A 4-dimensional vector.
Enums§
- Cardinal
- A cardinal (4-way) direction.
- Circle
Out - DynShape
- A circle, triangle, rect, quad, or polygon.
- Octal
- An octal (8-way) direction.
- RectOut
Traits§
- Angle
- A type that represents an angle in 2D space.
- Approach
- A type that can approach a target.
- Direction
- A type that represents a direction in 2D space.
- Float
- A primitive floating point number type.
- Interp
- A type that can be interpolated.
- Num
- A primitive number type.
- Numeric
- A numeric type that can be casted.
- Polygonal
- A type that represents a convex 2D polygonal shape.
- Shape
- A type that represents a convex 2D shape.
- Signed
- A signed primitive number type.
- Smooth
Interp - A type that can smooth damp towards a target.
Functions§
- affine2
- Create an
Affine2. - affine3
- Create an
Affine3. - circle
- Create a
Circle. - degs
- Create a
Degrees. - line
- Create a
Line. - mat2
- Create a
Mat2. - mat3
- Create a
Mat3. - mat4
- Create a
Mat4. - projection
- Create a new projection.
- quad
- Create a
Quad. - rads
- Create a
Radians. - ray
- Create a
Ray. - rect
- Create a
Rect. - rots
- Create a
Rotations. - triangle
- Create a
Triangle. - vec2
- Create a
Vec2. - vec3
- Create a
Vec3. - vec4
- Create a
Vec4.