• In an array of state variables for a set of RigidBody's, this sets the state variables for one RigidBody. This is used to define expected results of tests. NOTE: the simulation must already have the set of bodies added, so that this can find their index within the VarsList.

    Parameters

    • sim: RigidBodySim

      the RigidBodySim being tested (to find index of body's vars)

    • vars: number[]

      the array of state variables for a set of RigidBodys

    • i: number

      index of the body whose state variables are to be set

    • x: number

      horiz position of the body

    • vx: number

      horiz velocity of the body

    • y: number

      vertical position of the body

    • vy: number

      vertical velocity of the body

    • w: number

      angle of the body

    • vw: number

      angular velocity of the body

    Returns void

Generated using TypeDoc