| const DEF_OPTS = { | const DEF_OPTS = { | ||||
| clampToGround: false, | clampToGround: false, | ||||
| clampToTileset: false | |||||
| clampToTileset: false, | |||||
| interpolationType: 'Hermite', | |||||
| interpolationDegree: 2 | |||||
| } | } | ||||
| const DEF_PATH_STYLE = { | const DEF_PATH_STYLE = { | ||||
| ) | ) | ||||
| this._sampledPosition.forwardExtrapolationType = | this._sampledPosition.forwardExtrapolationType = | ||||
| Cesium.ExtrapolationType.HOLD | Cesium.ExtrapolationType.HOLD | ||||
| this._sampledPosition.setInterpolationOptions({ | |||||
| interpolationDegree: 5, | |||||
| interpolationAlgorithm: Cesium.HermitePolynomialApproximation | |||||
| }) | |||||
| /// setInterpolationOptions | |||||
| if (this._options.interpolationType === 'Hermite') { | |||||
| this._sampledPosition.setInterpolationOptions({ | |||||
| interpolationDegree: this._options.interpolationDegree || 2, | |||||
| interpolationAlgorithm: Cesium.HermitePolynomialApproximation | |||||
| }) | |||||
| } else if (this._options.interpolationType === 'Linear') { | |||||
| this._sampledPosition.setInterpolationOptions({ | |||||
| interpolationDegree: this._options.interpolationDegree || 1, | |||||
| interpolationAlgorithm: Cesium.LinearApproximation | |||||
| }) | |||||
| } else if (this._options.interpolationType === 'Lagrange') { | |||||
| this._sampledPosition.setInterpolationOptions({ | |||||
| interpolationDegree: this._options.interpolationDegree || 5, | |||||
| interpolationAlgorithm: Cesium.LagrangePolynomialApproximation | |||||
| }) | |||||
| } | |||||
| this._delegate.orientation = new Cesium.VelocityOrientationProperty( | this._delegate.orientation = new Cesium.VelocityOrientationProperty( | ||||
| this._sampledPosition | this._sampledPosition | ||||
| ) | ) |