bevy_rapier3d/plugin/context/systemparams/
mod.rs

1//! Helper types to ease bevy_rapier API usage, grouping often used together components
2//! through [`bevy::ecs::query::QueryData`] or [`bevy::ecs::system::SystemParam`] to
3//! avoid writing too much boilerplate: shorter parameters for your systems,
4//! and pass less parameters to bey_rapier lower level functions.
5
6mod rapier_context_systemparam;
7
8use bevy::{ecs::query::QueryData, prelude::Entity};
9pub use rapier_context_systemparam::*;
10
11use super::RapierContextEntityLink;
12
13/// Information needed to access the rapier data from an entity managed by rapier.
14#[derive(QueryData)]
15pub struct RapierEntity {
16    /// This bevy [`Entity`].
17    pub entity: Entity,
18    /// Link to another bevy [`Entity`], which owns the context of this [`RapierEntity`]:
19    /// i.e. the relevant components from [`crate::plugin::context`].
20    pub rapier_context_link: &'static RapierContextEntityLink,
21}