Store navigation metadata in network

This commit is contained in:
Adam
2024-09-03 21:13:52 -07:00
parent bc62fd2dea
commit d2d451dd6f
12 changed files with 309 additions and 371 deletions

View File

@@ -274,7 +274,7 @@ impl<PointId: crate::Identifier> Subpath<PointId> {
}
/// Return the min and max corners that represent the bounding box of the subpath, after a given affine transform.
pub fn bounding_box_with_transform(&self, transform: glam::DAffine2) -> Option<[DVec2; 2]> {
pub fn bounding_box_with_transform(&self, transform: &glam::DAffine2) -> Option<[DVec2; 2]> {
self.iter()
.map(|bezier| bezier.apply_transformation(|v| transform.transform_point2(v)).bounding_box())
.reduce(|bbox1, bbox2| [bbox1[0].min(bbox2[0]), bbox1[1].max(bbox2[1])])