Struct rhusics_ecs::RigidBodyParts[][src]

pub struct RigidBodyParts<'a, P, Y, R, V, A, I, B, T> where
    T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
    P: Primitive + Send + Sync + 'static,
    B: Bound<Point = P::Point> + Send + Sync + 'static,
    P::Point: EuclideanSpace<Scalar = V::Scalar> + Send + Sync + 'static,
    V::Scalar: BaseFloat + Send + Sync + 'static,
    V: VectorSpace + Zero + Clone + Send + Sync + 'static,
    A: Copy + Zero + Clone + Send + Sync + 'static,
    Y: Send + Sync + 'static,
    I: Send + Sync + 'static,
    R: Rotation<P::Point> + Send + Sync + 'static, 
{ pub shapes: WriteStorage<'a, CollisionShape<P, T, B, Y>>, pub poses: WriteStorage<'a, T>, pub bodies: WriteStorage<'a, RigidBody<V::Scalar>>, pub masses: WriteStorage<'a, Mass<V::Scalar, I>>, pub velocities: WriteStorage<'a, Velocity<V, A>>, pub next_poses: WriteStorage<'a, NextFrame<T>>, pub next_velocities: WriteStorage<'a, NextFrame<Velocity<V, A>>>, pub forces: WriteStorage<'a, ForceAccumulator<V, A>>, // some fields omitted }

SystemData for easier creation of rigid bodies.

Type parameters:

  • P: Collision Primitive
  • Y: Collider
  • R: Rotational quantity
  • V: Linear velocity
  • A: Angular velocity
  • I: Inertia
  • B: Bounding volume
  • T: Transform

Fields

Collision shapes

Body transforms

Bodies

Mass

Velocity

Next frame transform

Next frame velocity

Forces

Methods

impl<'a, P, Y, R, V, A, I, B, T> RigidBodyParts<'a, P, Y, R, V, A, I, B, T> where
    T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
    P: Primitive + Send + Sync + 'static,
    B: Bound<Point = P::Point> + Send + Sync + 'static,
    P::Point: EuclideanSpace<Scalar = V::Scalar> + Send + Sync + 'static,
    V::Scalar: BaseFloat + Send + Sync + 'static,
    V: VectorSpace + Zero + Clone + Send + Sync + 'static,
    A: Copy + Zero + Clone + Send + Sync + 'static,
    Y: Send + Sync + 'static,
    I: Send + Sync + 'static,
    R: Rotation<P::Point> + Send + Sync + 'static, 
[src]

Extract rigid body storage from World

Setup static rigid body for given entity.

Setup dynamic rigid body for given entity.

Trait Implementations

impl<'a, P, Y, R, V, A, I, B, T> SystemData<'a> for RigidBodyParts<'a, P, Y, R, V, A, I, B, T> where
    T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
    P: Primitive + Send + Sync + 'static,
    B: Bound<Point = P::Point> + Send + Sync + 'static,
    P::Point: EuclideanSpace<Scalar = V::Scalar> + Send + Sync + 'static,
    V::Scalar: BaseFloat + Send + Sync + 'static,
    V: VectorSpace + Zero + Clone + Send + Sync + 'static,
    A: Copy + Zero + Clone + Send + Sync + 'static,
    Y: Send + Sync + 'static,
    I: Send + Sync + 'static,
    R: Rotation<P::Point> + Send + Sync + 'static,
    WriteStorage<'a, CollisionShape<P, T, B, Y>>: SystemData<'a>,
    WriteStorage<'a, T>: SystemData<'a>,
    WriteStorage<'a, RigidBody<V::Scalar>>: SystemData<'a>,
    WriteStorage<'a, Mass<V::Scalar, I>>: SystemData<'a>,
    WriteStorage<'a, Velocity<V, A>>: SystemData<'a>,
    WriteStorage<'a, NextFrame<T>>: SystemData<'a>,
    WriteStorage<'a, NextFrame<Velocity<V, A>>>: SystemData<'a>,
    WriteStorage<'a, ForceAccumulator<V, A>>: SystemData<'a>,
    PhantomData<R>: SystemData<'a>, 
[src]

Sets up the system data for fetching it from the Resources.

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime. Read more

Important traits for Vec<u8>

Returns all read dependencies as fetched from Self::fetch. Read more

Important traits for Vec<u8>

Returns all write dependencies as fetched from Self::fetch. Read more

Auto Trait Implementations

impl<'a, P, Y, R, V, A, I, B, T> Send for RigidBodyParts<'a, P, Y, R, V, A, I, B, T> where
    <T as Component>::Storage: Send

impl<'a, P, Y, R, V, A, I, B, T> Sync for RigidBodyParts<'a, P, Y, R, V, A, I, B, T> where
    <T as Component>::Storage: Sync