#pragma once

#define scd static constexpr double

class physics
{
public:
	scd GRAVITY = 1200.0;
	scd RESTITUTION = 0.6;
	scd AIR_DRAG = 0.999;
	scd GROUND_FRICTION = 0.8;
	scd REST_THRESHOLD = 5.0;

	physics();
	physics(double x, double y, double vx = 0.0, double vy = 0.0);
	void update(double dt, int screenW, int screenH, int objW, int objH);

	// getters / setters
	double x() const { return m_x; }
	double y() const { return m_y; }
	double vx() const { return m_vx; }
	double vy() const { return m_vy;  }
	void setPos(double x, double y);
	void setVelocity(double vx, double vy);
	void resetVelocity();

private:
	double m_x, m_y;
	double m_vx, m_vy;
};

