diff options
| author | Thierry Berger <contact@thierryberger.com> | 2024-07-12 16:29:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-12 16:29:22 +0200 |
| commit | 01dd2001525850ef0d66374c69e98e1560cb6421 (patch) | |
| tree | 5901b3c00d9ffc53a9af34e0023241eff256c8bc /src | |
| parent | 87ada34008f4a1a313ccf8c3040040bab4f10e69 (diff) | |
| download | rapier-01dd2001525850ef0d66374c69e98e1560cb6421.tar.gz rapier-01dd2001525850ef0d66374c69e98e1560cb6421.tar.bz2 rapier-01dd2001525850ef0d66374c69e98e1560cb6421.zip | |
ci: cargo doc step (#671)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynamics/integration_parameters.rs | 5 | ||||
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody.rs | 6 | ||||
| -rw-r--r-- | src/dynamics/rigid_body.rs | 3 | ||||
| -rw-r--r-- | src/dynamics/rigid_body_components.rs | 3 | ||||
| -rw-r--r-- | src/geometry/collider.rs | 5 | ||||
| -rw-r--r-- | src/geometry/contact_pair.rs | 3 | ||||
| -rw-r--r-- | src/geometry/narrow_phase.rs | 4 | ||||
| -rw-r--r-- | src/pipeline/query_pipeline/generators.rs | 5 |
8 files changed, 25 insertions, 9 deletions
diff --git a/src/dynamics/integration_parameters.rs b/src/dynamics/integration_parameters.rs index f475fd4..99b6fe4 100644 --- a/src/dynamics/integration_parameters.rs +++ b/src/dynamics/integration_parameters.rs @@ -2,6 +2,9 @@ use crate::math::Real; use na::RealField; use std::num::NonZeroUsize; +#[cfg(doc)] +use super::RigidBodyActivation; + // TODO: enabling the block solver in 3d introduces a lot of jitters in // the 3D domino demo. So for now we dont enable it in 3D. pub(crate) static BLOCK_SOLVER_ENABLED: bool = cfg!(feature = "dim2"); @@ -66,7 +69,7 @@ pub struct IntegrationParameters { /// This value is used internally to estimate some length-based tolerance. In particular, the /// values [`IntegrationParameters::allowed_linear_error`], /// [`IntegrationParameters::max_corrective_velocity`], - /// [`IntegrationParameters::prediction_distance`], [`RigidBodyActivation::linear_threshold`] + /// [`IntegrationParameters::prediction_distance`], [`RigidBodyActivation::normalized_linear_threshold`] /// are scaled by this value implicitly. /// /// This value can be understood as the number of units-per-meter in your physical world compared diff --git a/src/dynamics/joint/multibody_joint/multibody.rs b/src/dynamics/joint/multibody_joint/multibody.rs index 7832abe..6859fd9 100644 --- a/src/dynamics/joint/multibody_joint/multibody.rs +++ b/src/dynamics/joint/multibody_joint/multibody.rs @@ -13,6 +13,9 @@ use na::{ StorageMut, LU, }; +#[cfg(doc)] +use crate::prelude::{GenericJoint, RigidBody}; + #[repr(C)] #[derive(Copy, Clone, Debug, Default)] struct Force { @@ -861,8 +864,7 @@ impl Multibody { /// Apply displacements, in generalized coordinates, to this multibody. /// /// Note this does **not** updates the link poses, only their generalized coordinates. - /// To update the link poses and associated rigid-bodies, call [`Self::forward_kinematics`] - /// or [`Self::finalize`]. + /// To update the link poses and associated rigid-bodies, call [`Self::forward_kinematics`]. pub fn apply_displacements(&mut self, disp: &[Real]) { for link in self.links.iter_mut() { link.joint.apply_displacement(&disp[link.assembly_id..]) diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs index 50e3211..8522d4d 100644 --- a/src/dynamics/rigid_body.rs +++ b/src/dynamics/rigid_body.rs @@ -10,6 +10,9 @@ use crate::math::{AngVector, Isometry, Point, Real, Rotation, Vector}; use crate::utils::SimdCross; use num::Zero; +#[cfg(doc)] +use super::IntegrationParameters; + #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] /// A rigid body. /// diff --git a/src/dynamics/rigid_body_components.rs b/src/dynamics/rigid_body_components.rs index 641434c..38ba491 100644 --- a/src/dynamics/rigid_body_components.rs +++ b/src/dynamics/rigid_body_components.rs @@ -10,6 +10,9 @@ use crate::parry::partitioning::IndexedData; use crate::utils::{SimdAngularInertia, SimdCross, SimdDot}; use num::Zero; +#[cfg(doc)] +use super::IntegrationParameters; + /// The unique handle of a rigid body added to a `RigidBodySet`. #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Default)] #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index d72e098..1ceab43 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -622,8 +622,9 @@ impl ColliderBuilder { /// Initialize a new collider builder with a capsule defined from its endpoints. /// - /// See also [`ColliderBuilder::capsule_x`], [`ColliderBuilder::capsule_y`], and - /// [`ColliderBuilder::capsule_z`], for a simpler way to build capsules with common + /// See also [`ColliderBuilder::capsule_x`], [`ColliderBuilder::capsule_y`], + /// (and `ColliderBuilder::capsule_z` in 3D only) + /// for a simpler way to build capsules with common /// orientations. pub fn capsule_from_endpoints(a: Point<Real>, b: Point<Real>, radius: Real) -> Self { Self::new(SharedShape::capsule(a, b, radius)) diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs index 8ff5dd6..3d4e955 100644 --- a/src/geometry/contact_pair.rs +++ b/src/geometry/contact_pair.rs @@ -7,6 +7,9 @@ use parry::query::ContactManifoldsWorkspace; use super::CollisionEvent; +#[cfg(doc)] +use super::Collider; + bitflags::bitflags! { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Copy, Clone, PartialEq, Eq, Debug)] diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs index 717fa25..e979a2f 100644 --- a/src/geometry/narrow_phase.rs +++ b/src/geometry/narrow_phase.rs @@ -108,7 +108,7 @@ impl NarrowPhase { /// All the contacts involving the given collider. /// - /// It is strongly recommended to use the [`NarrowPhase::contacts_with`] method instead. This + /// It is strongly recommended to use the [`NarrowPhase::contact_pairs_with`] method instead. This /// method can be used if the generation number of the collider handle isn't known. pub fn contact_pairs_with_unknown_gen( &self, @@ -141,7 +141,7 @@ impl NarrowPhase { /// All the intersection pairs involving the given collider. /// - /// It is strongly recommended to use the [`NarrowPhase::intersections_with`] method instead. + /// It is strongly recommended to use the [`NarrowPhase::intersection_pairs_with`] method instead. /// This method can be used if the generation number of the collider handle isn't known. pub fn intersection_pairs_with_unknown_gen( &self, diff --git a/src/pipeline/query_pipeline/generators.rs b/src/pipeline/query_pipeline/generators.rs index 5b86d6a..1145b4a 100644 --- a/src/pipeline/query_pipeline/generators.rs +++ b/src/pipeline/query_pipeline/generators.rs @@ -7,8 +7,9 @@ use crate::prelude::{Aabb, ColliderHandle, ColliderSet, RigidBodySet}; #[cfg(doc)] use crate::{ - dynamics::{IntegrationParameters, RigidBodyPosition}, + dynamics::{IntegrationParameters, RigidBody, RigidBodyPosition}, pipeline::QueryPipeline, + prelude::Collider, }; /// Generates collider AABBs based on the union of their current AABB and the AABB predicted @@ -26,7 +27,7 @@ pub struct SweptAabbWithPredictedPosition<'a> { pub colliders: &'a ColliderSet, /// The delta time to compute predicted position. /// - /// You probably want to set it to [`IntegrationParameter::dt`]. + /// You probably want to set it to [`IntegrationParameters::dt`]. pub dt: Real, } impl<'a> QbvhDataGenerator<ColliderHandle> for SweptAabbWithPredictedPosition<'a> { |
