[DiscordArchive] What was that site somebody in here had that cataloged all versions files?
[DiscordArchive] What was that site somebody in here had that cataloged all versions files?
Archived author: Skarn • Posted: 2018-06-11T21:33:35.409000+00:00
Original source
Okay, I am looking at that code though and it looks like it uses 3 points only
Archived author: Skarn • Posted: 2018-06-11T21:33:38.259000+00:00
Original source
that is weird
Archived author: Deamon • Posted: 2018-06-11T21:33:49.707000+00:00
Original source
```
//handle Left
static void rna_FKeyframe_handle1_set(PointerRNA *ptr, const float *values)
{
BezTriple *bezt = (BezTriple *)ptr->data;
bezt->vec[0][0] = values[0];
bezt->vec[0][1] = values[1];
}
//Right handle
static void rna_FKeyframe_handle2_set(PointerRNA *ptr, const float *values)
{
BezTriple *bezt = (BezTriple *)ptr->data;
bezt->vec[2][0] = values[0];
bezt->vec[2][1] = values[1];
}
```
Archived author: Skarn • Posted: 2018-06-11T21:34:21.104000+00:00
Original source
yeah, but it is set with values you give to it
Archived author: Skarn • Posted: 2018-06-11T21:34:25.508000+00:00
Original source
it is never set automatically
Archived author: Deamon • Posted: 2018-06-11T21:40:07.040000+00:00
Original source
```
const BezTriple *bezt_curr = &bezt_array[i];
const BezTriple *bezt_next = &bezt_array[i + 1];
BKE_curve_forward_diff_bezier(
bezt_curr->vec[1][axis], bezt_curr->vec[2][axis],
bezt_next->vec[0][axis], bezt_next->vec[1][axis],
r_points_offset, (int)resolu, stride);
```
```
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
{
float rt0, rt1, rt2, rt3, f;
int a;
f = (float)it;
rt0 = q0;
rt1 = 3.0f * (q1 - q0) / f;
f *= f;
rt2 = 3.0f * (q0 - 2.0f * q1 + q2) / f;
f *= it;
rt3 = (q3 - q0 + 3.0f * (q1 - q2)) / f;
q0 = rt0;
q1 = rt1 + rt2 + rt3;
q2 = 2 * rt2 + 6 * rt3;
q3 = 6 * rt3;
for (a = 0; a <= it; a++) {
*p = q0;
p = POINTER_OFFSET(p, stride);
q0 += q1;
q1 += q2;
q2 += q3;
}
}
```