/** * Creates a pyramid cube with the specified appearance centered on the origin of the current coordinate system. * A pyramid cube is nothing more than a standard cube of the given length, width and height with a square base * pyramid of the specified height on the top and bottom. * </ br></ br> * The image below demonstrates a alluminum pyramid cube beginning with dimensions of 0.4 by 0.2 by 0.1 and a pyramid height of 0.3:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addPyramidCube(0.2, 0.2, 0.2, 0.2);}<br /><br /> * * As is show by the graphical representation the pyramid cube is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addPyramidCube2.jpg"> * * @param lx Length in meters of the cube. (x direction) * @param ly Width in meters of the cube. (y direction)O * @param lz Height of the cube in meters. (z direction) * @param lh Height of the pyramids in meters. * @param cubeApp Appearance to be used with the new pyramid cube. See {@link YoAppearance YoAppearance} for implementations. */ public PyramidCubeGraphics3DInstruction addPyramidCube(double lx, double ly, double lz, double lh, AppearanceDefinition cubeApp) { PyramidCubeGraphics3DInstruction pyradmidCubeInstruction = new PyramidCubeGraphics3DInstruction(lx, ly, lz, lh); pyradmidCubeInstruction.setAppearance(cubeApp); graphics3DInstructions.add(pyradmidCubeInstruction); return pyradmidCubeInstruction; }
/** * Creates a pyramid cube with the specified appearance centered on the origin of the current coordinate system. * A pyramid cube is nothing more than a standard cube of the given length, width and height with a square base * pyramid of the specified height on the top and bottom. * </ br></ br> * The image below demonstrates a alluminum pyramid cube beginning with dimensions of 0.4 by 0.2 by 0.1 and a pyramid height of 0.3:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addPyramidCube(0.2, 0.2, 0.2, 0.2);}<br /><br /> * * As is show by the graphical representation the pyramid cube is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addPyramidCube2.jpg"> * * @param lx Length in meters of the cube. (x direction) * @param ly Width in meters of the cube. (y direction)O * @param lz Height of the cube in meters. (z direction) * @param lh Height of the pyramids in meters. * @param cubeApp Appearance to be used with the new pyramid cube. See {@link YoAppearance YoAppearance} for implementations. */ public PyramidCubeGraphics3DInstruction addPyramidCube(double lx, double ly, double lz, double lh, AppearanceDefinition cubeApp) { PyramidCubeGraphics3DInstruction pyradmidCubeInstruction = new PyramidCubeGraphics3DInstruction(lx, ly, lz, lh); pyradmidCubeInstruction.setAppearance(cubeApp); graphics3DInstructions.add(pyradmidCubeInstruction); return pyradmidCubeInstruction; }