当前位置: 首页>>代码示例>>Java>>正文


Java ViewPositionMode类代码示例

本文整理汇总了Java中org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode的典型用法代码示例。如果您正苦于以下问题:Java ViewPositionMode类的具体用法?Java ViewPositionMode怎么用?Java ViewPositionMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ViewPositionMode类属于org.jzy3d.plot3d.rendering.view.modes包,在下文中一共展示了ViewPositionMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ElementDataViewConfiguration

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
/**
 * Constructs a new {@code ElementDataViewConfiguration}.
 * 
 * @param elementIndex the index of the {@code ElementDatæ} that is being
 * actually displayed.
 * @param is3DEnabled {@code true} if 3D view mode is enabled.
 * @param scale the scaling value.
 * @param viewPoint the {@code Coord2d} that indicates the view point.
 * @param viewPositionMode2D the {@code ViewPositionMode} used in the 2D 
 * view mode.
 * @param interpolationLevel the {@code InterpolationLevel} used.
 * @param colorMap the {@code ColorMap} used.
 * @param rangeMode the {@code ColorMapRangeMode} used.
 * @param colorMapRange the range of the color map.
 * @param showColorBarLegend {@code true} is color bar legend is displayed.
 * @param showAxes {@code true} is axes are displayed.
 * @param showTickLines {@code true} is tick lines are displayed.
 */
public ElementDataViewConfiguration(int elementIndex, boolean is3DEnabled,
	Number scale, Coord2d viewPoint, ViewPositionMode viewPositionMode2D,
	InterpolationLevel interpolationLevel, ColorMap colorMap,
	ColorMapRangeMode rangeMode, Range colorMapRange, 
	boolean showColorBarLegend,	boolean showAxes, boolean showTickLines
) {
	this.elementIndex = elementIndex;
	this.is3DEnabled = is3DEnabled;
	this.scale = scale;
	this.viewPoint = viewPoint;
	this.viewPositionMode2D = viewPositionMode2D;
	this.interpolationLevel = interpolationLevel;
	this.colorMap = colorMap;
	this.rangeMode = rangeMode;
	this.colorMapRange = new SerializableRange(colorMapRange);
	this.showColorBarLegend = showColorBarLegend;
	this.showAxes = showAxes;
	this.showTickLines = showTickLines;
}
 
开发者ID:sing-group,项目名称:la-images,代码行数:38,代码来源:ElementDataViewConfiguration.java

