Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few doc-link fixes #562

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change which prompted this pull request.

/// 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