| } | } | ||||
| this._controller = undefined | this._controller = undefined | ||||
| this._sampledPosition = undefined | this._sampledPosition = undefined | ||||
| this._velocityOrientation = undefined | |||||
| this._viewed = false | this._viewed = false | ||||
| this._delegate = new Cesium.Entity() | this._delegate = new Cesium.Entity() | ||||
| this._pathPositions = [] | this._pathPositions = [] | ||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| this._positionIndex = 0 | this._positionIndex = 0 | ||||
| this._timeLine = [] | this._timeLine = [] | ||||
| this._startTime = undefined | this._startTime = undefined | ||||
| } else { | } else { | ||||
| this._delegate.position = p | this._delegate.position = p | ||||
| } | } | ||||
| let o = this._velocityOrientation.getValue(now) | |||||
| if (o) { | |||||
| this._delegate.orientation = o | |||||
| } | |||||
| let time = this._timeLine[this._positionIndex] | let time = this._timeLine[this._positionIndex] | ||||
| if (time) { | if (time) { | ||||
| let timeDiff = Cesium.JulianDate.secondsDifference(now, time) | let timeDiff = Cesium.JulianDate.secondsDifference(now, time) | ||||
| interpolationAlgorithm: Cesium.LagrangePolynomialApproximation | interpolationAlgorithm: Cesium.LagrangePolynomialApproximation | ||||
| }) | }) | ||||
| } | } | ||||
| this._delegate.orientation = new Cesium.VelocityOrientationProperty( | |||||
| this._velocityOrientation = new Cesium.VelocityOrientationProperty( | |||||
| this._sampledPosition | this._sampledPosition | ||||
| ) | ) | ||||
| this._endTime = this._timeLine[this._timeLine.length - 1] | this._endTime = this._timeLine[this._timeLine.length - 1] |