Skip to content
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

AxisAlignedBB builder #97

Open
dktapps opened this issue Dec 30, 2024 · 0 comments
Open

AxisAlignedBB builder #97

dktapps opened this issue Dec 30, 2024 · 0 comments

Comments

@dktapps
Copy link
Member

dktapps commented Dec 30, 2024

#95 removed mutable methods for AxisAlignedBB.

However, many usages within PM Block classes made use of several chained BB methods together.

It might be worth introducing an AxisAlignedBBBuilder (or an alt name that doesn't have 3 Bs in a row) to avoid this.

Then we could have stuff like (e.g.):

Builder::one()
    ->squash(Axis::X, 7 / 16)
    ->squash(Axis::Z, 7 / 16)
    ->trim(Facing::UP, 1 / 8)
    ->build(); //returns immutable AxisAlignedBB

That being said, I'm not clear if this is actually necessary, performance-wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant