/** * Adds a truncated cone with the given height, base width x, base width y, top width x, * top width y, and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a navy blue truncated cone with a height of 0.25, a x * base width of 0.15, a y base width of 0.15, a x top width of 0.05, and a y top width * of 0.1:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addGenTruncatedCone(0.25, 0.15, 0.15, 0.05, 0.1, YoAppearance.Navy());}<br /><br /> * * As is show by the graphical representation the truncated cone is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addGenTruncatedCone2.jpg"> * * @param height in meters * @param bx x direction width of the base in meters * @param by y direction width of the base in meters * @param tx x direction width of the top in meters * @param ty y direction width of the top in meters * @param coneApp Appearance to be used with the new truncated cone. See {@link YoAppearance YoAppearance} for implementations. */ public TruncatedConeGraphics3DInstruction addGenTruncatedCone(double height, double bx, double by, double tx, double ty, AppearanceDefinition coneApp) { TruncatedConeGraphics3DInstruction truncatedConeInstruction = new TruncatedConeGraphics3DInstruction(height, bx, by, tx, ty, RESOLUTION); truncatedConeInstruction.setAppearance(coneApp); graphics3DInstructions.add(truncatedConeInstruction); return truncatedConeInstruction; }
/** * Adds a truncated cone with the given height, base width x, base width y, top width x, * top width y, and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a navy blue truncated cone with a height of 0.25, a x * base width of 0.15, a y base width of 0.15, a x top width of 0.05, and a y top width * of 0.1:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addGenTruncatedCone(0.25, 0.15, 0.15, 0.05, 0.1, YoAppearance.Navy());}<br /><br /> * * As is show by the graphical representation the truncated cone is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addGenTruncatedCone2.jpg"> * * @param height in meters * @param bx x direction width of the base in meters * @param by y direction width of the base in meters * @param tx x direction width of the top in meters * @param ty y direction width of the top in meters * @param coneApp Appearance to be used with the new truncated cone. See {@link YoAppearance YoAppearance} for implementations. */ public TruncatedConeGraphics3DInstruction addGenTruncatedCone(double height, double bx, double by, double tx, double ty, AppearanceDefinition coneApp) { TruncatedConeGraphics3DInstruction truncatedConeInstruction = new TruncatedConeGraphics3DInstruction(height, bx, by, tx, ty, RESOLUTION); truncatedConeInstruction.setAppearance(coneApp); graphics3DInstructions.add(truncatedConeInstruction); return truncatedConeInstruction; }