Skip to content

Give more control over quadtree elements #46

Open
@fluffynukeit

Description

@fluffynukeit

Hi. Thanks for this awesome library. Having a map loader with a built-in quad tree is really convenient. It would be nice to have more control over the quad's elements, though.

For instance, I'd like to be able to only add objects from a particular layer instead of all layers (or arbitrary combinations of layers/objects). I suppose I can do this now by using QuadTreeRoot directly, but I'd be ignoring the UpdateQuadTree and QueryQuadTree methods, which aren't strictly necessary.

Also nice would be using the quad tree class for anything providing a GetAABB method, not just Map Objects. For instance, I'd love to double dip and use it for tracking projectiles, for instance.

I think both of these can be resolved by breaking out the quad tree implementation into a template. It's arguable whether or not the MapLoader member functions should remain or be removed in favor of using the QuadTree directly.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions