1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Mass properties (mass, inertia, center-of-mass) of shapes.

pub use self::mass_properties::MassProperties;

mod mass_properties;
mod mass_properties_ball;
mod mass_properties_capsule;
#[cfg(feature = "std")]
mod mass_properties_compound;
#[cfg(feature = "dim3")]
mod mass_properties_cone;
#[cfg(feature = "dim2")]
#[cfg(feature = "std")]
mod mass_properties_convex_polygon;
#[cfg(feature = "dim3")]
#[cfg(feature = "std")]
mod mass_properties_convex_polyhedron;
mod mass_properties_cuboid;
mod mass_properties_cylinder;
#[cfg(feature = "dim2")]
mod mass_properties_triangle;
#[cfg(feature = "dim2")]
#[cfg(feature = "std")]
mod mass_properties_trimesh2d;
#[cfg(feature = "dim3")]
#[cfg(feature = "std")]
mod mass_properties_trimesh3d;

/// Free functions for some special-cases of mass-properties computation.
pub mod details {
    #[cfg(feature = "dim2")]
    #[cfg(feature = "std")]
    pub use super::mass_properties_convex_polygon::convex_polygon_area_and_center_of_mass;
    #[cfg(feature = "dim2")]
    #[cfg(feature = "std")]
    pub use super::mass_properties_trimesh2d::trimesh_area_and_center_of_mass;
    #[cfg(feature = "dim3")]
    #[cfg(feature = "std")]
    pub use super::mass_properties_trimesh3d::{
        tetrahedron_unit_inertia_tensor_wrt_point, trimesh_signed_volume_and_center_of_mass,
    };
}