Crate jumpy::core::physics::collisions::rapier::nalgebra

source ·
Expand description

§nalgebra

nalgebra is a linear algebra library written for Rust targeting:

  • General-purpose linear algebra (still lacks a lot of features…)
  • Real-time computer graphics.
  • Real-time computer physics.

§Using nalgebra

You will need the last stable build of the rust compiler and the official package manager: cargo.

Simply add the following to your Cargo.toml file:

[dependencies]
// TODO: replace the * by the latest version.
nalgebra = "*"

Most useful functionalities of nalgebra are grouped in the root module nalgebra::.

However, the recommended way to use nalgebra is to import types and traits explicitly, and call free-functions using the na:: prefix:

#[macro_use]
extern crate approx; // For the macro relative_eq!
extern crate nalgebra as na;
use na::{Vector3, Rotation3};

fn main() {
    let axis  = Vector3::x_axis();
    let angle = 1.57;
    let b     = Rotation3::from_axis_angle(&axis, angle);

    relative_eq!(b.axis().unwrap(), axis);
    relative_eq!(b.angle(), angle);
}

§Features

nalgebra is meant to be a general-purpose, low-dimensional, linear algebra library, with an optimized set of tools for computer graphics and physics. Those features include:

Modules§

  • [Reexported at the root of this crate.] Data structures for vector and matrix computations.
  • [Reexported at the root of this crate.] Data structures for points and usual transformations (rotations, isometries, etc.)
  • [Reexported at the root of this crate.] Factorization of real matrices.

Macros§

  • Construct a dynamic matrix directly from data.
  • Construct a dynamic column vector directly from data.
  • Construct a fixed-size matrix directly from data.
  • Construct a fixed-size point directly from data.
  • Construct a fixed-size column vector directly from data.

Structs§

  • A array-based statically sized matrix data storage.
  • The bidiagonalization of a general matrix.
  • The Cholesky decomposition of a symmetric-definite-positive matrix.
  • The QR decomposition (with column pivoting) of a general matrix.
  • A complex number in Cartesian form.
  • An allocator based on ArrayStorage and VecStorage for statically-sized and dynamically-sized matrices respectively.
  • A dual quaternion.
  • Dim of dynamically-sized algebraic entities.
  • Euclidean norm.
  • LU decomposition with full row and column pivoting.
  • Hessenberg decomposition of a general matrix.
  • A direct isometry, i.e., a rotation followed by a translation (aka. a rigid-body motion).
  • LU decomposition with partial (row) pivoting.
  • Lp norm.
  • The most generic column-major matrix (and vector) type.
  • A point in an euclidean space.
  • A 3D orthographic projection stored as a homogeneous 4x4 matrix.
  • A sequence of row or column permutations.
  • A 3D perspective projection stored as a homogeneous 4x4 matrix.
  • The QR decomposition of a general matrix.
  • A quaternion. See the type alias UnitQuaternion = Unit<Quaternion> for a quaternion that may be used as a rotation.
  • A reflection wrt. a plane.
  • A rotation matrix.
  • Singular Value Decomposition of a general matrix.
  • A scale which supports non-uniform scaling.
  • Schur decomposition of a square matrix.
  • A similarity, i.e., an uniform scaling, followed by a rotation, followed by a translation.
  • Eigendecomposition of a symmetric matrix.
  • Tridiagonalization of a symmetric matrix.
  • A transformation matrix in homogeneous coordinates.
  • A translation.
  • UDU factorization.
  • L-infinite norm aka. Chebytchev norm aka. uniform norm aka. suppremum norm.
  • A wrapper that ensures the underlying algebraic entity has a unit norm.
  • A Vec-based matrix data storage. It may be dynamically-sized.
  • A matrix data storage for a matrix view. Only contains an internal reference to another matrix data storage.
  • A mutable matrix data storage for mutable matrix view. Only contains an internal mutable reference to another matrix data storage.

Enums§

  • Tag representing an affine Transform. Its bottom-row is equal to (0, 0 ... 0, 1).
  • Tag representing the most general (not necessarily inversible) Transform type.
  • Tag representing the most general inversible Transform type.

