feat: add support for drawing velocity vectors

This commit is contained in:
2024-11-26 00:08:19 +01:00
parent c4ef11f38e
commit 4dae604485
4 changed files with 36 additions and 1 deletions

View File

@@ -51,8 +51,11 @@ struct Screen {
~Screen() { delete[] buf; }
std::vector<const vec<2>*> points;
std::vector<std::pair<const vec<2>*,const vec<2>*>> vecs;
char_shader_t shader;
bool draw_vecs = true;
private:
Symbol *buf;
Symbol _dummy;

View File

@@ -132,6 +132,7 @@ struct Particle : public Agent<vec<N>> {
}
const vec<N> &get_position() const { return position; };
const vec<N> &get_velocity() const { return velocity; };
private:
A alg;