use of org.cesiumjs.cs.core.options.PolylinePipelineOptions in project gwt-cs by iSergio.
the class Materials method createPrimitives.
public void createPrimitives(Scene scene) {
PrimitiveOptions primitiveOptions = new PrimitiveOptions();
GeometryInstanceOptions geometryInstanceOptions = new GeometryInstanceOptions();
RectangleGeometryOptions rectangleGeometryOptions = new RectangleGeometryOptions();
rectangleGeometryOptions.rectangle = Rectangle.fromDegrees(-120.0, 20.0, -60.0, 40.0);
rectangleGeometryOptions.vertexFormat = EllipsoidSurfaceAppearance.VERTEX_FORMAT();
geometryInstanceOptions.geometry = RectangleGeometry.createGeometry(new RectangleGeometry(rectangleGeometryOptions));
primitiveOptions.geometryInstances = new GeometryInstance[] { new GeometryInstance(geometryInstanceOptions) };
EllipsoidSurfaceAppearanceOptions ellipsoidSurfaceAppearanceOptions = new EllipsoidSurfaceAppearanceOptions();
ellipsoidSurfaceAppearanceOptions.aboveGround = false;
primitiveOptions.asynchronous = false;
primitiveOptions.appearance = new EllipsoidSurfaceAppearance(ellipsoidSurfaceAppearanceOptions);
rectangle = (Primitive) scene.primitives().add(new Primitive(primitiveOptions));
primitiveOptions = new PrimitiveOptions();
geometryInstanceOptions = new GeometryInstanceOptions();
rectangleGeometryOptions = new RectangleGeometryOptions();
rectangleGeometryOptions.rectangle = Rectangle.fromDegrees(-180.0, -90.0, 180.0, 90.0);
rectangleGeometryOptions.vertexFormat = EllipsoidSurfaceAppearance.VERTEX_FORMAT();
geometryInstanceOptions.geometry = RectangleGeometry.createGeometry(new RectangleGeometry(rectangleGeometryOptions));
primitiveOptions.geometryInstances = new GeometryInstance[] { new GeometryInstance(geometryInstanceOptions) };
ellipsoidSurfaceAppearanceOptions = new EllipsoidSurfaceAppearanceOptions();
ellipsoidSurfaceAppearanceOptions.aboveGround = false;
primitiveOptions.appearance = new EllipsoidSurfaceAppearance(ellipsoidSurfaceAppearanceOptions);
primitiveOptions.show = false;
primitiveOptions.asynchronous = false;
worldRectangle = (Primitive) scene.primitives().add(new Primitive(primitiveOptions));
PolylineCollection polylines = (PolylineCollection) scene.primitives().add(new PolylineCollection());
PolylineOptions polylineOptions = new PolylineOptions();
PolylinePipelineOptions polylinePipelineOptions = new PolylinePipelineOptions();
polylinePipelineOptions.positions = Cartesian3.fromDegreesArray(new double[] { -110.0, 42.0, -85.0, 36.0, -100.0, 25.0, -77.0, 12.0 });
polylineOptions.positions = PolylinePipeline.generateCartesianArc(polylinePipelineOptions);
polylineOptions.width = 10.0;
polylineOptions.show = false;
polyline = polylines.add(polylineOptions);
}
Aggregations