Constants§

  • The constant dimension 0 .
  • The constant dimension 1.
  • The constant dimension 2 .
  • The constant dimension 3 .
  • The constant dimension 4 .
  • The constant dimension 5 .
  • The constant dimension 6 .
  • The constant dimension 7 .
  • The constant dimension 8 .
  • The constant dimension 9 .
  • The constant dimension 10 .
  • The constant dimension 11 .
  • The constant dimension 12 .
  • The constant dimension 13 .
  • The constant dimension 14 .
  • The constant dimension 15 .
  • The constant dimension 16 .
  • The constant dimension 17 .
  • The constant dimension 18 .
  • The constant dimension 19 .
  • The constant dimension 20 .
  • The constant dimension 21 .
  • The constant dimension 22 .
  • The constant dimension 23 .
  • The constant dimension 24 .
  • The constant dimension 25 .
  • The constant dimension 26 .
  • The constant dimension 27 .
  • The constant dimension 28 .
  • The constant dimension 29 .
  • The constant dimension 30 .
  • The constant dimension 31 .
  • The constant dimension 32 .
  • The constant dimension 33 .
  • The constant dimension 34 .
  • The constant dimension 35 .
  • The constant dimension 36 .
  • The constant dimension 37 .
  • The constant dimension 38 .
  • The constant dimension 39 .
  • The constant dimension 40 .
  • The constant dimension 41 .
  • The constant dimension 42 .
  • The constant dimension 43 .
  • The constant dimension 44 .
  • The constant dimension 45 .
  • The constant dimension 46 .
  • The constant dimension 47 .
  • The constant dimension 48 .
  • The constant dimension 49 .
  • The constant dimension 50 .
  • The constant dimension 51 .
  • The constant dimension 52 .
  • The constant dimension 53 .
  • The constant dimension 54 .
  • The constant dimension 55 .
  • The constant dimension 56 .
  • The constant dimension 57 .
  • The constant dimension 58 .
  • The constant dimension 59 .
  • The constant dimension 60 .
  • The constant dimension 61 .
  • The constant dimension 62 .
  • The constant dimension 63 .
  • The constant dimension 64 .
  • The constant dimension 65 .
  • The constant dimension 66 .
  • The constant dimension 67 .
  • The constant dimension 68 .
  • The constant dimension 69 .
  • The constant dimension 70 .
  • The constant dimension 71 .
  • The constant dimension 72 .
  • The constant dimension 73 .
  • The constant dimension 74 .
  • The constant dimension 75 .
  • The constant dimension 76 .
  • The constant dimension 77 .
  • The constant dimension 78 .
  • The constant dimension 79 .
  • The constant dimension 80 .
  • The constant dimension 81 .
  • The constant dimension 82 .
  • The constant dimension 83 .
  • The constant dimension 84 .
  • The constant dimension 85 .
  • The constant dimension 86 .
  • The constant dimension 87 .
  • The constant dimension 88 .
  • The constant dimension 89 .
  • The constant dimension 90 .
  • The constant dimension 91 .
  • The constant dimension 92 .
  • The constant dimension 93 .
  • The constant dimension 94 .
  • The constant dimension 95 .
  • The constant dimension 96 .
  • The constant dimension 97 .
  • The constant dimension 98 .
  • The constant dimension 99 .
  • The constant dimension 100 .
  • The constant dimension 101 .
  • The constant dimension 102 .
  • The constant dimension 103 .
  • The constant dimension 104 .
  • The constant dimension 105 .
  • The constant dimension 106 .
  • The constant dimension 107 .
  • The constant dimension 108 .
  • The constant dimension 109 .
  • The constant dimension 110 .
  • The constant dimension 111 .
  • The constant dimension 112 .
  • The constant dimension 113 .
  • The constant dimension 114 .
  • The constant dimension 115 .
  • The constant dimension 116 .
  • The constant dimension 117 .
  • The constant dimension 118 .
  • The constant dimension 119 .
  • The constant dimension 120 .
  • The constant dimension 121 .
  • The constant dimension 122 .
  • The constant dimension 123 .
  • The constant dimension 124 .
  • The constant dimension 125 .
  • The constant dimension 126 .
  • The constant dimension 127 .

