public interface IScalarAffineTransform
The transform is fully described (apart from numerical precision) by the multiplier and the offset. These methods are intended for when the
transform is to be performed on a large number of primitives and possibly in conjunction with
other transformations. A coalesced transformation can then be applied to every primitive,
optimally by specialized hardware (like a GPU).
| Modifier and Type | Method and Description |
|---|---|
IScalarAffineTransform |
concat(IScalarAffineTransform innerTransform)
Concatenate this transform with
innerTransform, such that applying the resulting
transform is equivalent to first applying innerTransform and then applying this
transform on the resulting value. |
double |
getMultiplier() |
Number |
getOffset() |
IScalarAffineTransform |
invert() |
IScalarAffineTransform |
invertAndConcat(IScalarAffineTransform innerTransform)
Concatenate the inverse of this transform with
innerTransform, such that applying the
resulting transform is equivalent to first applying innerTransform and then applying
this inverse of this transform on the resulting value. |
boolean |
isInteger() |
boolean |
isUnity() |
double |
targetFloor(double srcNumericalValue) |
long |
targetFloor(long srcNumericalValue) |
int |
targetIntFloor(Number srcNumericalValue) |
Number |
targetNumber(long srcNumericalValue) |
Number |
targetNumber(Number srcNumericalValue) |
boolean |
targetOutOfRange(double srcNumericalValue,
long maxAbsValue) |
boolean |
targetOutOfRange(long srcNumericalValue,
long maxAbsValue) |
double |
targetValue(double srcNumericalValue) |
long |
targetValue(long srcNumericalValue) |
Number getOffset()
multiplier)double getMultiplier()
offset is added)boolean targetOutOfRange(long srcNumericalValue,
long maxAbsValue)
boolean targetOutOfRange(double srcNumericalValue,
long maxAbsValue)
long targetValue(long srcNumericalValue)
srcNumericalValue - a numerical quantity value, expressed in the source unitlonglong targetFloor(long srcNumericalValue)
srcNumericalValue - a numerical quantity value, expressed in the source unitlongdouble targetFloor(double srcNumericalValue)
srcNumericalValue - a numerical quantity value, expressed in the source unitint targetIntFloor(Number srcNumericalValue)
srcNumericalValue - a numerical quantity value, expressed in the source unitintNumber targetNumber(long srcNumericalValue)
srcNumericalValue - an exact numerical quantity value, expressed in the source unitLong if it can exactly be represented in one, otherwise as some other
Number with at least the precision of doubleNumber targetNumber(Number srcNumericalValue)
srcNumericalValue - an exact or inexact numerical quantity value, expressed in the source unitLong if it can exactly be represented in one, otherwise as some other
Number with at least the precision of doubledouble targetValue(double srcNumericalValue)
srcNumericalValue - a numerical quantity value, expressed in the source unitIScalarAffineTransform invert()
boolean isUnity()
boolean isInteger()
IScalarAffineTransform concat(IScalarAffineTransform innerTransform)
innerTransform, such that applying the resulting
transform is equivalent to first applying innerTransform and then applying this
transform on the resulting value. That is, R(v) = T(I(v)), where R(v) is the resulting
transform, T(v) is this transform, and I(v) is innerTransform.
In this snippet, v1 and v2 should be equal, apart from numerical precision,
for any v.
IScalarAffineTransform R, T = ..., I = ...; double v = ...; R = T.concat(I); double v1 = R.targetValue(v); double v2 = T.targetValue(I.targetValue(v));
innerTransform - the transform that should be applied before this transformIScalarAffineTransform invertAndConcat(IScalarAffineTransform innerTransform)
innerTransform, such that applying the
resulting transform is equivalent to first applying innerTransform and then applying
this inverse of this transform on the resulting value. That is, R(v) = T-1(I(v)),
where R(v) is the resulting transform, T-1(v) is the inverse of this transform,
and I(v) is innerTransform.
In this snippet, v1 and v2 should be equal, apart from numerical precision,
for any v.
IScalarAffineTransform R, T = ..., I = ...; double v = ...; R = T.invertAndConcat(I); double v1 = R.targetValue(v); double v2 = T.invert().targetValue(I.targetValue(v));
innerTransform - the transform that should be applied before this transformCopyright © 2019. All rights reserved.