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);
}
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);
}
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));
}
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);
}
Aggregations