use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testTranslateRotate1.
public void testTranslateRotate1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.translationInstance(3, 3).rotate(Math.PI / 2);
checkTransformation(10, 0, t, -3, 13);
checkTransformation(-10, -10, t, 7, -7);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testComposeRotation1.
public void testComposeRotation1() {
final AffineTransformation t0 = AffineTransformation.rotationInstance(1, 10, 10);
final AffineTransformation t1 = AffineTransformation.translationInstance(-10, -10);
t1.rotate(1);
t1.translate(10, 10);
checkTransformation(t0, t1);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testShear1.
public void testShear1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.shearInstance(2, 3);
checkTransformation(10, 0, t, 10, 30);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testRotate1.
public void testRotate1() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.rotationInstance(Math.PI / 2);
checkTransformation(10, 0, t, 0, 10);
checkTransformation(0, 10, t, -10, 0);
checkTransformation(-10, -10, t, 10, -10);
}
use of com.revolsys.geometry.model.util.AffineTransformation in project com.revolsys.open by revolsys.
the class AffineTransformationTest method testReflectXY2.
public void testReflectXY2() throws IOException, ParseException {
final AffineTransformation t = AffineTransformation.reflectionInstance(1, -1);
checkTransformation(10, 0, t, 0, -10);
checkTransformation(0, 10, t, -10, 0);
checkTransformation(-10, -10, t, 10, 10);
checkTransformation(-3, -4, t, 4, 3);
}
Aggregations