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

Allow Adding already-packed Rectangles to be added as-is to a packer #2

Open
Raildex opened this issue Dec 8, 2022 · 0 comments
Open

Comments

@Raildex
Copy link

Raildex commented Dec 8, 2022

Scenario:
I want to pack polygon Texture Coordinates.

For that I go through each polygon and return the packed rectangle's absolute pixel rectangle coordinates back to the polygon and are later transformed to UV coordinates by dividing by the dimensions of the resulting bounds later.

However, since I do not know how many rectangles I am about to pack, I can't have a "upper limit" for the bounds. For this reason, I would welcome a method to add a List<PackedRectangle> to an already existing Packer which just adds the Packed Rectangles to the packer's internal list. (if the rectangles do not fit because the bounds are too small, just throw an exception?)

This way, The Bounds can grow without invalidating previous packed rectangles.

image

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