src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java
/**
     * Calculate the mechanical energy of this body (kinetic + potential)
     * assuming a uniform gravitational field. The body must be in dynamic mode.
     *
     * @return the total mechanical energy
     */
Calculate the mechanical energy of this body (kinetic + potential)
assuming a uniform gravitational field. The body must be in dynamic mode.

@return the total mechanical energy
Calculate the mechanical energy of this body ( kinetic + potential ) assuming a uniform gravitational field . The body must be in dynamic mode . @return the total mechanical energy
public double mechanicalEnergy() {
        assert isDynamic();
        Vector3f gravity = getGravity(null);
        Vector3f location = getPhysicsLocation(null);
        double potentialEnergy = -mass * MyVector3f.dot(gravity, location);
        double result = potentialEnergy + kineticEnergy();
        return result;
    }
public double mechanicalEnergy ( ) { assert isDynamic ( ) ; Vector3f gravity = getGravity ( null ) ; Vector3f location = getPhysicsLocation ( null ) ; double potentialEnergy = - mass * MyVector3f . dot ( gravity , location ) ; double result = potentialEnergy + kineticEnergy ( ) ; return result ; }
Calculate the mechanical energy of this body (kinetic + potential)
 assuming a uniform gravitational field.
Calculate the mechanical energy of this body ( kinetic + potential ) assuming a uniform gravitational field .