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

Grid search data structure #5

Open
Sigmarik opened this issue Feb 27, 2024 · 0 comments
Open

Grid search data structure #5

Sigmarik opened this issue Feb 27, 2024 · 0 comments
Labels
feature Feature request logics Related to the scene management system physics Related to the physics engine

Comments

@Sigmarik
Copy link
Owner

Sigmarik commented Feb 27, 2024

A structure that would improve area-based object handling.

Something like a grid system of the physics engine, but for abstract bounding box - able objects.

Draft:

// `Box T::get_bounding_box() const` should exist
template<class T>
struct Grid {
    Grid(const Box& boundary, const glm::vec3& cell_size);

    void register(const T& object);
    Grid<T>::Iterator request(const Box& search_box);

    void remove(const T& object);

    void prepare_shift(const T& object);
    void process_shifts();
}
@Sigmarik Sigmarik added physics Related to the physics engine logics Related to the scene management system feature Feature request labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request logics Related to the scene management system physics Related to the physics engine
Projects
None yet
Development

No branches or pull requests

1 participant