示例2: saveScatterChartScreenshotTopView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveScatterChartScreenshotTopView() {
	Plotter plotter = new Plotter(logger);
	Random r = new Random();
	r.setSeed(0);
	int size = 1000;
	List<Coord3d> coordinates = new ArrayList<Coord3d>();
	for (int i = 0; i < size; i++) {
		float x = r.nextFloat() - 0.5f;
		float y = r.nextFloat() - 0.5f;
		float z = r.nextFloat() - 0.5f;
		Coord3d coord = new Coord3d(x, y, z);
		coordinates.add(coord);
	}
	plotter.saveScatter3DChart(outputFile, axisLabels, coordinates, 2, ViewPositionMode.TOP,
			null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:20,代码来源:PlotterTest.java

示例3: saveScatterChartScreenshotProfileView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveScatterChartScreenshotProfileView() {
	Plotter plotter = new Plotter(logger);
	Random r = new Random();
	r.setSeed(0);
	int size = 1000;
	List<Coord3d> coordinates = new ArrayList<Coord3d>();
	for (int i = 0; i < size; i++) {
		float x = r.nextFloat() - 0.5f;
		float y = r.nextFloat() - 0.5f;
		float z = r.nextFloat() - 0.5f;
		Coord3d coord = new Coord3d(x, y, z);
		coordinates.add(coord);
	}
	plotter.saveScatter3DChart(outputFile, axisLabels, coordinates, 2,
			ViewPositionMode.PROFILE, null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:20,代码来源:PlotterTest.java

示例4: saveScatterChartScreenshotFreeExplicitView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveScatterChartScreenshotFreeExplicitView() {
	Plotter plotter = new Plotter(logger);
	Random r = new Random();
	r.setSeed(0);
	int size = 1000;
	List<Coord3d> coordinates = new ArrayList<Coord3d>();
	for (int i = 0; i < size; i++) {
		float x = r.nextFloat() - 0.5f;
		float y = r.nextFloat() - 0.5f;
		float z = r.nextFloat() - 0.5f;
		Coord3d coord = new Coord3d(x, y, z);
		coordinates.add(coord);
	}
	plotter.saveScatter3DChart(outputFile, axisLabels, coordinates, 2, ViewPositionMode.FREE,
			null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:20,代码来源:PlotterTest.java

示例5: saveCylinderChartScreenshotFreeExplicitView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveCylinderChartScreenshotFreeExplicitView() {
	Plotter plotter = new Plotter(logger);
	Random r = new Random();
	r.setSeed(0);
	int size = 1000;
	List<Cylinder> cylinders = new ArrayList<Cylinder>();
	for (int i = 0; i < size; i++) {
		float x = r.nextFloat() - 0.5f;
		float y = r.nextFloat() - 0.5f;
		float z = r.nextFloat() - 0.5f;
		Coord3d baseCenter = new Coord3d(x, y, z);
		float height = r.nextFloat() - 0.5f;
		cylinders.add(plotter.getCylinder(baseCenter, height, 0.1f));
	}
	plotter.saveCylinder3DChart(outputFile, axisLabels, cylinders, ViewPositionMode.FREE, null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:20,代码来源:PlotterTest.java

示例6: exportShape

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
/**
 * Exports a chart to a image file.
 * 
 * @param surface surface of the chart to export.
 * @param is3D whether the surface is 3D or not.
 * @param quality quality of the chart.
 * @param width width of the image generated.
 * @param height height of the image generated.
 * @param chartConfigurer function to configure the chart before exporting
 * it to a file. This function is called after the chart is created and
 * configured as a 2D chart and before the chart is exported to an image
 * file.
 * @param imageFile file where the image will be stored. The extension of
 * this file will determine the format of the image generated.
 * @throws IOException if an error happens while exporting the chart.
 */
public static void exportShape(
	Shape surface, boolean is3D, Quality quality,
	int width, int height,
	Consumer<Chart> chartConfigurer,
	File imageFile
) throws IOException {
	final Chart chart = 
		new Chart(getChartComponentFactory(is3D, width, height), quality);
	chart.getScene().getGraph().add(surface);

       final IAxeLayout axe = chart.getAxeLayout();
       axe.setZAxeLabelDisplayed(true);
       
       final View view = chart.getView();
       view.setViewPositionMode(ViewPositionMode.TOP);
       view.setSquared(true);
       view.getCamera().setViewportMode(ViewportMode.STRETCH_TO_FILL);

       adjustFontSize(view, width, height);

       chartConfigurer.accept(chart);

       chart.screenshot(imageFile);
       
       ImageIO.write(ImageIO.read(imageFile), "png", imageFile);
}
 
开发者ID:sing-group,项目名称:la-images,代码行数:43,代码来源:ShapeExporter.java

示例7: layout2d

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
/**
 * Apply layout suitable for 2d charts (disable Z axis display, enable top view, etc)
 */
public void layout2d() {
    View view = chart.getView();
    view.setViewPositionMode(ViewPositionMode.TOP);
    view.getCamera().setViewportMode(ViewportMode.STRETCH_TO_FILL);

    IAxeLayout axe = chart.getAxeLayout();
    axe.setZAxeLabelDisplayed(false);
    axe.setTickLineDisplayed(false);
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:13,代码来源:SparkRDDChartBuilder.java

示例8: layout2d

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
public static void layout2d(Chart chart) {
    View view = chart.getView();
    view.setViewPositionMode(ViewPositionMode.TOP);
    view.getCamera().setViewportMode(ViewportMode.STRETCH_TO_FILL);
    IAxeLayout axe = chart.getAxeLayout();
    axe.setZAxeLabelDisplayed(false);
    axe.setTickLineDisplayed(false);
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:9,代码来源:BigPicture.java

示例9: saveDelaunayChartScreenshotTopView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveDelaunayChartScreenshotTopView() {
	Plotter plotter = new Plotter(logger);
	plotter.saveDelaunaySurface3DChart(outputFile, axisLabels, coordinates,
			ViewPositionMode.TOP, null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:9,代码来源:PlotterTest.java

示例10: saveDelaunayChartScreenshotProfileView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveDelaunayChartScreenshotProfileView() {
	Plotter plotter = new Plotter(logger);
	plotter.saveDelaunaySurface3DChart(outputFile, axisLabels, coordinates,
			ViewPositionMode.PROFILE, null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:9,代码来源:PlotterTest.java

示例11: saveDelaunayChartScreenshotFreeExplicitView

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
@Test
public void saveDelaunayChartScreenshotFreeExplicitView() {
	Plotter plotter = new Plotter(logger);
	plotter.saveDelaunaySurface3DChart(outputFile, axisLabels, coordinates,
			ViewPositionMode.FREE, null);
	File f = new File(outputFile);
	Assert.assertTrue(f.exists());
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:9,代码来源:PlotterTest.java

示例12: getCurrent2DPositionMode

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
private ViewPositionMode getCurrent2DPositionMode() {
	return this.configuration.getViewPositionMode2D();
}
 
开发者ID:sing-group,项目名称:la-images,代码行数:4,代码来源:ElementDataView.java

示例13: getViewPositionMode2D

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
public ViewPositionMode getViewPositionMode2D() {
	return viewPositionMode2D;
}
 
开发者ID:sing-group,项目名称:la-images,代码行数:4,代码来源:ElementDataViewConfiguration.java

示例14: setViewPositionMode2D

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
public void setViewPositionMode2D(ViewPositionMode viewPositionMode2D) {
	this.viewPositionMode2D = viewPositionMode2D;
}
 
开发者ID:sing-group,项目名称:la-images,代码行数:4,代码来源:ElementDataViewConfiguration.java

示例15: getChartFromSRTMData

import org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode; //导入依赖的package包/类
private AWTChart getChartFromSRTMData(final JavaFXChartFactory factory, final String toolkit, final SRTMData srtmData) {
    // -------------------------------
    // Define a function to plot
    final Mapper mapper = new Mapper() {
        @Override
        public double f(double x, double y) {
            final float height = Math.max(0f, srtmData.getValues()[(int) x][(int) y]);
            return height;
        }
    };

    // we don't want to plot the full set, only 1/10 of it
    final int dataCount = srtmData.getKey().getValue().getDataCount();
    final int steps = dataCount / 10;
    
    // Define range and precision for the function to plot
    final Range lonrange = new Range(0f, 1f*(dataCount-1));
    final Range latrange = new Range(1f*(dataCount-1), 0f);
    final OrthonormalGrid grid = new OrthonormalGrid(lonrange, steps, latrange, steps);

    // Create the object to represent the function over the given range.
    final Shape surface = Builder.buildOrthonormal(grid, mapper);
    surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(), surface.getBounds().getZmax(), new Color(1, 1, 1, .5f)));
    surface.setFaceDisplayed(true);
    surface.setWireframeDisplayed(false);

    // -------------------------------
    // Create a chart
    Quality quality = Quality.Nicest;
    quality.setSmoothPolygon(true);
    //quality.setAnimated(true);
    
    // let factory bind mouse and keyboard controllers to JavaFX node
    final AWTChart chart = (AWTChart) factory.newChart(quality, toolkit);
    chart.getScene().getGraph().add(surface);
    
    // and now for some beautifying
    final String name = srtmData.getKey().getKey();
    final String lat = name.substring(0, 3);
    final String lon = name.substring(3, 7);
    chart.getAxeLayout().setXAxeLabel( lat );
    chart.getAxeLayout().setYAxeLabel( lon );
    chart.getAxeLayout().setZAxeLabel( "m" );
    
    chart.setViewMode(ViewPositionMode.FREE);
    chart.setViewPoint(new Coord3d(0.05f, 1.1f, 4000f));
    return chart;
}
 
开发者ID:ThomasDaheim,项目名称:GPXEditor,代码行数:49,代码来源:SRTMDataViewer.java


注:本文中的org.jzy3d.plot3d.rendering.view.modes.ViewPositionMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。