public class AffineProjection extends AbstractProjection implements Projection2D
Modifier and Type | Field and Description |
---|---|
private AffineTransformation |
proj
Affine transformation used in projection
|
scales
SCALE
Constructor and Description |
---|
AffineProjection(LinearScale[] scales,
AffineTransformation proj)
Constructor with a given database and axes.
|
Modifier and Type | Method and Description |
---|---|
static AffineTransformation |
axisProjection(int dim,
int ax1,
int ax2)
Compute an transformation matrix to show only axis ax1 and ax2.
|
String |
estimateTransformString(double margin,
double width,
double height)
Get a SVG transformation string to bring the contents into the unit cube.
|
Pair<DoubleMinMax,DoubleMinMax> |
estimateViewport()
Estimate the viewport requirements
|
double[] |
fastProjectDataToRenderSpace(NumberVector<?,?> data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectDataToRenderSpace(Vector data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectRelativeDataToRenderSpace(NumberVector<?,?> data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectRelativeDataToRenderSpace(Vector data)
Project a data vector from data space to rendering space.
|
double[] |
fastProjectRelativeScaledToRender(Vector v)
Project a vector from scaled space to rendering space.
|
double[] |
fastProjectScaledToRender(Vector v)
Project a vector from scaled space to rendering space.
|
BitSet |
getVisibleDimensions2D()
Get a bit set of dimensions that are visible.
|
Vector |
projectRelativeRenderToScaled(Vector v)
Project a relative vector from rendering space to scaled space.
|
Vector |
projectRelativeScaledToRender(Vector v)
Project a relative vector from scaled space to rendering space.
|
Vector |
projectRenderToScaled(Vector v)
Project a vector from rendering space to scaled space.
|
Vector |
projectScaledToRender(Vector v)
Project a vector from scaled space to rendering space.
|
getInputDimensionality, getLongName, getScale, getShortName, projectDataToRenderSpace, projectDataToRenderSpace, projectDataToScaledSpace, projectDataToScaledSpace, projectRelativeDataToRenderSpace, projectRelativeDataToRenderSpace, projectRelativeDataToScaledSpace, projectRelativeDataToScaledSpace, projectRelativeRenderToDataSpace, projectRelativeScaledToDataSpace, projectRenderToDataSpace, projectScaledToDataSpace
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputDimensionality, getScale, projectDataToRenderSpace, projectDataToRenderSpace, projectDataToScaledSpace, projectDataToScaledSpace, projectRelativeDataToRenderSpace, projectRelativeDataToRenderSpace, projectRelativeDataToScaledSpace, projectRelativeDataToScaledSpace, projectRelativeRenderToDataSpace, projectRelativeScaledToDataSpace, projectRenderToDataSpace, projectScaledToDataSpace
getHierarchy, setHierarchy
getLongName, getShortName
private AffineTransformation proj
public AffineProjection(LinearScale[] scales, AffineTransformation proj)
scales
- Scales to useproj
- Projection to usepublic Vector projectScaledToRender(Vector v)
projectScaledToRender
in interface Projection
v
- vector in scaled spacepublic Vector projectRenderToScaled(Vector v)
projectRenderToScaled
in interface Projection
v
- vector in rendering spacepublic Vector projectRelativeScaledToRender(Vector v)
projectRelativeScaledToRender
in interface Projection
v
- relative vector in scaled spacepublic Vector projectRelativeRenderToScaled(Vector v)
projectRelativeRenderToScaled
in interface Projection
v
- relative vector in rendering spacepublic Pair<DoubleMinMax,DoubleMinMax> estimateViewport()
Projection2D
estimateViewport
in interface Projection2D
public String estimateTransformString(double margin, double width, double height)
Projection2D
estimateTransformString
in interface Projection2D
margin
- extra margin to add.width
- Widthheight
- Heightpublic static AffineTransformation axisProjection(int dim, int ax1, int ax2)
dim
- Dimensionalityax1
- First axisax2
- Second axispublic double[] fastProjectDataToRenderSpace(Vector data)
Projection2D
fastProjectDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectDataToRenderSpace(NumberVector<?,?> data)
Projection2D
fastProjectDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectScaledToRender(Vector v)
Projection2D
fastProjectScaledToRender
in interface Projection2D
v
- vector in scaled spacepublic double[] fastProjectRelativeDataToRenderSpace(Vector data)
Projection2D
fastProjectRelativeDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectRelativeDataToRenderSpace(NumberVector<?,?> data)
Projection2D
fastProjectRelativeDataToRenderSpace
in interface Projection2D
data
- vector in data spacepublic double[] fastProjectRelativeScaledToRender(Vector v)
Projection2D
fastProjectRelativeScaledToRender
in interface Projection2D
v
- vector in scaled spacepublic BitSet getVisibleDimensions2D()
Projection2D
getVisibleDimensions2D
in interface Projection2D