-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rotating the layouts #359
Comments
Actually, we would not need to modify anything. The rotation will be done in the shades so as far as empress is concerned, the tree will not actually change. To rotate, all we have to do is multiply the world matrix by a rotation matrix. (The world matrix is currently responsible to zooming/moving the tree) |
Oh wow. That makes life even easier! So this would automatically rotate the barplots buffer, as well? |
Yupe, it will rotate everything! On top of that, it is a "free operation" in the sense that no extra computation resources are needed. WebGl will be doing the same amount of work whether or not the tree is rotated. The "cost" of rotating the tree is simply a single 4x4 matrix multiplication. |
barely know how this works but it's a proof of concept at least
Brought up by @kwcantrell in kwcantrell#49 (comment) and kwcantrell#49 (comment).
This would be really nice for the rectangular layout (since it'd let users draw the tree going from top to bottom, which is a common way of representing them) and for the circular layout (if the user wants the "start point" of the circle to be at an angle other than 0 radians).
This might break the "maximum displacement" computations for rectangular barplots a bit, but fixing it probably won't be too bad. (It might be easier to just support increments of 90 degrees for the rectangular layouts; not sure right now.)
The text was updated successfully, but these errors were encountered: