/** * * Adds a solid wedge with the given dimensions and appearance centered on the origin of the current * coordinate system. The peak of the wedge is directly above the far edge of the cube * in the x direction.</ br></ br> * The image below demonstrates a green 0.35 x 0.3 x 0.1 wedge generated by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addWedge(0.35, 0.3, 0.1, YoAppearance.GREEN());}<br /><br /> * * As is show by the graphical representation the wedge is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addWedge2.jpg"> * * @param lengthX length of the wedge in the x direction. * @param widthY width of the wedge in the y direction. * @param heightZ height of the wedge in the z direction. * @param wedgeAppearance Appearance of the wedge. See {@link YoAppearance YoAppearance} for implementations. */ public WedgeGraphics3DInstruction addWedge(double lengthX, double widthY, double heightZ, AppearanceDefinition wedgeAppearance) { WedgeGraphics3DInstruction wedgeGraphics3DInstruction = new WedgeGraphics3DInstruction(lengthX, widthY, heightZ); wedgeGraphics3DInstruction.setAppearance(wedgeAppearance); graphics3DInstructions.add(wedgeGraphics3DInstruction); return wedgeGraphics3DInstruction; }
/** * * Adds a solid wedge with the given dimensions and appearance centered on the origin of the current * coordinate system. The peak of the wedge is directly above the far edge of the cube * in the x direction.</ br></ br> * The image below demonstrates a green 0.35 x 0.3 x 0.1 wedge generated by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addWedge(0.35, 0.3, 0.1, YoAppearance.GREEN());}<br /><br /> * * As is show by the graphical representation the wedge is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addWedge2.jpg"> * * @param lengthX length of the wedge in the x direction. * @param widthY width of the wedge in the y direction. * @param heightZ height of the wedge in the z direction. * @param wedgeAppearance Appearance of the wedge. See {@link YoAppearance YoAppearance} for implementations. */ public WedgeGraphics3DInstruction addWedge(double lengthX, double widthY, double heightZ, AppearanceDefinition wedgeAppearance) { WedgeGraphics3DInstruction wedgeGraphics3DInstruction = new WedgeGraphics3DInstruction(lengthX, widthY, heightZ); wedgeGraphics3DInstruction.setAppearance(wedgeAppearance); graphics3DInstructions.add(wedgeGraphics3DInstruction); return wedgeGraphics3DInstruction; }