MetaField.h 467 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // Created by jovian on 09/10/17.
  3. //
  4. #ifndef METABALLVISUALIZER_METAFIELD_H
  5. #define METABALLVISUALIZER_METAFIELD_H
  6. #include "../constantes.h"
  7. struct MetaBall
  8. {
  9. int x;
  10. int y;
  11. float power;
  12. };
  13. class MetaField {
  14. public:
  15. MetaField();
  16. void clean();
  17. void binary(bool mat[WIN_H][WIN_W], float ceil);
  18. void disturb(int y, int x, float weight = 1.0);
  19. protected:
  20. float m_field[WIN_H][WIN_W];
  21. };
  22. #endif //METABALLVISUALIZER_METAFIELD_H