Example #1
0
/*------------------------------------------------------------------------------------------------------------------
 * -- FUNCTION: calculateH
 * --
 * -- DATE: January 11, 2018
 * --
 * -- DESIGNER:   Michael Goll
 * --
 * -- PROGRAMMER: Michael Goll
 * --
 * -- NOTES:
 * -- Calls the physics helper function that calculates the H values for all the objects and
 * --     stores them in the appropriate data array.
 * ----------------------------------------------------------------------------------------------------------------------*/
    private void calculateH()
    {
        h_boat   = PhysicsCalculator.calculateRotationPoint(boat.getX(), boat.getZ(), comX, comZ);
        h_pilot  = PhysicsCalculator.calculateRotationPoint(pilot.getX(), pilot.getZ(), comX, comZ);
        h_cannon = PhysicsCalculator.calculateRotationPoint(cannon.getX(), cannon.getZ(), comX, comZ);

        boatFloats[2]   = h_boat;
        pilotFloats[2]  = h_pilot;
        cannonFloats[2] = h_cannon;
    }