Beispiel #1
0
            public new float2 Get2DPointLocal(float progress)
            {
                ClearData();
                ConvertData();

                Assert.IsTrue(SplineEntityData2D.HasValue, "Failed to generate spline");
                ISplineJob2D job = new Dynamic2DJob(this, progress, Allocator.TempJob);

                job.Execute();

                LocalSpaceConversion2D conversion = new LocalSpaceConversion2D(this.Position.xy, job.Result, Allocator.TempJob);

                conversion.Execute();

                float2 result = conversion.SplinePosition.Value;

                job.Dispose();
                conversion.Dispose();
                return(result);
            }
            public new float2 Get2DPointLocal(float progress)
            {
                ClearData();
                ConvertData();

                Assert.IsTrue(SplineEntityData2D.HasValue, "Failed to generate spline");
                ISplineJob2D job = ((ISpline2D)this).ExtractJob(progress, Allocator.TempJob);

                job.Execute();

                LocalSpaceConversion2D conversion = new LocalSpaceConversion2D(Position.xy, job.Result, Allocator.TempJob);

                conversion.Execute();

                float2 pos = conversion.SplinePosition.Value;

                conversion.Dispose();
                job.Dispose();
                return(pos);
            }