@Override
public RoofTypeOutput buildRoof(Point2d startPoint, PolygonWithHolesList2d buildingPolygon, DormerRoofModel roof,
double height, RoofMaterials roofTextureData) {
SimpleMatrix transformLocal = TransformationMatrix2d.tranA(-startPoint.x, -startPoint.y);
PolygonWithHolesList2d buildingTransformed = PolygonWithHolesList2dUtil.transform(buildingPolygon, transformLocal);
Measurement measurement = roof.getMeasurements().get(MeasurementKey.HEIGHT_1);
Double h1 = null;
Double angle = null;
if (isUnit(measurement, MeasurementUnit.DEGREES)) {
angle = measurement.getValue();
} else {
h1 = getHeightMeters(roof.getMeasurements(), MeasurementKey.HEIGHT_1, 2.5d);
}
RoofTypeOutput rto = build(buildingTransformed, h1, angle, 0, 0, roofTextureData);
SimpleMatrix transformGlobal = TransformationMatrix3d.tranA(startPoint.x, height - rto.getHeight(), -startPoint.y);
rto.setTransformationMatrix(transformGlobal);
return rto;
}