Maven module :un.api : api-geometry :
Class : un.impl.geometry.Projections
Extends/Implements : -
Subclasses : -

Methods to create matrices for common transform cases.
author  Johann Sorel


Variables : -
Functions : centeredMatrix, centeredScaledMatrix, scaledMatrix, stretchedMatrix, zoomedMatrix, fitMatrix




Create a matrix that transform the given bbox to be centerd into target bbox.
param  source
param  target
return
public MatrixRW centeredMatrix (BBox source, BBox target)


Create a matrix that transform the given bbox to be centerd into target bbox.
The source bbox is scaled with given scale.
param  source
param  target
param  scale wanted scale.
return
public MatrixRW centeredScaledMatrix (BBox source, BBox target, double scale)


Create a matrix that transform the given bbox to fit into target bbox.
Dimensions ratio are preserved and will be centered in target bbox.
param  source
param  target
return
public MatrixRW scaledMatrix (BBox source, BBox target)


Create a matrix that transform the given bbox to fill the all space into target bbox.
Dimensions ratio are not preserved.
param  source
param  target
return
public MatrixRW stretchedMatrix (BBox source, BBox target)


Create a matrix that transform the given bbox to fill the all space into target bbox.
The source bbox is scaled preserving ratio and centering source bbox.
param  source
param  target
return
public MatrixRW zoomedMatrix (BBox source, BBox target)


Create a matrix that transform the given bbox to fit space into target bbox on one
specified dimension.
The source bbox is scaled preserving ratio and will be centered on other axis.
param  source
param  target
param  axis index to fit
return
public MatrixRW fitMatrix (BBox source, BBox target, int axis)