Lines Matching refs:t

74     auto t = 0.5f;  in _bezAt()  local
83 right.split(t, left); in _bezAt()
89 smallest = t; in _bezAt()
90 t = (t + biggest) * 0.5f; in _bezAt()
92 biggest = t; in _bezAt()
93 t = (smallest + t) * 0.5f; in _bezAt()
96 return t; in _bezAt()
272 auto t = right.at(at, right.length()); in split() local
273 right.split(t, left); in split()
289 void Bezier::split(float t, Bezier& left) in split() argument
293 left.ctrl1.x = start.x + t * (ctrl1.x - start.x); in split()
294 left.ctrl1.y = start.y + t * (ctrl1.y - start.y); in split()
296 left.ctrl2.x = ctrl1.x + t * (ctrl2.x - ctrl1.x); //temporary holding spot in split()
297 left.ctrl2.y = ctrl1.y + t * (ctrl2.y - ctrl1.y); //temporary holding spot in split()
299 ctrl2.x = ctrl2.x + t * (end.x - ctrl2.x); in split()
300 ctrl2.y = ctrl2.y + t * (end.y - ctrl2.y); in split()
302 ctrl1.x = left.ctrl2.x + t * (ctrl2.x - left.ctrl2.x); in split()
303 ctrl1.y = left.ctrl2.y + t * (ctrl2.y - left.ctrl2.y); in split()
305 left.ctrl2.x = left.ctrl1.x + t * (left.ctrl2.x - left.ctrl1.x); in split()
306 left.ctrl2.y = left.ctrl1.y + t * (left.ctrl2.y - left.ctrl1.y); in split()
308 left.end.x = start.x = left.ctrl2.x + t * (ctrl1.x - left.ctrl2.x); in split()
309 left.end.y = start.y = left.ctrl2.y + t * (ctrl1.y - left.ctrl2.y); in split()
325 Point Bezier::at(float t) const in at()
328 auto it = 1.0f - t; in at()
330 auto ax = start.x * it + ctrl1.x * t; in at()
331 auto bx = ctrl1.x * it + ctrl2.x * t; in at()
332 auto cx = ctrl2.x * it + end.x * t; in at()
333 ax = ax * it + bx * t; in at()
334 bx = bx * it + cx * t; in at()
335 cur.x = ax * it + bx * t; in at()
337 float ay = start.y * it + ctrl1.y * t; in at()
338 float by = ctrl1.y * it + ctrl2.y * t; in at()
339 float cy = ctrl2.y * it + end.y * t; in at()
340 ay = ay * it + by * t; in at()
341 by = by * it + cy * t; in at()
342 cur.y = ay * it + by * t; in at()
348 float Bezier::angle(float t) const in angle()
350 if (t < 0 || t > 1) return 0; in angle()
355 float mt = 1.0f - t; in angle()
356 float d = t * t; in angle()
358 float b = 1 - 4 * t + 3 * d; in angle()
359 float c = 2 * t - 3 * d; in angle()
369 uint8_t lerp(const uint8_t &start, const uint8_t &end, float t) in lerp() argument
371 auto result = static_cast<int>(start + (end - start) * t); in lerp()