Function rhusics_core::next_frame_integration
source · pub fn next_frame_integration<'a, T, D, P, A, I, R>(
data: D,
world_params: &WorldParameters<P::Diff, P::Scalar>,
dt: P::Scalar
)where
D: Iterator<Item = (&'a mut NextFrame<Velocity<P::Diff, A>>, &'a NextFrame<T>, &'a mut ForceAccumulator<P::Diff, A>, &'a Mass<P::Scalar, I>, &'a PhysicalEntity<P::Scalar>)>,
T: Pose<P, R> + 'a,
P: EuclideanSpace + 'a,
P::Scalar: BaseFloat,
P::Diff: VectorSpace + InnerSpace + 'a,
I: Inertia<Orientation = R> + Mul<A, Output = A> + 'a,
A: Mul<P::Scalar, Output = A> + Clone + Copy + Zero + 'a,
R: Rotation<P> + ApplyAngular<P::Scalar, A> + 'a,
Expand description
Do force integration for next frame.
Parameters:
data
: Iterator over tuple with:- Velocity for the next frame, will be updated
- Pose for the next frame, used to compute the inertia tensor for the body in the next frame
- Force accumulator, will be consumed and added to the velocity
- Mass, used by integration
- PhysicalEntity, used for gravity and damping calculation
world_params
: World physics parameters like gravity and global dampingdt
: Time step
Type parameters:
D
: Iterator typeP
: Point, usuallyPoint2
orPoint3
A
: Angular velocity, usuallyScalar
orVector3
I
: Inertia, usuallyScalar
orMatrix3
R
: Rotational quantity, usuallyBasis2
orQuaternion