/** * Adds a cone with the given height, radius and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a dark green cone with radius of 0.4 and a height of 0.2 as described by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addCone(0.2, 0.4, YoAppearance.DarkGreen());}<br /><br /> * * As is show by the graphical representation the cone is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addCone2.jpg"> * * @param height cone height in meters. * @param radius cone radius in meters. * @param coneApp Appearance to be used with the new cone. See {@link YoAppearance YoAppearance} for implementations. */ public ConeGraphics3DInstruction addCone(double height, double radius, AppearanceDefinition coneApp) { ConeGraphics3DInstruction coneInstruction = new ConeGraphics3DInstruction(height, radius, RESOLUTION); coneInstruction.setAppearance(coneApp); graphics3DInstructions.add(coneInstruction); return coneInstruction; }
MeshDataHolder meshData = MeshDataGenerator.Cone(coneInstruction.getHeight(), coneInstruction.getRadius(), coneInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, coneInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
MeshDataHolder meshData = MeshDataGenerator.Cone(coneInstruction.getHeight(), coneInstruction.getRadius(), coneInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, coneInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
MeshDataHolder meshData = MeshDataGenerator.Cone(coneInstruction.getHeight(), coneInstruction.getRadius(), coneInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, coneInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
/** * Adds a cone with the given height, radius and appearance centered on the origin of the current coordinate system. * </ br></ br> * The image below demonstrates a dark green cone with radius of 0.4 and a height of 0.2 as described by the following code:<br /><br /> * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addCone(0.2, 0.4, YoAppearance.DarkGreen());}<br /><br /> * * As is show by the graphical representation the cone is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addCone2.jpg"> * * @param height cone height in meters. * @param radius cone radius in meters. * @param coneApp Appearance to be used with the new cone. See {@link YoAppearance YoAppearance} for implementations. */ public ConeGraphics3DInstruction addCone(double height, double radius, AppearanceDefinition coneApp) { ConeGraphics3DInstruction coneInstruction = new ConeGraphics3DInstruction(height, radius, RESOLUTION); coneInstruction.setAppearance(coneApp); graphics3DInstructions.add(coneInstruction); return coneInstruction; }