Exemple #1
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateInertiaTotals
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the inertia totals for all the objects and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateInertiaTotals()
    {
        it_boat   = PhysicsCalculator.calculateInertiaTotal(moi_boat, mh_boat);
        it_pilot  = PhysicsCalculator.calculateInertiaTotal(moi_pilot, mh_pilot);
        it_cannon = PhysicsCalculator.calculateInertiaTotal(moi_cannon, mh_cannon);
        it_com    = PhysicsCalculator.calculateCombined(it_boat, it_pilot, it_cannon);
    }
Exemple #2
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateInertiaTotals
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the inertia totals for all the objects and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateInertiaTotals()
    {
        it_boat   = PhysicsCalculator.calculateInertiaTotal(moi_boat, mh_boat);
        it_pilot  = PhysicsCalculator.calculateInertiaTotal(moi_pilot, mh_pilot);
        it_cannon = PhysicsCalculator.calculateInertiaTotal(moi_cannon, mh_cannon);
        it_com    = PhysicsCalculator.calculateCombined(it_boat, it_pilot, it_cannon);

        boatFloats[8]   = it_boat;
        pilotFloats[8]  = it_pilot;
        cannonFloats[8] = it_cannon;
        comFloats[8]    = it_com;
    }