SplineSegmentArcLength
function · spline · primitive
- Address
0x453760· 209 bytes, up to0x453830- Signature
double __thiscall (void *this, uint32_t seg, const float *table)- Meaning
- Returns the length of a segment as 20 chords
- Confidence
- verified, proof one
- Finding
- spline#arc-length-and-parameter
- Test
spline::arc_length_diff
Finding: Arc length and parameter in spline
0x453760(seg, table) returns the length of a segment as 20 chords: points at t = 0.05·k, each
chord √((dz² + dy²) + dx²), the running sum stored as a float after each. 0x453840(t, _, n, &i, &f)
finds the segment by arc length: n of 1 gives (0, t); else s = total·t and the stored lengths are
added until s < running + length[i] or the last segment, f = (s − running)/length[i].
0x4538c0(t, n, &i, &f) splits [0, 1] into n equal parts: i is byte 1 of the float bits of
t·n + 512, f = (t − (1/n)·i)·n.
The derivation is in the doc.
Callers 2
- BezierSegmentLength spline
- CatmullRomSegmentLength spline
Callees 1
- EvaluateCubicPoint spline
Calls and jumps by a bare address, from tables/calls.tsv.