Fix some typos. (#620)
This commit is contained in:
@@ -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`
|
- Joint motors no longer have a `VelocityBased` model. The new choices are `AccelerationBased` and `ForceBased`
|
||||||
which are more stable.
|
which are more stable.
|
||||||
- Calling the `.build()` function from builders (`RigidBodyBuilder`, `ColliderBuilder`, etc.) is no longer necessary
|
- 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
|
- 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
|
removed. Custom storage for colliders and rigid-bodies are no longer possible: use the built-in `RigidBodySet` and
|
||||||
`ColliderSet` instead.
|
`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
|
- 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`,
|
(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`.
|
ways to initialize the generic `ImpulseJoint`.
|
||||||
- Our constraints solver has been modified. Before we used one velocity-based resolution followed
|
- 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
|
by one position-based resolution. We are now using two velocity-based resolution: the first one
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ pub fn init_world(testbed: &mut Testbed) {
|
|||||||
colliders.insert_with_parent(collider, handle, &mut bodies);
|
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 mut fill_tess = FillTessellator::new();
|
||||||
let opt = usvg::Options::default();
|
let opt = usvg::Options::default();
|
||||||
@@ -67,7 +67,7 @@ pub fn init_world(testbed: &mut Testbed) {
|
|||||||
&FillOptions::tolerance(0.01),
|
&FillOptions::tolerance(0.01),
|
||||||
&mut BuffersBuilder::new(&mut mesh, VertexCtor { prim_id: 0 }),
|
&mut BuffersBuilder::new(&mut mesh, VertexCtor { prim_id: 0 }),
|
||||||
)
|
)
|
||||||
.expect("Tesselation failed.");
|
.expect("Tessellation failed.");
|
||||||
|
|
||||||
let angle = transform.get_rotate() as f32;
|
let angle = transform.get_rotate() as f32;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ pub enum CharacterLength {
|
|||||||
/// for a shape with an height equal to 20.0 will result in a maximum step height
|
/// for a shape with an height equal to 20.0 will result in a maximum step height
|
||||||
/// of `0.1 * 20.0 = 2.0`.
|
/// of `0.1 * 20.0 = 2.0`.
|
||||||
Relative(Real),
|
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 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
|
/// 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.
|
/// Aggregation of all the performances counters tracked by rapier.
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
pub struct Counters {
|
pub struct Counters {
|
||||||
/// Whether thi counter is enabled or not.
|
/// Whether this counter is enabled or not.
|
||||||
pub enabled: bool,
|
pub enabled: bool,
|
||||||
/// Timer for a whole timestep.
|
/// Timer for a whole timestep.
|
||||||
pub step_time: Timer,
|
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) {
|
pub fn step_completed(&mut self) {
|
||||||
if self.enabled {
|
if self.enabled {
|
||||||
self.step_time.pause();
|
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) {
|
pub fn custom_completed(&mut self) {
|
||||||
if self.enabled {
|
if self.enabled {
|
||||||
self.custom.pause();
|
self.custom.pause();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ pub struct StagesCounters {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl StagesCounters {
|
impl StagesCounters {
|
||||||
/// Create a new counter intialized to zero.
|
/// Create a new counter initialized to zero.
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
StagesCounters {
|
StagesCounters {
|
||||||
update_time: Timer::new(),
|
update_time: Timer::new(),
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ impl<N, E> Graph<N, E> {
|
|||||||
// indices.
|
// indices.
|
||||||
let edge = self.edges.swap_remove(e.index());
|
let edge = self.edges.swap_remove(e.index());
|
||||||
let swap = match self.edges.get(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),
|
None => return Some(edge.weight),
|
||||||
Some(ed) => ed.node,
|
Some(ed) => ed.node,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ impl<T> PubSub<T> {
|
|||||||
subscription
|
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> {
|
pub fn read_ith(&self, sub: &Subscription<T>, i: usize) -> Option<&T> {
|
||||||
let cursor = &self.cursors[sub.id as usize];
|
let cursor = &self.cursors[sub.id as usize];
|
||||||
self.messages.get(cursor.next(self.deleted_messages) + i)
|
self.messages.get(cursor.next(self.deleted_messages) + i)
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ impl RigidBody {
|
|||||||
self.ccd.ccd_enabled = enabled;
|
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 {
|
pub fn is_ccd_enabled(&self) -> bool {
|
||||||
self.ccd.ccd_enabled
|
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
|
/// 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]
|
#[must_use]
|
||||||
pub fn integrate(
|
pub fn integrate(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ impl RigidBodySet {
|
|||||||
/// Update colliders positions after rigid-bodies moved.
|
/// Update colliders positions after rigid-bodies moved.
|
||||||
///
|
///
|
||||||
/// When a rigid-body moves, the positions of the colliders attached to it need to be updated.
|
/// 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
|
/// 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
|
/// simulation step (for example when using the `QueryPipeline` alone), this method can be called
|
||||||
/// manually.
|
/// 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) {
|
pub fn print_counts(&self) {
|
||||||
println!("Solver constraints:");
|
println!("Solver constraints:");
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ pub type BroadPhaseProxyIndex = u32;
|
|||||||
/// Trait implemented by broad-phase algorithms supported by Rapier.
|
/// 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
|
/// 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
|
/// 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
|
/// 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.
|
/// 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>) {
|
pub fn set_rotation_wrt_parent(&mut self, rotation: AngVector<Real>) {
|
||||||
if let Some(parent) = self.parent.as_mut() {
|
if let Some(parent) = self.parent.as_mut() {
|
||||||
self.changes.insert(ColliderChanges::PARENT);
|
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)]
|
#[derive(Copy, Clone, Default)]
|
||||||
pub struct QueryFilter<'a> {
|
pub struct QueryFilter<'a> {
|
||||||
/// Flags indicating what particular type of colliders should be excluded from the scene query.
|
/// 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
|
// 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)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub(crate) struct FlushToZeroDenormalsAreZeroFlags {
|
pub(crate) struct FlushToZeroDenormalsAreZeroFlags {
|
||||||
original_flags: u32,
|
original_flags: u32,
|
||||||
|
|||||||
@@ -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::env;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|||||||
Reference in New Issue
Block a user