Skip to content

AxisAlignedBB builder #97

@dktapps

Description

@dktapps

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions