Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion node-graph/nodes/vector/src/vector_modification_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ async fn apply_transform(_ctx: impl Ctx, mut vector: Table<Vector>) -> Table<Vec
for row in vector.iter_mut() {
let vector = row.element;
let transform = *row.transform;

//iterating over points to apply the transformation(geometry to vector space)
Comment thread
chintu4 marked this conversation as resolved.
for (_, point) in vector.point_domain.positions_mut() {
*point = transform.transform_point2(*point);
}
//iterating over segment handles to transform them as well(geometry to vector space)
Comment thread
chintu4 marked this conversation as resolved.
for (handles, _start_index, _end_index) in vector.segment_domain.handles_and_points_mut() {
*handles = handles.apply_transformation(|p| transform.transform_point2(p));
}

*row.transform = DAffine2::IDENTITY;
}
Expand Down
Loading