/** * This function changes the polygon given, such that it has the desired number of vertices. It * is conservative in the sense, that the modified polygon will be contained in the original * polygon completely. * * @param polygon: modified to have the desired number of vertices * @param desiredVertices: number of vertices that the polygon should have */ public static void limitVerticesConservative(FixedFrameConvexPolygon2DBasics polygon, int desiredVertices) { limitVerticesConservative((ConvexPolygon2DBasics) polygon, desiredVertices); }
/** * This function changes the polygon given, such that it has the desired number of vertices. It is conservative in * the sense, that the modified polygon will be contained in the original polygon completely. * * @param polygon: modified to have the desired number of vertices * @param desiredVertices: number of vertices that the polygon should have */ public static void limitVerticesConservative(FrameConvexPolygon2d polygon, int desiredVertices) { limitVerticesConservative(polygon.getConvexPolygon2d(), desiredVertices); }
ConvexPolygonTools.limitVerticesConservative(polygon, desiredNumberOfVertices);
ConvexPolygonTools.limitVerticesConservative(foothold, 4);
ConvexPolygonTools.limitVerticesConservative(foothold, 4);
ConvexPolygonTools.limitVerticesConservative(foothold, 4);
ConvexPolygonTools.limitVerticesConservative(partialFootholdPolygon, 4);
ConvexPolygonTools.limitVerticesConservative(foothold, 4);
ConvexPolygonTools.limitVerticesConservative(partialFootholdPolygon, 4);
ConvexPolygonTools.limitVerticesConservative(controllerFootPolygon, footCornerPoints); controllerFootPolygonInWorld.setIncludingFrameAndUpdate(controllerFootPolygon); controllerFootPolygonInWorld.changeFrameAndProjectToXYPlane(worldFrame);
ConvexPolygonTools.limitVerticesConservative(partialFootholdPolygon, 4);
ConvexPolygonTools.limitVerticesConservative(partialFootholdPolygon, 4);
ConvexPolygonTools.limitVerticesConservative(foothold, 4); YoFrameConvexPolygon2D yoFoothold = new YoFrameConvexPolygon2D("Foothold" + i, worldFrame, 4, vizRegistry); yoFoothold.set(foothold);