Traits§

  • Trait implemented by rotations that can be used inside of an Isometry or Similarity.
  • Trait alias for Add and AddAssign with result of type Self.
  • Trait alias for Div and DivAssign with result of type Self.
  • Trait alias for Mul and MulAssign with result of type Self.
  • Trait alias for Sub and SubAssign with result of type Self.
  • Trait shared by all complex fields and its subfields (like real numbers).
  • Trait implemented by any type that can be used as a dimension. This includes type-level integers and Dyn (for dimensions not known at compile-time).
  • Trait implemented exclusively by type-level integers.
  • A range with a size that may be known at compile-time.
  • Trait implemented by fields, i.e., complex numbers and floats.
  • Marker trait indicating that a storage is stored contiguously in memory.
  • Trait implemented by Dyn.
  • Trait implemented by Dyn and type-level integers different from U1.
  • A trait for abstract matrix norms.
  • Trait implemented by entities scan be be normalized and put in an Unit struct.
  • The trait shared by all matrix data storage.
  • Trait implemented by matrix data storage that can provide a mutable access to its elements.
  • Trait shared by all reals.
  • A matrix storage that can be reshaped in-place.
  • The basic scalar type for all structures of nalgebra.
  • Lane-wise generalization of bool for SIMD booleans.
  • Lane-wise generalisation of ComplexField for SIMD complex fields.
  • Lane-wise generalization of the standard PartialOrd for SIMD values.
  • Lanewise generalization of RealField for SIMD reals.
  • Base trait for every SIMD types.
  • SliceRangeDeprecated
    A range with a size that may be known at compile-time.
  • Trait shared by all matrix data storage that don’t contain any uninitialized elements.
  • Trait shared by all mutable matrix data storage that don’t contain any uninitialized elements.
  • Indicates that Self is a more specific Transform category than Other.
  • Indicates that Self is a more general Transform category than Other.
  • Trait implemented by phantom types identifying the projective transformation type.
  • Traits that gives the Transform category that is compatible with the result of the multiplication of transformations with categories Self and Other.

Functions§

  • absDeprecated
    The absolute value of a.
  • The center of two points.
  • Returns a reference to the input value clamped to the interval [min, max].
  • Converts an object from one type to an equivalent or more general one.
  • Converts an object from one type to an equivalent or more general one.
  • Use with care! Same as try_convert but without any property checks.
  • Use with care! Same as try_convert but without any property checks.
  • The distance between two points.
  • The squared distance between two points.
  • infDeprecated
    Returns the infimum of a and b.
  • inf_supDeprecated
    Returns simultaneously the infimum and supremum of a and b.
  • Indicates if try_convert will succeed without actually performing the conversion.
  • Same as cmp::max.
  • Same as cmp::min.
  • Gets the multiplicative identity element.
  • Clamp value between min and max. Returns None if value is not comparable to min or max.
  • Compare a and b using a partial ordering relation.
  • Returns true iff a and b are comparable and a >= b.
  • Returns true iff a and b are comparable and a > b.
  • Returns true iff a and b are comparable and a <= b.
  • Returns true iff a and b are comparable and a < b.
  • Return the maximum of a and b if they are comparable.
  • Return the minimum of a and b if they are comparable.
  • Sorts two values in increasing order using a partial ordering.
  • supDeprecated
    Returns the supremum of a and b.
  • Attempts to convert an object to a more specific one.
  • Attempts to convert an object to a more specific one.
  • Performs a LU decomposition to overwrite out with the inverse of matrix.
  • Computes the wilkinson shift, i.e., the 2x2 symmetric matrix eigenvalue to its tailing component tnn.
  • Wraps val into the range [min, max] using modular arithmetics.
  • Gets the additive identity element.

Type Aliases§