Skip to main content

Crate cvmath

Crate cvmath 

Source
Expand description

Graphics-oriented math types for vectors, transforms, and ray tracing queries.

If you are looking for a specific part of the API:

Most implementations are generic over scalar types (integers and floats) and floating-point types.

Modules§

scalar
Scalar functions.

Macros§

Angled
Angled constructor.
Anglef
Anglef constructor.
Bounds2
Bounds2 constructor.
Bounds3
Bounds3 constructor.
Bounds2d
Bounds2d constructor.
Bounds2f
Bounds2f constructor.
Bounds2i
Bounds2i constructor.
Bounds3d
Bounds3d constructor.
Bounds3f
Bounds3f constructor.
Bounds3i
Bounds3i constructor.
Complexd
Complexd constructor.
Complexf
Complexf constructor.
Line2d
Line2d constructor.
Line2f
Line2f constructor.
Line2i
Line2i constructor.
Mat2d
Mat2d constructor.
Mat2f
Mat2f constructor.
Mat3d
Mat3d constructor.
Mat3f
Mat3f constructor.
Mat4d
Mat4d constructor.
Mat4f
Mat4f constructor.
Point2
Point2 constructor.
Point3
Point3 constructor.
Point2d
Point2d constructor.
Point2f
Point2f constructor.
Point2i
Point2i constructor.
Point3d
Point3d constructor.
Point3f
Point3f constructor.
Point3i
Point3i constructor.
Polard
Polard constructor.
Polarf
Polarf constructor.
Quatd
Quatd constructor.
Quatf
Quatf constructor.
Transform2d
Transform2d constructor.
Transform2f
Transform2f constructor.
Transform3d
Transform3d constructor.
Transform3f
Transform3f constructor.
Vec2
Vector constructor.
Vec3
Vector constructor.
Vec4
Vector constructor.
Vec2d
Vec2d constructor.
Vec2f
Vec2f constructor.
Vec2i
Vec2i constructor.
Vec3d
Vec3d constructor.
Vec3f
Vec3f constructor.
Vec3i
Vec3i constructor.
Vec4d
Vec4d constructor.
Vec4f
Vec4f constructor.
Vec4i
Vec4i constructor.

Structs§

Angle
Angle in radians.
Bounds2
Bounds2 shape.
Bounds3
Bounds3 shape.
Bvh2
2D bounding volume hierarchy.
Bvh3
3D bounding volume hierarchy.
Capsule2
Capsule2 shape.
Capsule3
Capsule3 shape.
Circle
Circle shape.
Complex
Complex number.
Hit2
Hit2 structure.
Hit3
Hit3 structure.
Interval
Interval type.
Line2
Line2 shape.
Line3
Line3 shape.
Mat2
2D transformation matrix.
Mat3
3D transformation matrix.
Mat4
4D transformation matrix.
Plane2
Plane2 shape.
Plane3
Plane3 shape.
Polar
Polar coordinates.
Quat
Quaternion number.
Ray2
Ray2 structure.
Ray3
Ray3 structure.
RotationVector
Rotation vector.
Sphere
Sphere shape.
Transform2
2D affine transformation matrix.
Transform3
3D affine transformation matrix.
Triangle2
Triangle2 shape.
Triangle3
Triangle3 shape.
Vec2
Vec2 vector.
Vec3
Vec3 vector.
Vec4
Vec4 vector.
W
W component.
X
X component.
Y
Y component.
Z
Z component.

Enums§

Clip
Clip range.
Hand
Handedness of the coordinate system.
HitSide
Ray hit side.
Shape2
Heterogeneous Shape2.
Shape3
Heterogeneous Shape3.

Traits§

Lerp
Types which can be linearly interpolated.
Trace2
Shapes that support Ray2 intersection tests.
Trace3
Shapes that support Ray3 intersection tests.

Functions§

Angle
Angle constructor.
Bool2
Bool2 constructor.
Bool3
Bool3 constructor.
Bool4
Bool4 constructor.
Bounds2
Bounds2 constructor.
Bounds3
Bounds3 constructor.
Bounds2d
Bounds2d constructor.
Bounds2f
Bounds2f constructor.
Bounds2i
Bounds2i constructor.
Bounds3d
Bounds3d constructor.
Bounds3f
Bounds3f constructor.
Bounds3i
Bounds3i constructor.
Capsule2
Capsule2 constructor.
Capsule3
Capsule3 constructor.
Circle
Circle constructor.
Complex
Complex constructor.
Interval
Interval constructor.
Line2
Line2 constructor.
Line3
Line3 constructor.
Line2d
Line2d constructor.
Line2f
Line2f constructor.
Line2i
Line2i constructor.
Mat2
Mat2 constructor.
Mat3
Mat3 constructor.
Mat4
Mat4 constructor.
Plane2
Plane2 constructor.
Plane3
Plane3 constructor.
Point2
Point2 constructor.
Point3
Point3 constructor.
Point2d
Point2d constructor.
Point2f
Point2f constructor.
Point2i
Point2i constructor.
Point3d
Point3d constructor.
Point3f
Point3f constructor.
Point3i
Point3i constructor.
Polar
Polar constructor.
Quat
Quaternion constructor.
Ray2
Ray2 constructor.
Ray3
Ray constructor.
RotationVector
Rotation vector constructor.
Sphere
Sphere constructor.
Transform2
Transform2 constructor.
Transform3
Transform3 constructor.
Triangle2
Triangle2 constructor.
Triangle3
Triangle3 constructor.
Vec2
Vec2 constructor.
Vec3
Vec3 constructor.
Vec4
Vec4 constructor.
lerp
Linearly interpolates between from and to by t.

Type Aliases§

Bool2
Bool2 mask.
Bool3
Bool3 mask.
Bool4
Bool4 mask.
Bounds2d
Bounds2 with f64 components.
Bounds2f
Bounds2 with f32 components.
Bounds2i
Bounds2 with i32 components.
Bounds3d
Bounds3 with f64 components.
Bounds3f
Bounds3 with f32 components.
Bounds3i
Bounds3 with i32 components.
Line2d
Line2 with f64 components.
Line2f
Line2 with f32 components.
Line2i
Line2 with i32 components.
Point2
Point2 shape.
Point3
Point3 shape.
Point2d
Point2 with f64 components.
Point2f
Point2 with f32 components.
Point2i
Point2 with i32 components.
Point3d
Point3 with f64 components.
Point3f
Point3 with f32 components.
Point3i
Point3 with i32 components.