Skip to main content

Module prelude

Module prelude 

Source
Expand description

Prelude containing the common types defined by Rapier.

The nalgebra crate and its vector!/point! macros are re-exported by this prelude, so the macros can be used without declaring nalgebra as an explicit dependency:

use rapier3d::prelude::*;

// No `use nalgebra` anywhere: the macros must still resolve.
let v = vector![1.0, 2.0, 3.0];
let p = point![1.0, 2.0, 3.0];
assert_eq!(v, nalgebra::Vector3::new(1.0, 2.0, 3.0));
assert_eq!(p, nalgebra::Point3::new(1.0, 2.0, 3.0));

Re-exports§

pub extern crate nalgebra;

Re-exports§

pub use crate::dynamics::*;
pub use crate::geometry::*;
pub use crate::math::*;
pub use crate::pipeline::*;

Macros§

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