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

Bounding box in level storage #89

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JetteSchumann
Copy link
Member

This PR provides a method to compute the bounding box based on the current entities in the level storage (line segments, special areas and agents). The method should simplify implementations that require a grid in the world (e.g. floodfill).

The bounding box is not stored/maintained in the level storage and must be explicitly called if required.

Please note: I am not sure about the most efficient way to use std function to find the min/max. Since different data structures have to be searched, I decided to collect all coordinates and then find the min/max at the end.

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

Successfully merging this pull request may close these issues.

2 participants