Fix some typos. (#620)
This commit is contained in:
@@ -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 shape’s size.
|
||||
/// The length is specified as an absolute value, independent from the character shape’s 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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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!(
|
||||
|
||||
@@ -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 don’t 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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user