From 4c2d18a0cd2da342c94e4374d68a010d590a98f7 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 28 Aug 2023 11:05:45 +0700 Subject: [PATCH] docs: Minor fixes. --- src/data/arena.rs | 4 ++-- src/dynamics/rigid_body.rs | 2 +- src/dynamics/rigid_body_components.rs | 12 ++++++------ src/geometry/collider_components.rs | 2 +- src/geometry/narrow_phase.rs | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/data/arena.rs b/src/data/arena.rs index 00e31246a..333253971 100644 --- a/src/data/arena.rs +++ b/src/data/arena.rs @@ -1,8 +1,8 @@ //! Arena adapted from the generational-arena crate. //! -//! See https://github.com/fitzgen/generational-arena/blob/master/src/lib.rs. +//! See . //! This has been modified to have a fully deterministic deserialization (including for the order of -//! Index attribution after a deserialization of the arena. +//! Index attribution after a deserialization of the arena). use parry::partitioning::IndexedData; use std::cmp; use std::iter::{self, Extend, FromIterator, FusedIterator}; diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 97974d9da..42e4f885d 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -397,7 +397,7 @@ impl RigidBody { /// Sets the rigid-body's additional mass. /// /// The total angular inertia of the rigid-body will be scaled automatically based on this - /// additional mass. If this scaling effect isn’t desired, use [`Self::additional_mass_properties`] + /// additional mass. If this scaling effect isn’t desired, use [`Self::set_additional_mass_properties`] /// instead of this method. /// /// This is only the "additional" mass because the total mass of the rigid-body is diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs index 2d5190158..1a5ca1dc5 100644 --- a/src/dynamics/rigid_body_components.rs +++ b/src/dynamics/rigid_body_components.rs @@ -430,7 +430,7 @@ impl RigidBodyVelocity { /// Converts a slice to a rigid-body velocity. /// - /// The slice must contain at least 3 elements: the `slice[0..2] contains + /// The slice must contain at least 3 elements: the `slice[0..2]` contains /// the linear velocity and the `slice[2]` contains the angular velocity. #[must_use] #[cfg(feature = "dim2")] @@ -443,7 +443,7 @@ impl RigidBodyVelocity { /// Converts a slice to a rigid-body velocity. /// - /// The slice must contain at least 6 elements: the `slice[0..3] contains + /// The slice must contain at least 6 elements: the `slice[0..3]` contains /// the linear velocity and the `slice[3..6]` contains the angular velocity. #[must_use] #[cfg(feature = "dim3")] @@ -481,7 +481,7 @@ impl RigidBodyVelocity { /// This velocity seen as a vector. /// - /// The linear part is stored first. + /// The linear part is stored first. #[inline] #[cfg(feature = "dim2")] pub fn as_vector(&self) -> &na::Vector3 { @@ -490,7 +490,7 @@ impl RigidBodyVelocity { /// This velocity seen as a mutable vector. /// - /// The linear part is stored first. + /// The linear part is stored first. #[inline] #[cfg(feature = "dim2")] pub fn as_vector_mut(&mut self) -> &mut na::Vector3 { @@ -499,7 +499,7 @@ impl RigidBodyVelocity { /// This velocity seen as a vector. /// - /// The linear part is stored first. + /// The linear part is stored first. #[inline] #[cfg(feature = "dim3")] pub fn as_vector(&self) -> &na::Vector6 { @@ -508,7 +508,7 @@ impl RigidBodyVelocity { /// This velocity seen as a mutable vector. /// - /// The linear part is stored first. + /// The linear part is stored first. #[inline] #[cfg(feature = "dim3")] pub fn as_vector_mut(&mut self) -> &mut na::Vector6 { diff --git a/src/geometry/collider_components.rs b/src/geometry/collider_components.rs index 0e65bac66..98ddbb77b 100644 --- a/src/geometry/collider_components.rs +++ b/src/geometry/collider_components.rs @@ -136,7 +136,7 @@ pub enum ColliderMassProps { /// The collider is given a density. /// /// Its actual `MassProperties` are computed automatically with - /// the help of [`SharedShape::mass_properties`]. + /// the help of [`Shape::mass_properties`]. Density(Real), /// The collider is given a mass. /// diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs index dacca9ed5..4500284db 100644 --- a/src/geometry/narrow_phase.rs +++ b/src/geometry/narrow_phase.rs @@ -178,7 +178,7 @@ impl NarrowPhase { /// /// If this returns `None`, there is no contact between the two colliders. /// If this returns `Some`, then there may be a contact between the two colliders. Check the - /// result [`ContactPair::has_any_active_collider`] method to see if there is an actual contact. + /// result [`ContactPair::has_any_active_contact`] method to see if there is an actual contact. pub fn contact_pair_unknown_gen(&self, collider1: u32, collider2: u32) -> Option<&ContactPair> { let id1 = self.graph_indices.get_unknown_gen(collider1)?; let id2 = self.graph_indices.get_unknown_gen(collider2)?; @@ -191,7 +191,7 @@ impl NarrowPhase { /// /// If this returns `None`, there is no contact between the two colliders. /// If this returns `Some`, then there may be a contact between the two colliders. Check the - /// result [`ContactPair::has_any_active_collider`] method to see if there is an actual contact. + /// result [`ContactPair::has_any_active_contact`] method to see if there is an actual contact. pub fn contact_pair( &self, collider1: ColliderHandle,