#pragma once

#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>

namespace kek {

class Object {

public:
	virtual ~Object() {};

	virtual void translate(glm::vec3 delta) = 0;

	virtual void translateX(float delta);

	virtual void translateY(float delta);

	virtual void translateZ(float delta);

	virtual void moveTo(glm::vec3 position) = 0;

	virtual glm::vec3 getPosition() = 0;

};

class DefaultObject: public Object {

protected:
	glm::vec3 position;

public:
	DefaultObject();

	virtual ~DefaultObject() {};

	virtual void translate(glm::vec3 delta);

	virtual void moveTo(glm::vec3 position);

	virtual glm::vec3 getPosition();

};

class RotateableObject: public Object {

public:
	virtual ~RotateableObject() {};

	virtual void rotate(float angle, glm::vec3 axis) = 0;

	virtual void rotateTo(glm::quat rotation) = 0;

	virtual void lookAt(glm::vec3 direction) = 0;

	virtual void lookAtPos(glm::vec3 position);

	virtual glm::quat getRotation() = 0;

};

class DefaultRotateableObject: public RotateableObject, public DefaultObject {

protected:
	glm::quat rotation;

public:
	DefaultRotateableObject();

	virtual ~DefaultRotateableObject() {};

	virtual void rotate(float angle, glm::vec3 axis);

	virtual void rotateTo(glm::quat rotation);

	virtual void lookAt(glm::vec3 direction);

	virtual glm::quat getRotation();

	virtual void translate(glm::vec3 delta) { DefaultObject::translate(delta); }

	virtual void moveTo(glm::vec3 position) { DefaultObject::moveTo(position); };

	virtual glm::vec3 getPosition() { return DefaultObject::getPosition(); };

};

}
