/** * Adds a hemi ellipsoid with the given appearance and x, y and z radii centered on the current coordinate system. Hemi ellipsoids * are essentially cut in half, in this case the missing half is below the xy plane. * </ br></ br> * The image below demonstrates a dark red hemi ellipsoid with x, y and z radii of 0.15, 0.2 and 0.4 respectively:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addHemiEllipsoid(0.15, 0.2, 0.4, YoAppearance.DarkRed());}<br /><br /> * * As is show by the graphical representation the hemi ellipsoid is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addHemiEllipsoid2.jpg"> * * @param xRad radius of the ellipsoid in the x direction. * @param yRad radius of the ellipsoid in the y direction. * @param zRad radius of the ellipsoid in the z direction. * @param hEApp Appearance to be used with the new hemi ellipsoid. See {@link YoAppearance YoAppearance} for implementations. */ public HemiEllipsoidGraphics3DInstruction addHemiEllipsoid(double xRad, double yRad, double zRad, AppearanceDefinition hEApp) { HemiEllipsoidGraphics3DInstruction hemiEllipsoidInstruction = new HemiEllipsoidGraphics3DInstruction(xRad, yRad, zRad, RESOLUTION); hemiEllipsoidInstruction.setAppearance(hEApp); graphics3DInstructions.add(hemiEllipsoidInstruction); return hemiEllipsoidInstruction; }
.HemiEllipsoid(hemiEllipsoidInstruction.getXRadius(), hemiEllipsoidInstruction.getYRadius(), hemiEllipsoidInstruction.getZRadius(), hemiEllipsoidInstruction.getResolution(), hemiEllipsoidInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, hemiEllipsoidInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
.HemiEllipsoid(hemiEllipsoidInstruction.getXRadius(), hemiEllipsoidInstruction.getYRadius(), hemiEllipsoidInstruction.getZRadius(), hemiEllipsoidInstruction.getResolution(), hemiEllipsoidInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, hemiEllipsoidInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
MeshDataHolder meshData = MeshDataGenerator.HemiEllipsoid(hemiEllipsoidInstruction.getXRadius(), hemiEllipsoidInstruction.getYRadius(), hemiEllipsoidInstruction.getZRadius(), hemiEllipsoidInstruction.getResolution(), hemiEllipsoidInstruction.getResolution()); Graphics3DAddMeshDataInstruction meshDataInstruction = Graphics3DObject.createMeshDataInstruction(meshData, hemiEllipsoidInstruction.getAppearance()); doAddMeshDataInstruction(meshDataInstruction);
/** * Adds a hemi ellipsoid with the given appearance and x, y and z radii centered on the current coordinate system. Hemi ellipsoids * are essentially cut in half, in this case the missing half is below the xy plane. * </ br></ br> * The image below demonstrates a dark red hemi ellipsoid with x, y and z radii of 0.15, 0.2 and 0.4 respectively:<br /><br /> * * {@code linkGraphics.addCoordinateSystem(0.5);}<br /> * {@code linkGraphics.addHemiEllipsoid(0.15, 0.2, 0.4, YoAppearance.DarkRed());}<br /><br /> * * As is show by the graphical representation the hemi ellipsoid is centered on the coordinate system. * Again, x, y and z are red, white and blue. * <br /><br /><img src="doc-files/LinkGraphics.addHemiEllipsoid2.jpg"> * * @param xRad radius of the ellipsoid in the x direction. * @param yRad radius of the ellipsoid in the y direction. * @param zRad radius of the ellipsoid in the z direction. * @param hEApp Appearance to be used with the new hemi ellipsoid. See {@link YoAppearance YoAppearance} for implementations. */ public HemiEllipsoidGraphics3DInstruction addHemiEllipsoid(double xRad, double yRad, double zRad, AppearanceDefinition hEApp) { HemiEllipsoidGraphics3DInstruction hemiEllipsoidInstruction = new HemiEllipsoidGraphics3DInstruction(xRad, yRad, zRad, RESOLUTION); hemiEllipsoidInstruction.setAppearance(hEApp); graphics3DInstructions.add(hemiEllipsoidInstruction); return hemiEllipsoidInstruction; }