Skip to main content

Module math

Module math 

Source
Expand description

Elementary mathematical entities (vectors, matrices, isometries, etc).

Re-exports§

pub use parry::glamx;
pub use f32 as Real;
pub use i32 as Int;

Structs§

Mat2
A 2x2 column major matrix.
Mat3
A 3x3 column major matrix.
Pose2
A 2D pose (rotation + translation), representing a rigid body transformation (f32 precision).
Pose3
A 3D pose (rotation + translation), representing a rigid body transformation (f32 precision).
Rot2
A 2D rotation represented as a unit complex number (f32 precision).
SymmetricEigen2
The eigen decomposition of a symmetric 2x2 matrix (f32 precision).
SymmetricEigen3
The eigen decomposition of a symmetric 3x3 matrix (f32 precision).
Vec2
A 2-dimensional vector.
Vec3
A 3-dimensional vector.
Vec4
A 4-dimensional vector.
Vec3A
A 3-dimensional vector.

Constants§

ANG_DIM
The maximum number of rotational degrees of freedom of a rigid-body.
DEFAULT_EPSILON
The default tolerance used for geometric operations.
DIM
The dimension of the space.
MAX_MANIFOLD_POINTS
Max number of pairs of contact points from the same contact manifold that can be solved as part of a single contact constraint.
SIMD_LAST_INDEX
SIMD_WIDTH - 1
SIMD_WIDTH
The number of lanes of a SIMD number.
SPATIAL_DIM
The maximum number of possible rotations and translations of a rigid body.
TWO_DIM
The dimension of the space multiplied by two.

Traits§

ComplexField
Trait shared by all complex fields and its subfields (like real numbers).
MatExt
Extension trait for square matrix types.
RealField
Trait shared by all reals.
VectorExt
Extension trait for glam vector types to provide additional functionality.

Functions§

ivect_to_vect
Converts an integer vector to a floating-point vector.
orthonormal_subspace_basis
Computes an orthonormal basis for the subspace orthogonal to the given vectors. Calls the callback f with each basis vector.
rotation_from_angle
Creates a rotation from an angular vector.
vect_to_ivect
Converts a floating-point vector to an integer vector.

Type Aliases§

AngDim
The angular dimension type constant (U3 for 3D).
AngVector
The angular vector type.
AngularInertia
The angular inertia of a rigid body.
CrossMatrix
A matrix that represent the cross product with a given vector.
DMatrix
Dynamic matrix type for multibody/solver code
DVector
Dynamic vector type for multibody/solver code
Dim
The dimension type constant (U3 for 3D).
IVector
The integer vector type.
Jacobian
The type of a constraint Jacobian in twist coordinates.
JacobianView
The type of a slice of the constraint Jacobian in twist coordinates.
JacobianViewMut
The type of a mutable slice of the constraint Jacobian in twist coordinates.
Matrix
The matrix type.
Matrix2
A 2x2 matrix type for use in any dimension context.
Matrix3
A 3x3 matrix type for use in any dimension context.
Orientation
The orientation type.
Pose
The transformation matrix type (pose = rotation + translation).
PrincipalAngularInertia
The principal angular inertia of a rigid body.
Rot3
A 3D rotation represented as a unit quaternion (f32 precision).
Rotation
The rotation type.
SdpMatrix
A 3D symmetric-definite-positive matrix.
SimdAngVector
Generic angular vector type (nalgebra) for SoA SIMD code
SimdAngularInertia
Generic angular inertia type for SoA SIMD code (scalar in 2D, SdpMatrix3 in 3D)
SimdBool
A SIMD bool with SIMD_WIDTH lanes.
SimdMatrix
Generic 2D/3D square matrix for SoA SIMD code
SimdPoint
Generic point type (nalgebra) for SoA SIMD code
SimdPose
Generic isometry type (nalgebra) for SoA SIMD code
SimdReal
A SIMD float with SIMD_WIDTH lanes.
SimdRotation
Generic rotation type (nalgebra) for SoA SIMD code
SimdVector
Generic vector type (nalgebra) for SoA SIMD code
SpatialVector
A vector with a dimension equal to the maximum number of degrees of freedom of a rigid body.
SymmetricEigen
The result of eigendecomposition of a symmetric matrix.
TangentImpulse
The type of impulse applied for friction constraints.
Vector
The vector type.
Vector2
A 2D vector type for use in any dimension context.
Vector3
A 3D vector type for use in any dimension context.