Exemplo n.º 1
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateMH
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the MH values for all the objects and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateMH()
    {
        mh_boat   = PhysicsCalculator.calculateMH(h_boat, mass_boat);
        mh_pilot  = PhysicsCalculator.calculateMH(h_pilot, mass_pilot);
        mh_cannon = PhysicsCalculator.calculateMH(h_cannon, mass_cannon);
        mh_com    = PhysicsCalculator.calculateCombined(mh_boat, mh_pilot, mh_cannon);
    }
Exemplo n.º 2
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateMH
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the MH values for all the objects and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateMH()
    {
        mh_boat   = PhysicsCalculator.calculateMH(h_boat, mass_boat);
        mh_pilot  = PhysicsCalculator.calculateMH(h_pilot, mass_pilot);
        mh_cannon = PhysicsCalculator.calculateMH(h_cannon, mass_cannon);
        mh_com    = PhysicsCalculator.calculateCombined(mh_boat, mh_pilot, mh_cannon);

        boatFloats[3]   = mh_boat;
        pilotFloats[3]  = mh_pilot;
        cannonFloats[3] = mh_cannon;
        comFloats[3]    = mh_com;
    }