Replace call to IntegrationParameters::new with explicit construction
This help readability a lot
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
pub struct IntegrationParameters {
|
pub struct IntegrationParameters {
|
||||||
/// The timestep length (default: `1.0 / 60.0`)
|
/// The timestep length (default: `1.0 / 60.0`)
|
||||||
dt: f32,
|
dt: f32,
|
||||||
/// The inverse of `dt`.
|
/// The inverse of `dt` (default: `60.0` steps per second).
|
||||||
inv_dt: f32,
|
inv_dt: f32,
|
||||||
// /// If `true` and if rapier is compiled with the `parallel` feature, this will enable rayon-based multithreading (default: `true`).
|
// /// If `true` and if rapier is compiled with the `parallel` feature, this will enable rayon-based multithreading (default: `true`).
|
||||||
// ///
|
// ///
|
||||||
@@ -182,26 +182,33 @@ impl IntegrationParameters {
|
|||||||
|
|
||||||
impl Default for IntegrationParameters {
|
impl Default for IntegrationParameters {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(
|
Self {
|
||||||
1.0 / 60.0,
|
dt: 1.0 / 60.0,
|
||||||
// true,
|
inv_dt: 60.0,
|
||||||
0.2,
|
// multithreading_enabled: true,
|
||||||
0.2,
|
erp: 0.2,
|
||||||
1.0,
|
joint_erp: 0.2,
|
||||||
1.0,
|
warmstart_coeff: 1.0,
|
||||||
0.005,
|
restitution_velocity_threshold: 1.0,
|
||||||
0.001,
|
allowed_linear_error: 0.005,
|
||||||
0.2,
|
allowed_angular_error: 0.001,
|
||||||
0.2,
|
max_linear_correction: 0.2,
|
||||||
0.002,
|
max_angular_correction: 0.2,
|
||||||
0.2,
|
prediction_distance: 0.002,
|
||||||
4,
|
max_stabilization_multiplier: 0.2,
|
||||||
1,
|
max_velocity_iterations: 4,
|
||||||
10,
|
max_position_iterations: 1,
|
||||||
1,
|
// FIXME: what is the optimal value for min_island_size?
|
||||||
false,
|
// It should not be too big so that we don't end up with
|
||||||
false,
|
// huge islands that don't fit in cache.
|
||||||
false,
|
// However we don't want it to be too small and end up with
|
||||||
)
|
// tons of islands, reducing SIMD parallelism opportunities.
|
||||||
|
min_island_size: 128,
|
||||||
|
max_ccd_position_iterations: 10,
|
||||||
|
max_ccd_substeps: 1,
|
||||||
|
return_after_ccd_substep: false,
|
||||||
|
multiple_ccd_substep_sensor_events_enabled: false,
|
||||||
|
ccd_on_penetration_enabled: false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user