SetPitch() 공개 메소드

public SetPitch ( double pitch ) : void
pitch double
리턴 void
예제 #1
0
        // Interpolate between current and target orientation over the duration
        public override void Update(double elapsedTime, SpaceCraftBase spaceCraft)
        {
            DVector2 prograde = spaceCraft.GetRelativeVelocity();
            prograde.Normalize();

            double retrogradeAngle = prograde.Angle();

            double adjustRatio = (elapsedTime - StartTime) / _adjustmentTime;

            if (adjustRatio > 1)
            {
                spaceCraft.SetPitch(retrogradeAngle);
            }
            else
            {
                double interpolatedAdjust = _curentOrientation * (1 - adjustRatio) + retrogradeAngle * adjustRatio;

                spaceCraft.SetPitch(interpolatedAdjust);
            }
        }
예제 #2
0
        // Interpolate between current and target orientation over the duration
        public override void Update(double elapsedTime, SpaceCraftBase spaceCraft)
        {
            double ratio = (elapsedTime - StartTime) / Duration;

            spaceCraft.SetPitch(_currentOrientation * (1 - ratio) + _targetOrientation * ratio);
        }
예제 #3
0
 public override void Finalize(SpaceCraftBase spaceCraft)
 {
     spaceCraft.SetPitch(_targetOrientation);
 }