diff options
| author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2024-07-22 16:32:08 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-22 11:32:08 +0200 |
| commit | 7374653338cf1a2669aa8b072ff5376262149474 (patch) | |
| tree | f57db02a6f9323351bfc1a246381d4973b04ca9f | |
| parent | cf74150763dd575bc0399087e845e9be62aba56f (diff) | |
| download | rapier-7374653338cf1a2669aa8b072ff5376262149474.tar.gz rapier-7374653338cf1a2669aa8b072ff5376262149474.tar.bz2 rapier-7374653338cf1a2669aa8b072ff5376262149474.zip | |
docs: Fix minor typos and tweaks (#696)
---------
Co-authored-by: Thierry Berger <contact@thierryberger.com>
| -rw-r--r-- | src/dynamics/ccd/ccd_solver.rs | 2 | ||||
| -rw-r--r-- | src/dynamics/rigid_body_components.rs | 10 | ||||
| -rw-r--r-- | src/geometry/broad_phase_multi_sap/sap_utils.rs | 10 | ||||
| -rw-r--r-- | src/pipeline/debug_render_pipeline/debug_render_backend.rs | 4 | ||||
| -rw-r--r-- | src/pipeline/debug_render_pipeline/debug_render_style.rs | 8 | ||||
| -rw-r--r-- | src/pipeline/physics_pipeline.rs | 4 | ||||
| -rw-r--r-- | src/pipeline/query_pipeline/mod.rs | 8 |
7 files changed, 23 insertions, 23 deletions
diff --git a/src/dynamics/ccd/ccd_solver.rs b/src/dynamics/ccd/ccd_solver.rs index eaabf77..e9ecfb8 100644 --- a/src/dynamics/ccd/ccd_solver.rs +++ b/src/dynamics/ccd/ccd_solver.rs @@ -398,7 +398,7 @@ impl CCDSolver { let start_time = toi.toi; - // NOTE: the 1 and 2 indices (e.g., `ch1`, `ch2`) bellow are unrelated to the + // NOTE: the 1 and 2 indices (e.g., `ch1`, `ch2`) below are unrelated to the // ones we used above. for ch1 in &colliders_to_check { let co1 = &colliders[*ch1]; diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs index 38ba491..6bc2949 100644 --- a/src/dynamics/rigid_body_components.rs +++ b/src/dynamics/rigid_body_components.rs @@ -1000,12 +1000,12 @@ impl RigidBodyDominance { #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] pub struct RigidBodyActivation { - /// The threshold linear velocity bellow which the body can fall asleep. + /// The threshold linear velocity below which the body can fall asleep. /// /// The value is "normalized", i.e., the actual threshold applied by the physics engine /// is equal to this value multiplied by [`IntegrationParameters::length_unit`]. pub normalized_linear_threshold: Real, - /// The angular linear velocity bellow which the body can fall asleep. + /// The angular linear velocity below which the body can fall asleep. pub angular_threshold: Real, /// The amount of time the rigid-body must remain below the thresholds to be put to sleep. pub time_until_sleep: Real, @@ -1022,17 +1022,17 @@ impl Default for RigidBodyActivation { } impl RigidBodyActivation { - /// The default linear velocity bellow which a body can be put to sleep. + /// The default linear velocity below which a body can be put to sleep. pub fn default_normalized_linear_threshold() -> Real { 0.4 } - /// The default angular velocity bellow which a body can be put to sleep. + /// The default angular velocity below which a body can be put to sleep. pub fn default_angular_threshold() -> Real { 0.5 } - /// The amount of time the rigid-body must remain bellow it’s linear and angular velocity + /// The amount of time the rigid-body must remain below it’s linear and angular velocity /// threshold before falling to sleep. pub fn default_time_until_sleep() -> Real { 2.0 diff --git a/src/geometry/broad_phase_multi_sap/sap_utils.rs b/src/geometry/broad_phase_multi_sap/sap_utils.rs index 56183eb..a8356ad 100644 --- a/src/geometry/broad_phase_multi_sap/sap_utils.rs +++ b/src/geometry/broad_phase_multi_sap/sap_utils.rs @@ -40,15 +40,15 @@ pub(crate) fn region_width(depth: i8) -> Real { (REGION_WIDTH_BASE * REGION_WIDTH_POWER_BASIS.powi(depth as i32)).min(MAX_AABB_EXTENT) } -/// Computes the depth of the layer the given Aabb should be part of. +/// Computes the depth of the layer the given [`Aabb`] should be part of. /// -/// The idea here is that an Aabb should be part of a layer which has -/// regions large enough so that one Aabb doesn't crosses too many +/// The idea here is that an [`Aabb`] should be part of a layer which has +/// regions large enough so that one [`Aabb`] doesn't crosses too many /// regions. But the regions must also not be too large, otherwise /// we are loosing the benefits of Multi-SAP. /// -/// If the code bellow, we select a layer such that each region can -/// contain at least a chain of 10 contiguous objects with that Aabb. +/// If the code below, we select a layer such that each region can +/// contain at least a chain of 10 contiguous objects with that [`Aabb`]. pub(crate) fn layer_containing_aabb(aabb: &Aabb) -> i8 { // Max number of elements of this size we would like one region to be able to contain. const NUM_ELEMENTS_PER_DIMENSION: Real = 10.0; diff --git a/src/pipeline/debug_render_pipeline/debug_render_backend.rs b/src/pipeline/debug_render_pipeline/debug_render_backend.rs index 664bf46..47673c5 100644 --- a/src/pipeline/debug_render_pipeline/debug_render_backend.rs +++ b/src/pipeline/debug_render_pipeline/debug_render_backend.rs @@ -46,7 +46,7 @@ pub trait DebugRenderBackend { color: [f32; 4], ); - /// Draws a set of line. + /// Draws a set of lines. fn draw_polyline( &mut self, object: DebugRenderObject, @@ -63,7 +63,7 @@ pub trait DebugRenderBackend { } } - /// Draws a chain of line. + /// Draws a chain of lines. fn draw_line_strip( &mut self, object: DebugRenderObject, diff --git a/src/pipeline/debug_render_pipeline/debug_render_style.rs b/src/pipeline/debug_render_pipeline/debug_render_style.rs index c977cab..ccc42aa 100644 --- a/src/pipeline/debug_render_pipeline/debug_render_style.rs +++ b/src/pipeline/debug_render_pipeline/debug_render_style.rs @@ -8,10 +8,10 @@ pub type DebugColor = [f32; 4]; /// Style used for computing colors when rendering the scene. #[derive(Copy, Clone, Debug, PartialEq)] pub struct DebugRenderStyle { - /// The number of subdivision used to approximate the curved + /// The number of subdivisions used to approximate the curved /// parts of a shape with smooth faces. pub subdivisions: u32, - /// The number of subdivision used to approimate the curved + /// The number of subdivisions used to approximate the curved /// borders of round shapes. pub border_subdivisions: u32, /// The color of colliders attached to dynamic rigid-bodies. @@ -42,13 +42,13 @@ pub struct DebugRenderStyle { pub disabled_color_multiplier: [f32; 4], /// The length of the local coordinate axes rendered for a rigid-body. pub rigid_body_axes_length: Real, - /// The collor for the segments joining the two contact points. + /// The color for the segments joining the two contact points. pub contact_depth_color: DebugColor, /// The color of the contact normals. pub contact_normal_color: DebugColor, /// The length of the contact normals. pub contact_normal_length: Real, - /// The color of the colliders Aabbs. + /// The color of the colliders' [`Aabb`]s. pub collider_aabb_color: DebugColor, } diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index 166868b..8d1fec4 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -523,7 +523,7 @@ impl PhysicsPipeline { // integration of external forces. // // If there is only one or zero CCD substep, there is no need - // to split the timetsep interval. So we can just skip this part. + // to split the timestep interval. So we can just skip this part. if ccd_is_enabled && remaining_substeps > 1 { // NOTE: Take forces into account when updating the bodies CCD activation flags // these forces have not been integrated to the body's velocity yet. @@ -725,7 +725,7 @@ mod test { // Check that removing the body right after inserting it works. // We add two dynamic bodies, one kinematic body and one fixed body before removing - // them. This include a non-regression test where deleting a kimenatic body crashes. + // them. This include a non-regression test where deleting a kinematic body crashes. let rb = RigidBodyBuilder::dynamic().build(); let h1 = bodies.insert(rb.clone()); let h2 = bodies.insert(rb.clone()); diff --git a/src/pipeline/query_pipeline/mod.rs b/src/pipeline/query_pipeline/mod.rs index a822512..cd4ee49 100644 --- a/src/pipeline/query_pipeline/mod.rs +++ b/src/pipeline/query_pipeline/mod.rs @@ -357,7 +357,7 @@ impl QueryPipeline { self.qbvh.clear_and_rebuild(mode, self.dilation_factor); } - /// Find the closest intersection between a ray and a set of collider. + /// Find the closest intersection between a ray and a set of colliders. /// /// # Parameters /// * `colliders` - The set of colliders taking part in this pipeline. @@ -384,7 +384,7 @@ impl QueryPipeline { self.qbvh.traverse_best_first(&mut visitor).map(|h| h.1) } - /// Find the closest intersection between a ray and a set of collider. + /// Find the closest intersection between a ray and a set of colliders. /// /// # Parameters /// * `colliders` - The set of colliders taking part in this pipeline. @@ -415,7 +415,7 @@ impl QueryPipeline { self.qbvh.traverse_best_first(&mut visitor).map(|h| h.1) } - /// Find the all intersections between a ray and a set of collider and passes them to a callback. + /// Find the all intersections between a ray and a set of colliders and passes them to a callback. /// /// # Parameters /// * `colliders` - The set of colliders taking part in this pipeline. @@ -577,7 +577,7 @@ impl QueryPipeline { .map(|h| (h.1 .1 .0, h.1 .0, h.1 .1 .1)) } - /// Finds all handles of all the colliders with an Aabb intersecting the given Aabb. + /// Finds all handles of all the colliders with an [`Aabb`] intersecting the given [`Aabb`]. pub fn colliders_with_aabb_intersecting_aabb( &self, aabb: &Aabb, |
