use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testCompose1.
public void testCompose1() {
final AffineTransformation t0 = AffineTransformation.translationInstance(10, 0);
t0.rotate(Math.PI / 2);
t0.translate(0, -10);
final AffineTransformation t1 = AffineTransformation.translationInstance(0, 0);
t1.rotate(Math.PI / 2);
checkTransformation(t0, t1);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testTranslate1.
public void testTranslate1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.translationInstance(2, 3);
checkTransformation(1, 0, t, 3, 3);
checkTransformation(0, 0, t, 2, 3);
checkTransformation(-10, -5, t, -8, -2);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testScale1.
public void testScale1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.scaleInstance(2, 3);
checkTransformation(10, 0, t, 20, 0);
checkTransformation(0, 10, t, 0, 30);
checkTransformation(-10, -10, t, -20, -30);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testRotateAroundPoint1.
public void testRotateAroundPoint1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.rotationInstance(Math.PI / 2, 1, 1);
checkTransformation(1, 1, t, 1, 1);
checkTransformation(10, 0, t, 2, 10);
checkTransformation(0, 10, t, -8, 0);
checkTransformation(-10, -10, t, 12, -10);
}
Aggregations