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
I just noticed that it's a little bit more complex since the formula above is only true for rotation around the origin of the coordinate system.
In reality, we need to multiply the position by additional translation matrices to determine the final position.
If C is a point describing the middle of the layout, we need to do:
TranlationMat(C.x, C.y) * RotationMat(R) * Translation(-C.x, -C.y) * PointCoordsVec
top
andleft
calculations of child components should consider the parent component's rotation.This is the WGSL handling of the similar case I wrote, that might be helpful during implementation:
The text was updated successfully, but these errors were encountered: