Skip to content

Commit

Permalink
A few doc-link fixes (dimforge#562)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Crozet <sebastien@crozet.re>
  • Loading branch information
Vrixyz and sebcrozet committed Aug 8, 2024
1 parent 6ffef51 commit 222d14c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/geometry/collider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,17 @@ impl Default for Friction {
}

impl Friction {
/// Creates a `Friction` component from the given friction coefficient, and using the default
/// `CoefficientCombineRule::Average` coefficient combine rule.
/// Creates a [`Friction`] component from the given friction coefficient, and using the default
/// [`CoefficientCombineRule::Average`] coefficient combine rule.
pub const fn new(coefficient: f32) -> Self {
Self {
coefficient,
combine_rule: CoefficientCombineRule::Average,
}
}

/// Creates a `Friction` component from the given friction coefficient, and using the default
/// `CoefficientCombineRule::Average` coefficient combine rule.
/// Creates a [`Friction`] component from the given friction coefficient, and using the default
/// [`CoefficientCombineRule::Average`] coefficient combine rule.
pub const fn coefficient(coefficient: f32) -> Self {
Self {
coefficient,
Expand All @@ -204,17 +204,17 @@ pub struct Restitution {
}

impl Restitution {
/// Creates a `Restitution` component from the given restitution coefficient, and using the default
/// `CoefficientCombineRule::Average` coefficient combine rule.
/// Creates a [`Restitution`] component from the given restitution coefficient, and using the default
/// [`CoefficientCombineRule::Average`] coefficient combine rule.
pub const fn new(coefficient: f32) -> Self {
Self {
coefficient,
combine_rule: CoefficientCombineRule::Average,
}
}

/// Creates a `Restitution` component from the given restitution coefficient, and using the default
/// `CoefficientCombineRule::Average` coefficient combine rule.
/// Creates a [`Restitution`] component from the given restitution coefficient, and using the default
/// [`CoefficientCombineRule::Average`] coefficient combine rule.
pub const fn coefficient(coefficient: f32) -> Self {
Self {
coefficient,
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::math::{Real, Vect};
use crate::plugin::RapierContext;

#[cfg(doc)]
use rapier::dynamics::IntegrationParameters;
use {crate::prelude::TransformInterpolation, rapier::dynamics::IntegrationParameters};

/// Difference between simulation and rendering time
#[derive(Resource, Default)]
Expand Down Expand Up @@ -39,7 +39,7 @@ pub enum TimestepMode {
},
/// Use a fixed timestep equal to `IntegrationParameters::dt`, but don't step if the
/// physics simulation advanced by a time greater than the real-world elapsed time multiplied by `time_scale`.
/// Rigid-bodies with a component `InterpolatedTransform` attached will use interpolation to
/// Rigid-bodies with a component [`TransformInterpolation`] attached will use interpolation to
/// estimate the rigid-bodies position in-between steps.
Interpolated {
/// The physics simulation will be advanced by this total amount at each Bevy tick, unless
Expand Down
5 changes: 4 additions & 1 deletion src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ use rapier::pipeline::{DebugRenderBackend, DebugRenderObject, DebugRenderPipelin
pub use rapier::pipeline::{DebugRenderMode, DebugRenderStyle};
use std::fmt::Debug;

#[cfg(doc)]
use crate::prelude::Collider;

/// The color of a collider when using the debug-renderer.
///
/// Insert this component alongside the collider component to
/// Insert this component alongside the [`Collider`] component to
/// force to a specific value the color used to render the
/// collider.
#[derive(Copy, Clone, Component, PartialEq, Debug)]
Expand Down

0 comments on commit 222d14c

Please sign in to comment.