Search in sources :

Example 1 with JulianDate

use of org.cesiumjs.cs.core.JulianDate in project gwt-cs by iSergio.

the class Shadows method setLocation.

public void setLocation(Location location) {
    double lon = location.lon;
    double lat = location.lat;
    double height = location.height;
    for (int i = 0; i < csVPanel.getViewer().entities().values().length; ++i) {
        Entity entity = csVPanel.getViewer().entities().values()[i];
        entity.position = new ConstantPositionProperty(Cartesian3.fromRadians(lon, lat, height + JsObject.getNumber(entity, "height").doubleValue()));
    }
    csVPanel.getViewer().clock().currentTime = new JulianDate(location.date);
    csVPanel.getViewer().clock().multiplier = 1.0;
}
Also used : JulianDate(org.cesiumjs.cs.core.JulianDate) Entity(org.cesiumjs.cs.datasources.Entity) ConstantPositionProperty(org.cesiumjs.cs.datasources.properties.ConstantPositionProperty)

Aggregations

JulianDate (org.cesiumjs.cs.core.JulianDate)1 Entity (org.cesiumjs.cs.datasources.Entity)1 ConstantPositionProperty (org.cesiumjs.cs.datasources.properties.ConstantPositionProperty)1