pub fn components(
        &self,
    ) -> (
        ColliderChanges,
        ColliderPosition,
        ColliderBroadPhaseData,
        ColliderShape,
        ColliderType,
        ColliderMaterial,
        ColliderFlags,
        ColliderMassProps,
    ) {
        let mass_info = if let Some(mp) = self.mass_properties {
            ColliderMassProps::MassProperties(Box::new(mp))
        } else {
            let default_density = Self::default_density();
            let density = self.density.unwrap_or(default_density);
            ColliderMassProps::Density(density)
        };

        let co_shape = self.shape.clone();
        let co_mprops = mass_info;
        let co_material = ColliderMaterial {
            friction: self.friction,
            restitution: self.restitution,
            friction_combine_rule: self.friction_combine_rule,
            restitution_combine_rule: self.restitution_combine_rule,
        };
        let co_flags = ColliderFlags {
            collision_groups: self.collision_groups,
            solver_groups: self.solver_groups,
            active_collision_types: self.active_collision_types,
            active_hooks: self.active_hooks,
            active_events: self.active_events,
        };
        let co_changes = ColliderChanges::all();
        let co_pos = ColliderPosition(self.position);
        let co_bf_data = ColliderBroadPhaseData::default();
        let co_type = if self.is_sensor {
            ColliderType::Sensor
        } else {
            ColliderType::Solid
        };

        (
            co_changes,
            co_pos,
            co_bf_data,
            co_shape,
            co_type,
            co_material,
            co_flags,
            co_mprops,
        )
    }
/// Builds all the components required by a collider.
Builds all the components required by a collider.
Builds all the components required by a collider .
pub fn components(
        &self,
    ) -> (
        ColliderChanges,
        ColliderPosition,
        ColliderBroadPhaseData,
        ColliderShape,
        ColliderType,
        ColliderMaterial,
        ColliderFlags,
        ColliderMassProps,
    ) {
        let mass_info = if let Some(mp) = self.mass_properties {
            ColliderMassProps::MassProperties(Box::new(mp))
        } else {
            let default_density = Self::default_density();
            let density = self.density.unwrap_or(default_density);
            ColliderMassProps::Density(density)
        };
        let co_shape = self.shape.clone();
        let co_mprops = mass_info;
        let co_material = ColliderMaterial {
            friction: self.friction,
            restitution: self.restitution,
            friction_combine_rule: self.friction_combine_rule,
            restitution_combine_rule: self.restitution_combine_rule,
        };
        let co_flags = ColliderFlags {
            collision_groups: self.collision_groups,
            solver_groups: self.solver_groups,
            active_collision_types: self.active_collision_types,
            active_hooks: self.active_hooks,
            active_events: self.active_events,
        };
        let co_changes = ColliderChanges::all();
        let co_pos = ColliderPosition(self.position);
        let co_bf_data = ColliderBroadPhaseData::default();
        let co_type = if self.is_sensor {
            ColliderType::Sensor
        } else {
            ColliderType::Solid
        };
        (
            co_changes,
            co_pos,
            co_bf_data,
            co_shape,
            co_type,
            co_material,
            co_flags,
            co_mprops,
        )
    }
pub fn components ( & self , ) -> ( ColliderChanges , ColliderPosition , ColliderBroadPhaseData , ColliderShape , ColliderType , ColliderMaterial , ColliderFlags , ColliderMassProps , ) { let mass_info = if let Some ( mp ) = self . mass_properties { ColliderMassProps :: MassProperties ( Box :: new ( mp ) ) } else { let default_density = Self :: default_density ( ) ; let density = self . density . unwrap_or ( default_density ) ; ColliderMassProps :: Density ( density ) } ; let co_shape = self . shape . clone ( ) ; let co_mprops = mass_info ; let co_material = ColliderMaterial { friction : self . friction , restitution : self . restitution , friction_combine_rule : self . friction_combine_rule , restitution_combine_rule : self . restitution_combine_rule , } ; let co_flags = ColliderFlags { collision_groups : self . collision_groups , solver_groups : self . solver_groups , active_collision_types : self . active_collision_types , active_hooks : self . active_hooks , active_events : self . active_events , } ; let co_changes = ColliderChanges :: all ( ) ; let co_pos = ColliderPosition ( self . position ) ; let co_bf_data = ColliderBroadPhaseData :: default ( ) ; let co_type = if self . is_sensor { ColliderType :: Sensor } else { ColliderType :: Solid } ; ( co_changes , co_pos , co_bf_data , co_shape , co_type , co_material , co_flags , co_mprops , ) }
Builds all the components required by a collider.
Builds all the components required by a collider .
&self