The module isn't the plugin, so it's going to be called simply
"birdoids" going forward.
I've turned it into a folder and a `mod.rs` so I can slap down a small,
custom physics system.
Closes#2
Acceleration is mass * force.
This doesn't materially change anything, but it will make it easier to
give the boids a mass component. The change will not require updates to
most of the systems, only the physics integrator and the boids bundle.
The reubild frequency of the spatial tree was causing calculations to
operate on old information. This is not the intended behavior. The
default schedule seems to be to run every frame.
I also lowered the debug pointer coefficient. Boids moving at a normal
velocity are actually fast enough to draw a meaningful line. Maybe I'll
switch it into some kind of exponential space so small changes are
visible, and big changes don't draw a line all the way across the
screen.
Right-clicking toggles velocity sensing mode and the cursor gets a line
that indicates the average velocity of the targeted points.
There is a coefficient of 50.0 on the pointer magnitude. The boids move
so slowly that the line is very short without this magnification.
There is also something wrong with the math. The boids expand and slow
down, but the velocity vector does not reflect this. It *grows* slightly
and then stays at that size as the boids slowly approach a stop.
When writing the average velocity function, I realized that it is
**exactly** the same as the center of mass function. They're both just
averaging a bunch of points. Both functions are implemented as pass-
through calls to a general purpose Vec2 averaging function.
The `impl Iterator<...>...` *is* actually necessary because of the use
of `map()`s to filter out the boids parts from the spatial tree.
The gizmo currently draws as an annulus with the intention that it is an
area selection tool. These new components will serve as mode selectors
so that different selection modes can be used.
This plugin is meant to have some add-ons to interact with the
simulation to provide insight.
This first change adds a cursor under the mouse with the intention that
it's circle can be used as a reticule for targeting boids. Hovering over
a cluster and getting their CoM or velocities, for example.