use of georegression.struct.se.Se2_F64 in project BoofCV by lessthanoptimal.
the class TestSquaresIntoRegularClusters method createSquare.
private Polygon2D_F64 createSquare(double x, double y, double yaw, double width) {
Se2_F64 motion = new Se2_F64(x, y, yaw);
double r = width / 2;
Polygon2D_F64 poly = new Polygon2D_F64(4);
poly.get(0).setTo(-r, r);
poly.get(1).setTo(r, r);
poly.get(2).setTo(r, -r);
poly.get(3).setTo(-r, -r);
for (int i = 0; i < 4; i++) {
SePointOps_F64.transform(motion, poly.get(i), poly.get(i));
}
return poly;
}
Aggregations