• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# InterpolationType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中InterpolationType的典型用法代码示例。如果您正苦于以下问题:C# InterpolationType类的具体用法?C# InterpolationType怎么用?C# InterpolationType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



InterpolationType类属于命名空间,在下文中一共展示了InterpolationType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Instance

 public static IInterpolation Instance(InterpolationType type)
 {
     if (type == InterpolationType.InterpolationTypeSmooth)
         return new SmoothInterpolation();
     else
         return new SmoothInterpolation();
 }
开发者ID:rajkoa,项目名称:PathInterpolation,代码行数:7,代码来源:InterpolationFactory.cs


示例2: ViewMoverKenBurnsStyle

        public ViewMoverKenBurnsStyle(CameraParameters from, CameraParameters to, double time, Date fromDateTime, Date toDateTime, InterpolationType type)
        {
            InterpolationType = type;

            if (Math.Abs(from.Lng - to.Lng) > 180)
            {
                if (from.Lng > to.Lng)
                {
                    from.Lng -= 360;
                }
                else
                {
                    from.Lng += 360;
                }
            }

            this.fromDateTime = fromDateTime;
            this.toDateTime = toDateTime;

            dateTimeSpan = toDateTime - fromDateTime;

            this.from = from.Copy();
            this.to = to.Copy();
            fromTime = Date.Now;
            toTargetTime = time;
        }
开发者ID:spamarti,项目名称:wwt-web-client,代码行数:26,代码来源:IViewMover.cs


示例3: AllowedLimitedPrefix

 public static bool AllowedLimitedPrefix(InterpolationType x)
 {
     if ((x == InterpolationType.limitedCubic) ||
         (x == InterpolationType.limitedLinear))
         return false;
     return true;
 }
开发者ID:mohsenboojari,项目名称:offwind,代码行数:7,代码来源:InterpolationScheme.cs


示例4: FCurveKeyframe

 public FCurveKeyframe(InterpolationType interpolationType = asd.InterpolationType.Linear)
 {
     LeftHandle = new Vector2DF();
     RightHandle = new Vector2DF();
     KeyValue = new Vector2DF();
     Interpolation = interpolationType;
 }
开发者ID:Pctg-x8,项目名称:Altseed,代码行数:7,代码来源:Def.cs


示例5: GetInterpolatedValue

		public double GetInterpolatedValue(double compleatedRatio0To1, InterpolationType interpolationType)
		{
			switch (interpolationType)
			{
				case InterpolationType.LINEAR:
					return compleatedRatio0To1;

				case InterpolationType.EASE_IN:
					return Math.Pow(compleatedRatio0To1, 3);

				case InterpolationType.EASE_OUT:
					return (Math.Pow(compleatedRatio0To1 - 1, 3) + 1);

				case InterpolationType.EASE_IN_OUT:
					if (compleatedRatio0To1 < .5)
					{
						return Math.Pow(compleatedRatio0To1 * 2, 3) / 2;
					}
					else
					{
						return (Math.Pow(compleatedRatio0To1 * 2 - 2, 3) + 2) / 2;
					}

				default:
					throw new NotImplementedException();
			}
		}
开发者ID:SkightTeam,项目名称:agg-sharp,代码行数:27,代码来源:AutomationRunner.cs


示例6: ArcGISImageCapabilities

 public ArcGISImageCapabilities(string url, long startTime = -1, long endTime = -1, string format = "jpgpng", InterpolationType interpolation = InterpolationType.RSP_NearestNeighbor)
 {
     ServiceUrl = url;
     Format = format;
     Interpolation = interpolation;
     StartTime = startTime;
     EndTime = endTime;           
 }
开发者ID:jdeksup,项目名称:Mapsui.Net4,代码行数:8,代码来源:ArcGISImageCapabilities.cs


示例7: Keyframe

 public Keyframe(Bone bone, float time, Matrix output, InterpolationType interpolation)
 {
     Bone = bone;
     Time = time;
     Transform = output;
     Interpolation = interpolation;
     Transform.Decompose(out Scale, out Rotation, out Translation);
 }
开发者ID:RomanHodulak,项目名称:DeferredLightingD3D11,代码行数:8,代码来源:Keyframe.cs


