Fix some typos. (#620)

This commit is contained in:
Bruce Mitchener
2024-05-05 16:41:38 +06:30
committed by GitHub
parent 1b05b2ebfa
commit 7375a691e2
16 changed files with 20 additions and 20 deletions

View File

@@ -269,7 +269,7 @@ without affecting performance of the other parts of the simulation.
- Joint motors no longer have a `VelocityBased` model. The new choices are `AccelerationBased` and `ForceBased`
which are more stable.
- Calling the `.build()` function from builders (`RigidBodyBuilder`, `ColliderBuilder`, etc.) is no longer necessary
whan adding them to sets. It is automatically called thanks to `Into<_>` implementations.
when adding them to sets. It is automatically called thanks to `Into<_>` implementations.
- The `ComponentSet` abstractions (and related `_generic` methods like `PhysicsPipeline::step_generic`) have been
removed. Custom storage for colliders and rigid-bodies are no longer possible: use the built-in `RigidBodySet` and
`ColliderSet` instead.
@@ -309,7 +309,7 @@ reflected by an API change. See [#304](https://github.com/dimforge/rapier/pull/3
- All the impulse-based joints have been replaced by a single generic 6-Dofs joint in 3D
(or 3-Dofs joint in 2D) named `ImpulseJoint`. The `RevoluteJoint, PrismaticJoint, FixedJoint`,
and `SphericalJoint` (formely named `BallJoint`) structures still exist but are just convenient
and `SphericalJoint` (formerly named `BallJoint`) structures still exist but are just convenient
ways to initialize the generic `ImpulseJoint`.
- Our constraints solver has been modified. Before we used one velocity-based resolution followed
by one position-based resolution. We are now using two velocity-based resolution: the first one

View File

@@ -41,7 +41,7 @@ pub fn init_world(testbed: &mut Testbed) {
colliders.insert_with_parent(collider, handle, &mut bodies);
/*
* Create the trimeshes from a tesselated SVG.
* Create the trimeshes from a tessellated SVG.
*/
let mut fill_tess = FillTessellator::new();
let opt = usvg::Options::default();
@@ -67,7 +67,7 @@ pub fn init_world(testbed: &mut Testbed) {
&FillOptions::tolerance(0.01),
&mut BuffersBuilder::new(&mut mesh, VertexCtor { prim_id: 0 }),
)
.expect("Tesselation failed.");
.expect("Tessellation failed.");
let angle = transform.get_rotate() as f32;

View File

@@ -18,7 +18,7 @@ pub enum CharacterLength {
/// for a shape with an height equal to 20.0 will result in a maximum step height
/// of `0.1 * 20.0 = 2.0`.
Relative(Real),
/// The length is specified as an aboslute value, independent from the character shapes size.
/// The length is specified as an absolute value, independent from the character shapes size.
///
/// For example setting `CharacterAutostep::max_height` to `CharacterLength::Relative(0.1)`
/// for a shape with an height equal to 20.0 will result in a maximum step height

View File

@@ -17,7 +17,7 @@ mod timer;
/// Aggregation of all the performances counters tracked by rapier.
#[derive(Clone, Copy)]
pub struct Counters {
/// Whether thi counter is enabled or not.
/// Whether this counter is enabled or not.
pub enabled: bool,
/// Timer for a whole timestep.
pub step_time: Timer,
@@ -69,7 +69,7 @@ impl Counters {
}
}
/// Notfy that the time-step has finished.
/// Notify that the time-step has finished.
pub fn step_completed(&mut self) {
if self.enabled {
self.step_time.pause();
@@ -88,7 +88,7 @@ impl Counters {
}
}
/// Notfy that the custom operation has finished.
/// Notify that the custom operation has finished.
pub fn custom_completed(&mut self) {
if self.enabled {
self.custom.pause();

View File

@@ -21,7 +21,7 @@ pub struct StagesCounters {
}
impl StagesCounters {
/// Create a new counter intialized to zero.
/// Create a new counter initialized to zero.
pub fn new() -> Self {
StagesCounters {
update_time: Timer::new(),

View File

@@ -370,7 +370,7 @@ impl<N, E> Graph<N, E> {
// indices.
let edge = self.edges.swap_remove(e.index());
let swap = match self.edges.get(e.index()) {
// no elment needed to be swapped.
// no element needed to be swapped.
None => return Some(edge.weight),
Some(ed) => ed.node,
};

View File

@@ -103,7 +103,7 @@ impl<T> PubSub<T> {
subscription
}
/// Read the i-th message not yet read by the given subsciber.
/// Read the i-th message not yet read by the given subscriber.
pub fn read_ith(&self, sub: &Subscription<T>, i: usize) -> Option<&T> {
let cursor = &self.cursors[sub.id as usize];
self.messages.get(cursor.next(self.deleted_messages) + i)

View File

@@ -443,7 +443,7 @@ impl RigidBody {
self.ccd.ccd_enabled = enabled;
}
/// Is CCD (continous collision-detection) enabled for this rigid-body?
/// Is CCD (continuous collision-detection) enabled for this rigid-body?
pub fn is_ccd_enabled(&self) -> bool {
self.ccd.ccd_enabled
}

View File

@@ -595,7 +595,7 @@ impl RigidBodyVelocity {
}
/// Integrate the velocities in `self` to compute obtain new positions when moving from the given
/// inital position `init_pos`.
/// initial position `init_pos`.
#[must_use]
pub fn integrate(
&self,

View File

@@ -209,7 +209,7 @@ impl RigidBodySet {
/// Update colliders positions after rigid-bodies moved.
///
/// When a rigid-body moves, the positions of the colliders attached to it need to be updated.
/// This update is generally automatically done at the beggining and the end of each simulation
/// This update is generally automatically done at the beginning and the end of each simulation
/// step with `PhysicsPipeline::step`. If the positions need to be updated without running a
/// simulation step (for example when using the `QueryPipeline` alone), this method can be called
/// manually.

View File

@@ -96,7 +96,7 @@ impl<Constraints: ConstraintTypes> SolverConstraintsSet<Constraints> {
}
}
#[allow(dead_code)] // Useful for debuging.
#[allow(dead_code)] // Useful for debugging.
pub fn print_counts(&self) {
println!("Solver constraints:");
println!(

View File

@@ -8,7 +8,7 @@ pub type BroadPhaseProxyIndex = u32;
/// Trait implemented by broad-phase algorithms supported by Rapier.
///
/// The task of a broad-phase algorithm is to detect potential collision pairs, usually based on
/// bounding volumes. The pairs must be concervative: it is OK to create a collision pair if
/// bounding volumes. The pairs must be conservative: it is OK to create a collision pair if
/// two objects dont actually touch, but it is incorrect to remove a pair between two objects
/// that are still touching. In other words, it can have false-positive (though these induce
/// some computational overhead on the narrow-phase), but cannot have false-negative.

View File

@@ -302,7 +302,7 @@ impl Collider {
}
}
/// Sets the rotational part of this collider's rotaiton relative to its parent rigid-body.
/// Sets the rotational part of this collider's rotation relative to its parent rigid-body.
pub fn set_rotation_wrt_parent(&mut self, rotation: AngVector<Real>) {
if let Some(parent) = self.parent.as_mut() {
self.changes.insert(ColliderChanges::PARENT);

View File

@@ -100,7 +100,7 @@ impl QueryFilterFlags {
}
}
/// A filter tha describes what collider should be included or excluded from a scene query.
/// A filter that describes what collider should be included or excluded from a scene query.
#[derive(Copy, Clone, Default)]
pub struct QueryFilter<'a> {
/// Flags indicating what particular type of colliders should be excluded from the scene query.

View File

@@ -647,7 +647,7 @@ impl SimdAngularInertia<SimdReal> for SdpMatrix3<SimdReal> {
}
// This is an RAII structure that enables flushing denormal numbers
// to zero, and automatically reseting previous flags once it is dropped.
// to zero, and automatically resetting previous flags once it is dropped.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) struct FlushToZeroDenormalsAreZeroFlags {
original_flags: u32,

View File

@@ -1,4 +1,4 @@
#![allow(clippy::bad_bit_mask)] // otherwsie clippy complains because of TestbedStateFlags::NONE which is 0.
#![allow(clippy::bad_bit_mask)] // otherwise clippy complains because of TestbedStateFlags::NONE which is 0.
use std::env;
use std::mem;