I'm trying to create a polyline that shows only during a certain interval and doesn't show otherwise...
I got what I wanted to work by specifying really broad intervals...
200 years in the past and one second before my show interval...set it to false
One second after my show interval and 200 years into the future, set it to false.
Then my show interval I set to true.
try (BooleanCesiumWriter showWriter = polylineWriter.openShowProperty()) {
try (CesiumIntervalListWriter<BooleanCesiumWriter> intervals = showWriter.openMultipleIntervals()) {
try (BooleanCesiumWriter interval = intervals.openInterval(showStart, showEnd)) {
interval.writeBoolean(true);
}
JulianDate twoHundredYearsInPast = showStart.subtractDays(73000.0);
JulianDate oneSecondBefore = showStart.subtractSeconds(1);
JulianDate twoHundredYearsInFuture = showStart.addDays(73000.0);
JulianDate oneSecondAfter = showStart.addSeconds(1);
try (BooleanCesiumWriter interval = intervals.openInterval(twoHundredYearsInPast,
oneSecondBefore)) {
interval.writeBoolean(false);
}
try (BooleanCesiumWriter interval = intervals.openInterval(twoHundredYearsInFuture,
oneSecondAfter)) {
interval.writeBoolean(false);
}
}
}
Is there a way so I don't have to specify false for 200 years in the past and 200 years in the future? I mean...granted probably nobody is going to be checking out my application use case for 1719 but...it feels hacky this way.
Thanks!