예제 #1
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateComValues
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the center of mass the whole object and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateComValues()
    {
        comX = PhysicsCalculator.calculateComX(mass_boat, boat.getX(), mass_pilot, pilot.getX(), mass_cannon, cannon.getX(), mass_com);
        comZ = PhysicsCalculator.calculateComZ(mass_boat, boat.getZ(), mass_pilot, pilot.getZ(), mass_cannon, cannon.getZ(), mass_com);

        comFloats[4] = comX;
        comFloats[5] = comZ;
    }