Skip to content

Commit be9ebc5

Browse files
authored
Remove unnecessary cfg_attr from from_shape mass helpers (#644)
# Objective Some mass property helpers like `Mass::from_shape` are currently gated behind the `default-collider` feature and Parry, even though they don't need these features anymore. ## Solution Remove the feature gates.
1 parent 11e64a1 commit be9ebc5

File tree

1 file changed

+0
-20
lines changed
  • src/dynamics/rigid_body/mass_properties/components

1 file changed

+0
-20
lines changed

src/dynamics/rigid_body/mass_properties/components/mod.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ impl Mass {
188188
doc = "let mass = Mass::from_shape(&Sphere::new(1.0), 2.0);"
189189
)]
190190
/// ```
191-
#[cfg(all(
192-
feature = "default-collider",
193-
any(feature = "parry-f32", feature = "parry-f64")
194-
))]
195191
#[inline]
196192
pub fn from_shape<T: ComputeMassProperties>(shape: &T, density: f32) -> Self {
197193
Self(shape.mass(density))
@@ -344,10 +340,6 @@ impl AngularInertia {
344340
/// // Bevy's primitive shapes can also be used.
345341
/// let inertia = AngularInertia::from_shape(&Circle::new(1.0), 2.0);
346342
/// ```
347-
#[cfg(all(
348-
feature = "default-collider",
349-
any(feature = "parry-f32", feature = "parry-f64")
350-
))]
351343
#[inline]
352344
pub fn from_shape<T: ComputeMassProperties>(shape: &T, mass: f32) -> Self {
353345
Self(shape.angular_inertia(mass))
@@ -682,10 +674,6 @@ impl AngularInertia {
682674
/// // Bevy's primitive shapes can also be used.
683675
/// let inertia = AngularInertia::from_shape(&Sphere::new(1.0), 2.0);
684676
/// ```
685-
#[cfg(all(
686-
feature = "default-collider",
687-
any(feature = "parry-f32", feature = "parry-f64")
688-
))]
689677
#[inline]
690678
pub fn from_shape<T: ComputeMassProperties>(shape: &T, mass: f32) -> Self {
691679
let principal = shape.principal_angular_inertia(mass);
@@ -916,10 +904,6 @@ impl CenterOfMass {
916904
doc = "let center_of_mass = CenterOfMass::from_shape(&Sphere::new(1.0));"
917905
)]
918906
/// ```
919-
#[cfg(all(
920-
feature = "default-collider",
921-
any(feature = "parry-f32", feature = "parry-f64")
922-
))]
923907
#[inline]
924908
pub fn from_shape<T: ComputeMassProperties>(shape: &T) -> Self {
925909
Self(shape.center_of_mass())
@@ -1038,10 +1022,6 @@ impl MassPropertiesBundle {
10381022
/// ));
10391023
/// # }
10401024
/// ```
1041-
#[cfg(all(
1042-
feature = "default-collider",
1043-
any(feature = "parry-f32", feature = "parry-f64")
1044-
))]
10451025
#[inline]
10461026
pub fn from_shape<T: ComputeMassProperties>(shape: &T, density: f32) -> Self {
10471027
shape.mass_properties(density).to_bundle()

0 commit comments

Comments
 (0)