public ExtrudedPolygonGraphics3DInstruction addExtrudedPolygon(List<Point2D> polygonPoints, double height, AppearanceDefinition appearance) { ExtrudedPolygonGraphics3DInstruction graphicsInstruction = new ExtrudedPolygonGraphics3DInstruction(polygonPoints, height); graphicsInstruction.setAppearance(appearance); graphics3DInstructions.add(graphicsInstruction); return graphicsInstruction; }
public ExtrudedPolygonGraphics3DInstruction addExtrudedPolygon(List<Point2d> polygonPoints, double height, AppearanceDefinition appearance) { ExtrudedPolygonGraphics3DInstruction graphicsInstruction = new ExtrudedPolygonGraphics3DInstruction(polygonPoints, height); graphicsInstruction.setAppearance(appearance); graphics3DInstructions.add(graphicsInstruction); return graphicsInstruction; }
public ExtrudedPolygonGraphics3DInstruction addExtrudedPolygon(ConvexPolygon2d convexPolygon2d, double height, AppearanceDefinition appearance) { ArrayList<Point2d> polygonPoints = new ArrayList<Point2d>(); for (int i = 0; i < convexPolygon2d.getNumberOfVertices(); i++) { polygonPoints.add(convexPolygon2d.getVertex(i)); } ExtrudedPolygonGraphics3DInstruction extrudedPolygonInstruction = new ExtrudedPolygonGraphics3DInstruction(polygonPoints, height); extrudedPolygonInstruction.setAppearance(appearance); graphics3DInstructions.add(extrudedPolygonInstruction); return extrudedPolygonInstruction; }
public ExtrudedPolygonGraphics3DInstruction addExtrudedPolygon(ConvexPolygon2D convexPolygon2d, double height, AppearanceDefinition appearance) { ArrayList<Point2DReadOnly> polygonPoints = new ArrayList<>(); for (int i = 0; i < convexPolygon2d.getNumberOfVertices(); i++) { polygonPoints.add(convexPolygon2d.getVertex(i)); } ExtrudedPolygonGraphics3DInstruction extrudedPolygonInstruction = new ExtrudedPolygonGraphics3DInstruction(polygonPoints, height); extrudedPolygonInstruction.setAppearance(appearance); graphics3DInstructions.add(extrudedPolygonInstruction); return extrudedPolygonInstruction; }