#pragma once

#include "gameobject.h"

namespace kek {

class Player: public RotateableObject {

public:
	PlayerPhysicsObjectData *physics;
	bool noclip;
	bool onGround;

	Player();

	virtual void rotate(float angle, glm::vec3 axis) { rotateTo(glm::rotate(getRotation(), angle, axis)); };

	virtual void rotateTo(glm::quat rotation);

	virtual void lookAt(glm::vec3 direction) { rotateTo(glm::quatLookAt(glm::normalize(direction), glm::vec3(0,1,0))); };

	virtual glm::quat getRotation();

	virtual void translate(glm::vec3 delta) { moveTo(getPosition() + delta); };

	virtual void moveTo(glm::vec3 position);

	virtual glm::vec3 getPosition();

	virtual glm::vec3 getEyePosition() { return getPosition() + glm::vec3(0, KEK_PLAYER_EYE_OFFSET, 0); }

	virtual glm::vec3 getFootPosition() { return getPosition() - glm::vec3(0, KEK_PLAYER_HEIGHT / 2, 0); };

};

}
