Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get realtime F value between control point.
#1
Hello.

I want to get current F value(LocalF) between two control point in realtime. 

http://imgur.com/A0ggZHc

I want interpolate two control point by using F value(LocalF).

Is there anyone to have solution?

Thank you for reading.
Reply
#2
To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.
Reply
#3
(02-01-2017, 07:30 PM)Jake Wrote: To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.

Thank you very much Jake. I'll try it.
Reply
#4
(02-01-2017, 07:30 PM)Jake Wrote: To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.

Hello Jake.

I tried your suggestion. I have successed in getting CurvySplineSegment.

like this

CurvySplineSegment ss = spline.TFToSegment(sc.RelativePosition);

but I don't know how to get Local F.

ss.Interpolate(float localF)  << I want to use this function. but  I don't know how to get Local F.

I tried to finding solution at the API. but I failed to finding solution. 

please help me
Reply
#5
TFToSegment has a variant that returns the localF within that segment:

Code:
float localF;
var ss=spline.TfToSegment(sc.RelativePosition, out localF);
ss.Interpolate(localF);
Reply
#6
(02-16-2017, 08:00 AM)Jake Wrote: TFToSegment has a variant that returns the localF within that segment:

Code:
float localF;
var ss=spline.TfToSegment(sc.RelativePosition, out localF);
ss.Interpolate(localF);

Thank you very much Jake.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Get position of all control points for a spline gekido 1 2 10 hours ago
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  Connection "next' control point jh092 3 15 11-22-2023, 11:47 AM
Last Post: _Aka_
  Spline.Length not updated unless I add a point to spline (or modify it) first. _RicO 3 6 08-26-2023, 08:41 AM
Last Post: _Aka_

Forum Jump: