qparticle.h 569 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef QPARTICLE_H
  2. #define QPARTICLE_H
  3. #include <QVector2D>
  4. #include <QObject>
  5. #define KZEROVELOCITY 0.45
  6. class QParticle
  7. {
  8. public:
  9. explicit QParticle(const QVector2D & position, qreal aMass = 0.1f);
  10. explicit QParticle(qreal aMass = 0.1f);
  11. void setMass(qreal massInKg);
  12. float FastVelocityLength() const;
  13. signals:
  14. public slots:
  15. public:
  16. bool zeroVelocity(bool dontNull);
  17. public:
  18. qreal InvertMass;
  19. QVector2D Velocity;
  20. QVector2D Force;
  21. QVector2D Position;
  22. };
  23. #endif // QPARTICLE_H