-
Notifications
You must be signed in to change notification settings - Fork 493
Implement df::coord iterator and cuboid class #4675
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
Conversation
|
Need to apply this to existing functions (e.g., |
|
Should a class with only public members more properly be a struct, or is it weirder to have a struct with member functions? |
I don't have an opinion one way or the other here. I'd say do whatever feels natural. |
Implement an iterator that operates on all
df::coords within a cuboid box. Iterates in the direction of x/y/z provided (rather than always min to max.) By default iterates per z-level, but has an option to iterate in the z direction first.Closes #4596
Cuboid class for defining a cuboid of tiles. Can test if a coord is inside itself. Can be expanded to contain a given coord. Has a method to call the above iterator using the defined cuboid.
Closes #4595
Also update plugins to use
plant_typeenum attrs, since we're removing thecuboidstruct fromplugins/plant.cppin this PR anyway.