You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// let segment_t_parametric = bezpath.get_seg(segment_index).unwrap().euclidean_to_parametric(segment_t_euclidean, DEFAULT_EUCLIDEAN_ERROR_BOUND);
1314
-
// (segment_index, segment_t_parametric)
1315
-
(segment_index, segment_t_euclidean)
1316
-
}
1317
-
SubpathTValue::GlobalParametric(global_t) => {
1318
-
assert!((0.0..=1.).contains(&global_t));
1319
-
1320
-
if global_t == 1.{
1321
-
return(segment_len - 1,1.);
1322
-
}
1323
-
1324
-
let scaled_t = global_t * segment_len asf64;
1325
-
let segment_index = scaled_t.floor()asusize;
1326
-
let t = scaled_t - segment_index asf64;
1327
-
1328
-
(segment_index, t)
1329
-
}
1330
-
_ => unreachable!(),
1331
-
}
1332
-
}
1333
-
1334
1262
/// Determines the position of a point on the path, given by its progress from 0 to 1 along the path.
1335
1263
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1336
1264
#[node_macro::node(name("Position on Path"), category("Vector"), path(graphene_core::vector))]
let position = position_on_bezpath(&bezpath, t, euclidian);
1292
+
point_to_dvec2(position)
1371
1293
})
1372
1294
}
1373
-
/////////////
1374
1295
1375
1296
/// Determines the angle of the tangent at a point on the path, given by its progress from 0 to 1 along the path.
1376
1297
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
0 commit comments