Search in sources :

Example 1 with CameraFlyToOptions

use of org.cesiumjs.cs.scene.options.CameraFlyToOptions in project gwt-cs by iSergio.

the class Camera method flyToHeadingPitchRoll.

private void flyToHeadingPitchRoll() {
    CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
    cameraFlyToOptions.destinationPos = Cartesian3.fromDegrees(-122.22, 46.12, 5000.0);
    cameraFlyToOptions.orientation = new org.cesiumjs.cs.core.HeadingPitchRoll(Math.toRadians(20.0), Math.toRadians(-35.0), 0.0);
    csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
}
Also used : org.cesiumjs.cs.core(org.cesiumjs.cs.core) CameraFlyToOptions(org.cesiumjs.cs.scene.options.CameraFlyToOptions)

Example 2 with CameraFlyToOptions

use of org.cesiumjs.cs.scene.options.CameraFlyToOptions in project gwt-cs by iSergio.

the class Camera method flyInACity.

private void flyInACity() {
    final CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
    cameraFlyToOptions.destinationPos = Cartesian3.fromDegrees(-73.98580932617188, 40.74843406689482, 363.34038727246224);
    cameraFlyToOptions.complete = new org.cesiumjs.cs.scene.Camera.FlightCompleteCallback() {

        @Override
        public void on() {
            Utils.setTimeout(new Utils.TimeoutListener() {

                @Override
                public void function() {
                    CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
                    cameraFlyToOptions.destinationPos = Cartesian3.fromDegrees(-73.98585975679403, 40.75759944127251, 186.50838555841779);
                    cameraFlyToOptions.orientation = new org.cesiumjs.cs.core.HeadingPitchRoll(Math.toRadians(200.0), Math.toRadians(-50.0));
                    cameraFlyToOptions.easingFunction = EasingFunction.LINEAR_NONE();
                    csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
                }
            }, 1000);
        }
    };
    csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
}
Also used : RectangleGraphics(org.cesiumjs.cs.datasources.graphics.RectangleGraphics) org.cesiumjs.cs.core(org.cesiumjs.cs.core) CameraFlyToOptions(org.cesiumjs.cs.scene.options.CameraFlyToOptions)

Example 3 with CameraFlyToOptions

use of org.cesiumjs.cs.scene.options.CameraFlyToOptions in project gwt-cs by iSergio.

the class Camera method flyToRectangle.

private void flyToRectangle() {
    double west = -90.0;
    double south = 38.0;
    double east = -87.0;
    double north = 40.0;
    Rectangle rectangle = Rectangle.fromDegrees(west, south, east, north);
    CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
    cameraFlyToOptions.destinationRec = rectangle;
    csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
    RectangleGraphicsOptions rectangleGraphicsOptions = new RectangleGraphicsOptions();
    rectangleGraphicsOptions.coordinates = new ConstantProperty<>(rectangle);
    rectangleGraphicsOptions.fill = new ConstantProperty<>(false);
    rectangleGraphicsOptions.outline = new ConstantProperty<>(true);
    rectangleGraphicsOptions.outlineColor = new ConstantProperty<>(Color.WHITE());
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.rectangle = new RectangleGraphics(rectangleGraphicsOptions);
    csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Also used : Entity(org.cesiumjs.cs.datasources.Entity) CameraFlyToOptions(org.cesiumjs.cs.scene.options.CameraFlyToOptions) RectangleGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.RectangleGraphicsOptions) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions) RectangleGraphics(org.cesiumjs.cs.datasources.graphics.RectangleGraphics)

Example 4 with CameraFlyToOptions

use of org.cesiumjs.cs.scene.options.CameraFlyToOptions in project gwt-cs by iSergio.

the class Camera method flyToSanDiego.

private void flyToSanDiego() {
    CameraFlyToOptions cameraFlyToOptions = new CameraFlyToOptions();
    cameraFlyToOptions.destinationPos = Cartesian3.fromDegrees(-117.16, 32.71, 15000.0);
    csVPanel.getViewer().camera.flyTo(cameraFlyToOptions);
}
Also used : CameraFlyToOptions(org.cesiumjs.cs.scene.options.CameraFlyToOptions)

Aggregations

CameraFlyToOptions (org.cesiumjs.cs.scene.options.CameraFlyToOptions)4 org.cesiumjs.cs.core (org.cesiumjs.cs.core)2 RectangleGraphics (org.cesiumjs.cs.datasources.graphics.RectangleGraphics)2 Entity (org.cesiumjs.cs.datasources.Entity)1 RectangleGraphicsOptions (org.cesiumjs.cs.datasources.graphics.options.RectangleGraphicsOptions)1 EntityOptions (org.cesiumjs.cs.datasources.options.EntityOptions)1