/** * Calculate the sum pixels in the image used for constructing this SAT * within the given 45-degree tilted rectangle. * * @param r * rectangle * @return sum of pixels in given rectangle */ public float calculateTiltedSumArea(Rectangle r) { return calculateTiltedSumArea(Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)); }
/** * Calculate the sum pixels in the image used for constructing this SAT * within the given 45-degree tilted rectangle. * * @param r * rectangle * @return sum of pixels in given rectangle */ public float calculateTiltedSumArea(Rectangle r) { return calculateTiltedSumArea(Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)); }