示例8: InterpolationTypeToString

 static string InterpolationTypeToString(InterpolationType eInterpolationType)
 {
     if (eInterpolationType == InterpolationType.LINEAR)
     {
         return "LINEAR";
     }
     throw new MyException ("Interpolation Type not recognized");
 }
开发者ID:humeaua,项目名称:CVATools,代码行数:8,代码来源:EnumToString.cs


示例9: ImplicitFractal

 public ImplicitFractal(FractalType fractalType, BasisType basisType, InterpolationType interpolationType)
 {
     this.Octaves = 8;
     this.Frequency = 1.00;
     this.Lacunarity = 2.00;
     this.Type = fractalType;
     this.SetAllSourceTypes(basisType, interpolationType);
     this.ResetAllSources();
 }
开发者ID:Thraka,项目名称:SadConsole,代码行数:9,代码来源:ImplicitFractal.cs


示例10: TimedInterpolator

 public TimedInterpolator(double in_numSeconds, double in_startValue, double in_endValue, Repeate in_repeateType, InterpolationType in_interpolationType)
     : this()
 {
     numSeconds = in_numSeconds;
     startValue = in_startValue;
     endValue = in_endValue;
     distance = endValue - startValue;
     repeateType = in_repeateType;
     interpolationType = in_interpolationType;
 }
开发者ID:jeske,项目名称:agg-sharp,代码行数:10,代码来源:MainMenu.cs


示例11: Reset

		public override void Reset()
		{
			mode = InterpolationType.Linear;
			fromFloat = null;
			toFloat = null;
			time = 1.0f;
			storeResult = null;
			finishEvent = null;
			realTime = false;
		}
开发者ID:DIGM680,项目名称:NarrativePlatformer,代码行数:10,代码来源:FloatInterpolate.cs


示例12: Reset

 public override void Reset()
 {
     mode = InterpolationType.Linear;
     fromVector = new FsmVector3 { UseVariable = true };
     toVector = new FsmVector3 { UseVariable = true };
     time = 1.0f;
     storeResult = null;
     finishEvent = null;
     realTime = false;
 }
开发者ID:Streek,项目名称:FSM-Action-Collection-for-UN-PM,代码行数:10,代码来源:Vector3Interpolate.cs


示例13: StrictlyBoundedField

 public static bool StrictlyBoundedField(InterpolationType x)
 {
     if ((x == InterpolationType.limitedLinear)
         || (x == InterpolationType.vanLeer)
         || (x == InterpolationType.Gamma)
         || (x == InterpolationType.limitedCubic)
         || (x == InterpolationType.MUSCL)
         ) return true;
     return false;
 }
开发者ID:mohsenboojari,项目名称:offwind,代码行数:10,代码来源:InterpolationScheme.cs


示例14: ImplicitFractal

 public ImplicitFractal(FractalType fractalType, BasisType basisType, InterpolationType interpolationType, Int32 octaves, double frequency, Int32 seed)
 {
     this.seed = seed;
     this.Octaves = octaves;
     this.Frequency = frequency;
     this.Lacunarity = 2.00;
     this.Type = fractalType;
     this.SetAllSourceTypes(basisType, interpolationType);
     this.ResetAllSources();
 }
开发者ID:Cyberbanan,项目名称:WorldGeneratorFinal,代码行数:10,代码来源:ImplicitFractal.cs


示例15: AnimationTrack

        /// <summary>
        /// コンストラクター
        /// </summary>
        /// <param name="targetProperty">ターゲット プロパティ名</param>
        /// <param name="interp">補完方法</param>
        public AnimationTrack(string targetProperty,InterpolationType interp)
        {
            if (targetProperty == null || targetProperty == "") {
                throw new ArgumentNullException ("Target Property is null or empty");
            }

            this.targetProperty = targetProperty;
            this.frames = new List<Keyframe>();
            this.interpType = interp;
            this.compCount = 0;
            this.compType = null;
        }
开发者ID:weimingtom,项目名称:erica,代码行数:17,代码来源:AnimationTrack.cs


示例16: CPIBond

        public CPIBond(int settlementDays,
                double faceAmount,
                bool growthOnly,
                double baseCPI,
                Period observationLag,
                ZeroInflationIndex cpiIndex,
                InterpolationType observationInterpolation,
                Schedule schedule,
                List<double> fixedRate,
                DayCounter accrualDayCounter,
                BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing,
                Date issueDate = null,
                Calendar paymentCalendar = null,
                Period exCouponPeriod = null,
                Calendar exCouponCalendar = null,
					 BusinessDayConvention exCouponConvention = BusinessDayConvention.Unadjusted,
                bool exCouponEndOfMonth = false)                
            :base(settlementDays, paymentCalendar == null ? schedule.calendar() : paymentCalendar, issueDate)
        {
            frequency_ = schedule.tenor().frequency();
            dayCounter_ = accrualDayCounter;
            growthOnly_ = growthOnly;
            baseCPI_=baseCPI;
            observationLag_ = observationLag;
            cpiIndex_= cpiIndex;
            observationInterpolation_ = observationInterpolation;

            maturityDate_ = schedule.endDate();

            // a CPIleg know about zero legs and inclusion of base inflation notional
            cashflows_ = new CPILeg(schedule, cpiIndex_,
                                    baseCPI_, observationLag_)
             .withSubtractInflationNominal(growthOnly_)
             .withObservationInterpolation(observationInterpolation_)
             .withPaymentDayCounter(accrualDayCounter)
             .withFixedRates(fixedRate)
             .withPaymentCalendar(calendar_)
             .withExCouponPeriod(exCouponPeriod,
                                exCouponCalendar,
                                exCouponConvention,
                                exCouponEndOfMonth)
             .withNotionals(faceAmount)
             .withPaymentAdjustment(paymentConvention);
            

            calculateNotionalsFromCashflows();

            cpiIndex_.registerWith(update);

            foreach ( CashFlow i in cashflows_) 
                i.registerWith(update);
        }
开发者ID:minikie,项目名称:test,代码行数:52,代码来源:CPIBond.cs


示例17: TimedInterpolator

 public TimedInterpolator(double in_numSeconds, double in_startValue, double in_endValue, Repeate in_repeateType, InterpolationType in_interpolationType)
 {
     if (!runningTimeStarted)
     {
         runningTime.Start();
     }
     numSeconds = in_numSeconds;
     startValue = in_startValue;
     endValue = in_endValue;
     distance = endValue - startValue;
     repeateType = in_repeateType;
     interpolationType = in_interpolationType;
 }
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:13,代码来源:MainMenu.cs


示例18: interp

 float interp(float e1, float e2, float t, float tension, InterpolationType type, InterpolationMode mode)
 {
     switch ((int)mode)
     {
         case 0:
             return interpIn(e1, e2, t, tension, type);
         case 1:
             return interpOut(e1, e2, t, tension, type);
         case 2:
             return interpInOut(e1, e2, t, tension, type);
         default:
             return interpOutIn(e1, e2, t, tension, type);
     }
 }
开发者ID:TheMadGamer,项目名称:Snowboarder,代码行数:14,代码来源:Interpolator.cs


示例19: GlobalInterpolation

 public static void GlobalInterpolation(InterpolationType typeInterpolation)
 {
     switch (typeInterpolation)
     {
         case InterpolationType.Slerp:
             System.Console.WriteLine("Bezier");
             break;
         case InterpolationType.Linear:
             System.Console.WriteLine("Linear");
             break;
         case InterpolationType.Constant:
             System.Console.WriteLine("Constant");
             break;
     }
 }
开发者ID:loic-lavergne,项目名称:mckineap,代码行数:15,代码来源:EditingUtils.cs


示例20: PixelInterpolate

        public static Vector2 PixelInterpolate( InterpolationType type, Vector2 from, Vector2 to, float pixelPerSec, float elapsed )
        {
            switch( type )
            {
                case InterpolationType.Linear:
                    return PixelLerp( from, to, pixelPerSec, elapsed );

                case InterpolationType.SinusCurve:
                    return PixelSinus( from, to, pixelPerSec, elapsed );

                case InterpolationType.SmoothStep:
                    return PixelSmoothStep( from, to, pixelPerSec, elapsed );

                default:
                    return Vector2.Zero;
            }
        }
开发者ID:adamxi,项目名称:SharpDXFramework,代码行数:17,代码来源:Interpolation.cs



注:本文中的InterpolationType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Interpreter类代码示例发布时间:2022-05-24
下一篇:
C# InterpolationMode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap