polygonAttributes.setCapability(PolygonAttributes.ALLOW_CULL_FACE_WRITE);
polygonAttributes.setCapability(PolygonAttributes.ALLOW_NORMAL_FLIP_WRITE);
Enumeration<?> enumeration = shape.getAllGeometries();
while (enumeration.hasMoreElements()) {
Geometry geometry = (Geometry) enumeration.nextElement();
if (!geometry.isLive()
&& geometry instanceof GeometryArray) {
geometry.setCapability(GeometryArray.ALLOW_FORMAT_READ);
geometry.setCapability(GeometryArray.ALLOW_COUNT_READ);
geometry.setCapability(GeometryArray.ALLOW_COORDINATE_READ);
geometry.setCapability(GeometryArray.ALLOW_NORMAL_READ);
geometry.setCapability(GeometryArray.ALLOW_TEXCOORD_READ);
geometry.setCapability(GeometryArray.ALLOW_REF_DATA_READ);
}
}
}
}