Trait rhusics_ecs::WithRigidBody [−][src]
pub trait WithRigidBody { fn with_dynamic_rigid_body<P, Y, R, V, A, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
velocity: Velocity<V, A>,
body: RigidBody<V::Scalar>,
mass: Mass<V::Scalar, I>
) -> Self
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,
R: Rotation<P::Point> + 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; fn with_static_rigid_body<S, P, Y, R, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
body: RigidBody<S>,
mass: Mass<S, I>
) -> Self
where
T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
S: BaseFloat + Send + Sync + 'static,
P: Primitive + Send + Sync + 'static,
B: Bound<Point = P::Point> + Send + Sync + 'static,
P::Point: EuclideanSpace<Scalar = S> + Send + Sync + 'static,
R: Rotation<P::Point> + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static; }
Adds rigid body builder functions to EntityBuilder
Required Methods
fn with_dynamic_rigid_body<P, Y, R, V, A, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
velocity: Velocity<V, A>,
body: RigidBody<V::Scalar>,
mass: Mass<V::Scalar, I>
) -> Self 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,
R: Rotation<P::Point> + 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,
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
velocity: Velocity<V, A>,
body: RigidBody<V::Scalar>,
mass: Mass<V::Scalar, I>
) -> Self 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,
R: Rotation<P::Point> + 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,
Add dynamic rigid body components to entity
Type parameters:
P
: Collision PrimitiveY
: ColliderR
: Rotational quantityV
: VectorA
: Angular velocityI
: InertiaB
: Bounding volumeT
: Transform
fn with_static_rigid_body<S, P, Y, R, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
body: RigidBody<S>,
mass: Mass<S, I>
) -> Self where
T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
S: BaseFloat + Send + Sync + 'static,
P: Primitive + Send + Sync + 'static,
B: Bound<Point = P::Point> + Send + Sync + 'static,
P::Point: EuclideanSpace<Scalar = S> + Send + Sync + 'static,
R: Rotation<P::Point> + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
body: RigidBody<S>,
mass: Mass<S, I>
) -> Self where
T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
S: BaseFloat + Send + Sync + 'static,
P: Primitive + Send + Sync + 'static,
B: Bound<Point = P::Point> + Send + Sync + 'static,
P::Point: EuclideanSpace<Scalar = S> + Send + Sync + 'static,
R: Rotation<P::Point> + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,
Add static rigid body components to entity
Type parameters:
S
: Scalar (f32 or f64)P
: Collision PrimitiveY
: ColliderR
: Rotational quantityI
: InertiaB
: Bounding volumeT
: Transform
Implementations on Foreign Types
impl<'a> WithRigidBody for EntityBuilder<'a>
[src]
impl<'a> WithRigidBody for EntityBuilder<'a>
fn with_dynamic_rigid_body<P, Y, R, V, A, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
velocity: Velocity<V, A>,
body: RigidBody<V::Scalar>,
mass: Mass<V::Scalar, I>
) -> Self 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,
R: Rotation<P::Point> + Send + Sync + 'static,
V: VectorSpace + Zero + Clone + Send + Sync + 'static,
V::Scalar: BaseFloat + Send + Sync + 'static,
A: Copy + Clone + Zero + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,
[src]
fn with_dynamic_rigid_body<P, Y, R, V, A, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
velocity: Velocity<V, A>,
body: RigidBody<V::Scalar>,
mass: Mass<V::Scalar, I>
) -> Self 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,
R: Rotation<P::Point> + Send + Sync + 'static,
V: VectorSpace + Zero + Clone + Send + Sync + 'static,
V::Scalar: BaseFloat + Send + Sync + 'static,
A: Copy + Clone + Zero + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,
fn with_static_rigid_body<S, P, Y, R, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
body: RigidBody<S>,
mass: Mass<S, I>
) -> Self where
T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
S: BaseFloat + Send + Sync + 'static,
P: Primitive + Send + Sync + 'static,
B: Bound<Point = P::Point> + Send + Sync + 'static,
P::Point: EuclideanSpace<Scalar = S> + Send + Sync + 'static,
R: Rotation<P::Point> + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,
[src]
fn with_static_rigid_body<S, P, Y, R, I, B, T>(
self,
shape: CollisionShape<P, T, B, Y>,
pose: T,
body: RigidBody<S>,
mass: Mass<S, I>
) -> Self where
T: Pose<P::Point, R> + Clone + Component + Send + Sync + 'static,
S: BaseFloat + Send + Sync + 'static,
P: Primitive + Send + Sync + 'static,
B: Bound<Point = P::Point> + Send + Sync + 'static,
P::Point: EuclideanSpace<Scalar = S> + Send + Sync + 'static,
R: Rotation<P::Point> + Send + Sync + 'static,
Y: Send + Sync + 'static,
I: Send + Sync + 'static,