public override float3 Get3DPointWorld(float progress) { ClearData(); ConvertData(); Assert.IsTrue(SplineEntityData3D.HasValue, "Failed to generate spline"); ISplineJob3D job = this.ExtractJob(progress, Allocator.TempJob); job.Execute(); float3 jobResult = job.Result; job.Dispose(); return jobResult; }
public override float3 Get3DPointLocal(float progress) { ClearData(); ConvertData(); Assert.IsTrue(SplineEntityData3D.HasValue, "Failed to generate spline"); ISplineJob3D job = this.ExtractJob(progress, Allocator.TempJob); job.Execute(); LocalSpaceConversion3D conversion = new LocalSpaceConversion3D(this.Position, this.Forward, job.Result, Allocator.TempJob); conversion.Execute(); float3 pos = conversion.SplinePosition.Value; conversion.Dispose(); job.Dispose(); return pos; }
public new float3 Get3DPointLocal(float progress) { ClearData(); ConvertData3D(); Assert.IsTrue(SplineEntityData3D.HasValue, "Failed to generate spline"); ISplineJob3D job = ((ISpline3D)this).ExtractJob(progress, Allocator.TempJob); job.Execute(); LocalSpaceConversion3D conversion = new LocalSpaceConversion3D(Position, Quaternion.identity, job.Result, Allocator.TempJob); conversion.Execute(); float3 pos = conversion.SplinePosition.Value; conversion.Dispose(); job.Dispose(); return(pos); }