/// Gravity to apply to dynamic bodies in the simulation.
/// </summary>
publicVector3Gravity;
/// <summary>
/// Fraction of dynamic body linear velocity to remove per unit of time. Values range from 0 to 1. 0 is fully undamped, while values very close to 1 will remove most velocity.
/// </summary>
publicfloatLinearDamping;
/// <summary>
/// Fraction of dynamic body angular velocity to remove per unit of time. Values range from 0 to 1. 0 is fully undamped, while values very close to 1 will remove most velocity.
//In this demo, we don't need to initialize anything.
//If you had a simulation with per body gravity stored in a CollidableProperty<T> or something similar, having the simulation provided in a callback can be helpful.
}
/// <summary>
/// Creates a new set of simple callbacks for the demos.
/// </summary>
/// <param name="gravity">Gravity to apply to dynamic bodies in the simulation.</param>
/// <param name="linearDamping">Fraction of dynamic body linear velocity to remove per unit of time. Values range from 0 to 1. 0 is fully undamped, while values very close to 1 will remove most velocity.</param>
/// <param name="angularDamping">Fraction of dynamic body angular velocity to remove per unit of time. Values range from 0 to 1. 0 is fully undamped, while values very close to 1 will remove most velocity.</param>
//Implementation sidenote: Why aren't kinematics all bundled together separately from dynamics to avoid this per-body condition?
//Because kinematics can have a velocity- that is what distinguishes them from a static object. The solver must read velocities of all bodies involved in a constraint.
//Under ideal conditions, those bodies will be near in memory to increase the chances of a cache hit. If kinematics are separately bundled, the the number of cache
//misses necessarily increases. Slowing down the solver in order to speed up the pose integrator is a really, really bad trade, especially when the benefit is a few ALU ops.
//Note that you CAN technically modify the pose in IntegrateVelocity by directly accessing it through the Simulation.Bodies.ActiveSet.Poses, it just requires a little care and isn't directly exposed.
//If the PositionFirstTimestepper is being used, then the pose integrator has already integrated the pose.
//If the PositionLastTimestepper or SubsteppingTimestepper are in use, the pose has not yet been integrated.
//If your pose modification depends on the order of integration, you'll want to take this into account.
//This is also a handy spot to implement things like position dependent gravity or per-body damping.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.