On 06/05/2015 at 08:42, xxxxxxxx wrote:
Cinema 4D Version: R14
Language(s) : C++ ;
I have a problem using the SplineHelp class. What I want is to get the distance a point in the spline is along the full length of the spline. What I'm doing is this:
sh->GetLinePointSegment(j, &offset;, &ind;, &segment;);
Where 'sh' is an initialised SplineHelp and 'j' is the index of a point in the spline, from 0 to GetPointCount() - 1.
Now, suppose I have a spline with one segment and 3 points, at equal distance from each other. What I'd _expect_ to see is that point 0 returns an offset of 0.0 (because it's the start of the spline), point 1 returns 0.5 (halfway along) and point 2 returns 1.0 (the end of the spline).
What I actually see are values of 0.0, 0.333, and 0.667. So, either I am not using this function correctly or there's a problem with it. Either way, does anyone know how to find out how 'far' along a spline a point is located?
On 06/05/2015 at 10:57, xxxxxxxx wrote:
Recently discussed: https://plugincafe.maxon.net/topic/8467/11050_splinehelp-unexpected-results-solved
On 06/05/2015 at 12:50, xxxxxxxx wrote:
Well so it was! Don't know how I missed that, searched here but not for the specific function or I'd have seen it
Thanks very much for the link!