/// Convert a cartesian x, y coordinate to a raster x, y coordinate.
/// This will flip the Y coordinate, so points that hit the bottom of the cartesian plane will
/// be mapped to the top of the histogram and vice versa.
/// There is a very slim chance that a point will be right on the border and will technically be in bounds, passing the InBounds() test,
/// but ends up being mapped to a histogram bucket that is out of bounds due to roundoff error. Perform an additional check after this call to make sure the
/// Convert a cartesian x, y coordinate to a single raster buffer index.
/// This will flip the Y coordinate, so points that hit the bottom of the cartesian plane will
/// be mapped to the top of the histogram and vice versa.
/// There is a very slim chance that a point will be right on the border and will technically be in bounds, passing the InBounds() test,
/// but ends up being mapped to a histogram bucket that is out of bounds due to roundoff error. Perform an additional check after this call to make sure the
/// mapped point is in bounds.
/// </summary>
/// <param name="cartX">The cartesian x</param>
/// <param name="cartY">The cartesian y</param>
/// <param name="singleBufferIndex">The converted single raster buffer index</param>
/// Convert a cartesian x, y point to a single raster buffer index.
/// This will flip the Y coordinate, so points that hit the bottom of the cartesian plane will
/// be mapped to the top of the histogram and vice versa.
/// This is the most efficient possible way of converting, consisting of only
/// a multiply and subtract per coordinate element.
/// There is a very slim chance that a point will be right on the border and will technically be in bounds, passing the InBounds() test,
/// but ends up being mapped to a histogram bucket that is out of bounds due to roundoff error. Perform an additional check after this call to make sure the
/// mapped point is in bounds.
/// </summary>
/// <param name="point">The cartesian y</param>
/// <param name="singleBufferIndex">The converted single raster buffer index</param>
/// Determine if a point in the cartesian plane can be converted to a point within the raster plane.
/// There is a very slim chance that a point will be right on the border and will technically be in bounds, passing the InBounds() test,
/// but ends up being mapped to a histogram bucket that is out of bounds due to roundoff error. Perform an additional check after this call to make sure the
/// mapped point is in bounds.
/// </summary>
/// <param name="point">The point to test</param>
/// <returns>True if within bounds, else false</returns>
inlineboolInBounds(Point<T>&point)
{
//Debug check for hitting the very first pixel in the image.
//if (point.m_Y > m_CarLlY && point.m_Y <= m_PadCarLlY && //Mapped to top row...
Tm_OneRow;//The distance that one raster row represents in the cartesian plane.
Tm_OneCol;//The distance that one raster column represents in the cartesian plane.
Tm_PixPerImageUnitW;//The number of columns in the raster plane that a horizontal distance of 1 in the cartesian plane represents. The higher the number, the more zoomed in.
Tm_RasLlX;//The lower left x of the raster image plane.
Tm_PixPerImageUnitH;//The number of rows in the raster plane that a vertical distance of 1 in the cartesian plane represents. The higher the number, the more zoomed in.
Tm_RasLlY;//The lower left y of the raster image plane.
Tm_CarLlX,m_CarLlY,m_CarUrX,m_CarUrY;//The bounds of the cartesian plane.
Tm_PadCarLlX,m_PadCarLlY,m_PadCarUrX,m_PadCarUrY;//The bounds of the cartesian plane padded by one raster row and column on each side.