A Property whose value is interpolated for a given time from the
provided set of samples and specified interpolation algorithm and degree.
alias SampledProperty
{Number|Packable} type The type of property.
{Packable[]} [derivativeTypes] When supplied, indicates that samples will contain derivative information of the specified types.
//Create a simple numeric SampledProperty that uses third degree Hermite Polynomial Approximation
var property = new Cesium.SampledProperty(Number);
property.setInterpolationOptions({
interpolationDegree : 3,
interpolationAlgorithm : Cesium.HermitePolynomialApproximation
});
//Populate it with data
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:00:00.00Z), 1.0);
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:01:00.00Z), 6.0);
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:02:00.00Z), 12.0);
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:03:30.00Z), 5.0);
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:06:30.00Z), 2.0);
//Samples can be added in any order.
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:00:30.00Z), 6.2);
//Retrieve an interpolated value
var result = property.getValue(Cesium.JulianDate.fromIso8601(2012-08-01T00:02:34.00Z));
,
//Create a linearly interpolated Cartesian2
var property = new Cesium.SampledProperty(Cesium.Cartesian2);
//Populate it with data
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:00:00.00Z), new Cesium.Cartesian2(0, 0));
property.addSample(Cesium.JulianDate.fromIso8601(2012-08-02T00:00:00.00Z), new Cesium.Cartesian2(4, 7));
//Retrieve an interpolated value
var result = property.getValue(Cesium.JulianDate.fromIso8601(2012-08-01T12:00:00.00Z));
A Property whose value is interpolated for a given time from the provided set of samples and specified interpolation algorithm and degree. alias SampledProperty
//Create a simple numeric SampledProperty that uses third degree Hermite Polynomial Approximation var property = new Cesium.SampledProperty(Number); property.setInterpolationOptions({ interpolationDegree : 3, interpolationAlgorithm : Cesium.HermitePolynomialApproximation }); //Populate it with data property.addSample(Cesium.JulianDate.fromIso8601(
2012-08-01T00:00:00.00Z
), 1.0); property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:01:00.00Z
), 6.0); property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:02:00.00Z
), 12.0); property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:03:30.00Z
), 5.0); property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:06:30.00Z
), 2.0); //Samples can be added in any order. property.addSample(Cesium.JulianDate.fromIso8601(2012-08-01T00:00:30.00Z
), 6.2); //Retrieve an interpolated value var result = property.getValue(Cesium.JulianDate.fromIso8601(2012-08-01T00:02:34.00Z
));//Create a linearly interpolated Cartesian2 var property = new Cesium.SampledProperty(Cesium.Cartesian2); //Populate it with data property.addSample(Cesium.JulianDate.fromIso8601(
2012-08-01T00:00:00.00Z
), new Cesium.Cartesian2(0, 0)); property.addSample(Cesium.JulianDate.fromIso8601(2012-08-02T00:00:00.00Z
), new Cesium.Cartesian2(4, 7)); //Retrieve an interpolated value var result = property.getValue(Cesium.JulianDate.fromIso8601(2012-08-01T12:00:00.00Z
));SampledPositionProperty