/** * Creates a polygon centered at the current coordinate system with the given vertices. * The points this shape is composed of must be coplanar and the order matters. Randomly * inserting points will produce unpredictable results, clockwise direction determines the * side that is drawn. * * @param polygonPoints ArrayList containing the points. * @param yoAppearance Appearance to be used with the new polygon. See {@link YoAppearance YoAppearance} for implementations. */ public PolygonGraphics3DInstruction addPolygon(ArrayList<Point3d> polygonPoints, AppearanceDefinition yoAppearance) { PolygonGraphics3DInstruction graphicsInstruction = new PolygonGraphics3DInstruction(polygonPoints); graphicsInstruction.setAppearance(yoAppearance); return graphicsInstruction; }
MeshDataHolder meshData = MeshDataGenerator.Polygon(polygonInstruction.getPolygonPoints()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, polygonInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
MeshDataHolder meshData = MeshDataGenerator.Polygon(polygonInstruction.getPolygonPoints()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, polygonInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
MeshDataHolder meshData = MeshDataGenerator.Polygon(polygonInstruction.getPolygonPoints()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, polygonInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
/** * Creates a polygon centered at the current coordinate system with the given vertices. * The points this shape is composed of must be coplanar and the order matters. Randomly * inserting points will produce unpredictable results, clockwise direction determines the * side that is drawn. * * @param polygonPoints ArrayList containing the points. * @param yoAppearance Appearance to be used with the new polygon. See {@link YoAppearance YoAppearance} for implementations. */ public PolygonGraphics3DInstruction addPolygon(ArrayList<Point3D> polygonPoints, AppearanceDefinition yoAppearance) { PolygonGraphics3DInstruction graphicsInstruction = new PolygonGraphics3DInstruction(polygonPoints); graphicsInstruction.setAppearance(yoAppearance); return graphicsInstruction; }