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

New obstacle class that has many obstacles of same type? #141

Open
Datseris opened this issue Sep 7, 2018 · 0 comments
Open

New obstacle class that has many obstacles of same type? #141

Datseris opened this issue Sep 7, 2018 · 0 comments
Labels
decision We must decide if and how should this be done documentation Needs documentation, or requires change in current documentation hard new billiard performance Will improve performance tests This issue/PR needs tests

Comments

@Datseris
Copy link
Member

Datseris commented Sep 7, 2018

So, let's say a user wants to create hundredths of disks in a billiard. Currently this will make a tuple of this amount of obstacles. Maybe that is not super performant since the tuple is parameterized for each individual entry, even if they are the same.

I propose to create a new struct, ObstacleVector{O, T} that is parameterized on an obstacle O and the number type.

For this to work we simply have to propagate the collision time methods to simply loop over all obstacles in the vector. The same for distance, etc etc.

The only difficulty is that this messes with the obstacle index i. Because when you write i, tmin = next_collision(bd, p) what will i be? The billiard can have some wall obstacles and an ObstacleVector obstacle. How to do this?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Datseris Datseris added enhancement hard new billiard performance Will improve performance documentation Needs documentation, or requires change in current documentation low priority tests This issue/PR needs tests decision We must decide if and how should this be done and removed enhancement low priority labels Sep 7, 2018
@Datseris Datseris added this to the 3.0 milestone Sep 19, 2018
@Datseris Datseris removed this from the 3.0 milestone Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision We must decide if and how should this be done documentation Needs documentation, or requires change in current documentation hard new billiard performance Will improve performance tests This issue/PR needs tests
Projects
None yet
Development

No branches or pull requests

1 participant