/** * Adds a soild cylinder with the given radius, height and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a maroon cylinder with radius of 0.3 and a height of 0.1 as described by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addCylinder(0.1, 0.3, YoAppearance.Maroon());}<br /><br /> * * As is show by the graphical representation the cylinder is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addCylinder2.jpg"> * * @param height cylinder height in meters. * @param radius cylinder radius in meters. * @param cylApp Appearance to be used with the new cylinder. See {@link YoAppearance YoAppearance} for implementations. */ public CylinderGraphics3DInstruction addCylinder(double height, double radius, AppearanceDefinition cylApp) { CylinderGraphics3DInstruction cylinderInstruction = new CylinderGraphics3DInstruction(radius, height, RESOLUTION); cylinderInstruction.setAppearance(cylApp); graphics3DInstructions.add(cylinderInstruction); return cylinderInstruction; }
/** * Adds a soild cylinder with the given radius, height and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a maroon cylinder with radius of 0.3 and a height of 0.1 as described by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addCylinder(0.1, 0.3, YoAppearance.Maroon());}<br /><br /> * * As is show by the graphical representation the cylinder is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addCylinder2.jpg"> * * @param height cylinder height in meters. * @param radius cylinder radius in meters. * @param cylApp Appearance to be used with the new cylinder. See {@link YoAppearance YoAppearance} for implementations. */ public CylinderGraphics3DInstruction addCylinder(double height, double radius, AppearanceDefinition cylApp) { CylinderGraphics3DInstruction cylinderInstruction = new CylinderGraphics3DInstruction(radius, height, RESOLUTION); cylinderInstruction.setAppearance(cylApp); graphics3DInstructions.add(cylinderInstruction); return cylinderInstruction; }