Search in sources :

Example 11 with ConstantPositionProperty

use of org.cesiumjs.cs.datasources.properties.ConstantPositionProperty in project gwt-cs by iSergio.

the class Billboards method addBillboard.

private void addBillboard() {
    BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
    billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png");
    BillboardGraphics billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
    entityOptions.billboard = billboardGraphics;
    csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Also used : Entity(org.cesiumjs.cs.datasources.Entity) BillboardGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions) BillboardGraphics(org.cesiumjs.cs.datasources.graphics.BillboardGraphics) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions)

Example 12 with ConstantPositionProperty

use of org.cesiumjs.cs.datasources.properties.ConstantPositionProperty in project gwt-cs by iSergio.

the class Billboards method scaleByDistance.

private void scaleByDistance() {
    BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
    billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/facility.gif");
    billboardGraphicsOptions.scaleByDistance = new ConstantProperty<>(new NearFarScalar(1.5e2, 2.0, 1.5e7, 0.5));
    BillboardGraphics billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
    entityOptions.billboard = billboardGraphics;
    csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Also used : Entity(org.cesiumjs.cs.datasources.Entity) BillboardGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions) BillboardGraphics(org.cesiumjs.cs.datasources.graphics.BillboardGraphics) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions)

Example 13 with ConstantPositionProperty

use of org.cesiumjs.cs.datasources.properties.ConstantPositionProperty in project gwt-cs by iSergio.

the class Billboards method sizeBillboardInMeters.

private void sizeBillboardInMeters() {
    BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
    billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png");
    billboardGraphicsOptions.sizeInMeters = new ConstantProperty<>(true);
    BillboardGraphics billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
    entityOptions.billboard = billboardGraphics;
    Entity entity = csVPanel.getViewer().entities().add(new Entity(entityOptions));
    csVPanel.getViewer().zoomTo(entity);
}
Also used : Entity(org.cesiumjs.cs.datasources.Entity) BillboardGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions) BillboardGraphics(org.cesiumjs.cs.datasources.graphics.BillboardGraphics) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions)

Example 14 with ConstantPositionProperty

use of org.cesiumjs.cs.datasources.properties.ConstantPositionProperty in project gwt-cs by iSergio.

the class Billboards method fadeByDistance.

private void fadeByDistance() {
    BillboardGraphicsOptions billboardGraphicsOptions = new BillboardGraphicsOptions();
    billboardGraphicsOptions.image = new ConstantProperty<>(GWT.getModuleBaseURL() + "images/Cesium_Logo_overlay.png");
    billboardGraphicsOptions.translucencyByDistance = new ConstantProperty<>(new NearFarScalar(1.5e2, 2.0, 1.5e7, 0.5));
    BillboardGraphics billboardGraphics = new BillboardGraphics(billboardGraphicsOptions);
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-75.59777, 40.03883));
    entityOptions.billboard = billboardGraphics;
    csVPanel.getViewer().entities().add(new Entity(entityOptions));
}
Also used : Entity(org.cesiumjs.cs.datasources.Entity) BillboardGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions) BillboardGraphics(org.cesiumjs.cs.datasources.graphics.BillboardGraphics) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions)

Example 15 with ConstantPositionProperty

use of org.cesiumjs.cs.datasources.properties.ConstantPositionProperty in project gwt-cs by iSergio.

the class Labels method fadeByDistance.

private void fadeByDistance() {
    LabelGraphicsOptions labelGraphicsOptions = new LabelGraphicsOptions();
    labelGraphicsOptions.text = new ConstantProperty<>("New York");
    labelGraphicsOptions.translucencyByDistance = new ConstantProperty<>(new NearFarScalar(1.5e2, 1.0, 1.5e8, 0.0));
    EntityOptions entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-73.94, 40.67));
    entityOptions.label = new LabelGraphics(labelGraphicsOptions);
    csVPanel.getViewer().entities().add(entityOptions);
    labelGraphicsOptions = new LabelGraphicsOptions();
    labelGraphicsOptions.text = new ConstantProperty<>("'Atlanta'");
    labelGraphicsOptions.translucencyByDistance = new ConstantProperty<>(new NearFarScalar(1.5e5, 1.0, 1.5e7, 0.0));
    entityOptions = new EntityOptions();
    entityOptions.position = new ConstantPositionProperty(Cartesian3.fromDegrees(-84.39, 33.75));
    entityOptions.label = new LabelGraphics(labelGraphicsOptions);
    csVPanel.getViewer().entities().add(entityOptions);
}
Also used : LabelGraphics(org.cesiumjs.cs.datasources.graphics.LabelGraphics) NearFarScalar(org.cesiumjs.cs.core.NearFarScalar) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty) LabelGraphicsOptions(org.cesiumjs.cs.datasources.graphics.options.LabelGraphicsOptions) EntityOptions(org.cesiumjs.cs.datasources.options.EntityOptions)

Aggregations

ConstantPositionProperty (org.cesiumjs.cs.datasources.properties.ConstantPositionProperty)28 EntityOptions (org.cesiumjs.cs.datasources.options.EntityOptions)27 Entity (org.cesiumjs.cs.datasources.Entity)16 BillboardGraphics (org.cesiumjs.cs.datasources.graphics.BillboardGraphics)12 BillboardGraphicsOptions (org.cesiumjs.cs.datasources.graphics.options.BillboardGraphicsOptions)12 LabelGraphics (org.cesiumjs.cs.datasources.graphics.LabelGraphics)8 LabelGraphicsOptions (org.cesiumjs.cs.datasources.graphics.options.LabelGraphicsOptions)8 ModelGraphics (org.cesiumjs.cs.datasources.graphics.ModelGraphics)6 ModelGraphicsOptions (org.cesiumjs.cs.datasources.graphics.options.ModelGraphicsOptions)6 ViewerPanel (org.cesiumjs.cs.widgets.ViewerPanel)6 HTML (com.google.gwt.user.client.ui.HTML)5 ConstantProperty (org.cesiumjs.cs.datasources.properties.ConstantProperty)5 ColorMaterialProperty (org.cesiumjs.cs.datasources.properties.ColorMaterialProperty)4 ViewerOptions (org.cesiumjs.cs.widgets.options.ViewerOptions)4 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)3 ClippingPlaneCollection (org.cesiumjs.cs.collections.ClippingPlaneCollection)3 ClippingPlaneCollectionOptions (org.cesiumjs.cs.collections.options.ClippingPlaneCollectionOptions)3 Cartesian3 (org.cesiumjs.cs.core.Cartesian3)3 NearFarScalar (org.cesiumjs.cs.core.NearFarScalar)3 JsImage (org.cesiumjs.cs.js.JsImage)3