-
Notifications
You must be signed in to change notification settings - Fork 187
Add rotateZ for all rotations
#1197
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
Add rotateZ for all rotations
#1197
Conversation
|
I wonder if it might be best to just restrict the rotations to only the z axis, then we could focus on optimizing these cases (to just one function call, instead of calling rotateZ 3 times in the worst case), without having to worry about any other rotation axis. @ikabod-kee maybe you have an opinion about this? Are there many cases where you may really want to rotate a structure in any other direction? If so, would be fine about manually rotation things in that case? |
|
I don't see how having all 3 axis available stops you from having bigger rotation tables, since every rotation is applied separately and simply there is no way to create rotation table for combination of rotations in different axis due to how API is designed. I don't agree with removing rotations around X and Y, these have valid use cases of creating eg. XYZ junctions and in general anything that is symmetrical around X or Y axis. If you don't have X and Z rotations you can't use commands to create builds that are symmetrical around X or Y since even if you build it symmetrical along Z axis there is no tool to rotate it to horizontal position. This applies for example to tunnels. |
Unless you can defy gravity, there isn't much reason to turn a structure on its side. |
|
Though it's still probably good to have that option, just in case. |
|
What about spikes, stalagmites and stalactites, reusing branches as flipped top-down, having leaves spawn child nodes point up and down? We will manually create exactly same model twice because we can't rotate it around X and Y? And since allegedly we don't use it, why worry about its performance? |
I mean that in the sense of focusing our efforts on making one thing faster, rather than having to work on 3 different things (6 including flips).
Well, that is an argument for implementing flipping, not for implementing X or Y rotations (which require significantly more complicated code). Like Ikabod said, there rarely is a reason to turn something on its side. |
|
Well then you can keep implementation of XY rotations suboptimal but present instead of removing it at all. |
Well, it's not just about this code here, but also about the future rotation code. And you can't deny that it would make the structure rotation simpler too to restrict it on flipping and z rotations. |
|
So for ship wrecks you will also have separate model laying on side? No complicated fallen tree models either, unless you build separate set of assets for them. I am fairly certain that this will come back as a request. Things that were build vertical will stay vertical then. |
rotateX rotateY rotateZ for all rotationsrotateZ for all rotations
|
I'm sure that both shipwrecks and fallen trees are better to built them sideways to begin with. Finally if we limit outselves to just z rotations it could make your idea
more viable, since then you could achieve cache locality by iterating the columns (and for flips we could precompute just one separate model) |
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Co-authored-by: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
IntegratedQuantum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.

This pull request adds functions for rotating block data around Z axis.