#ifndef VECTOR_H
#define VECTOR_H

#include <d3dUtility.h>

namespace cbk
{
	class Vector
	{
	public:
		Vector(float X = 0.0f, float Y = 0.0f, float Z = 0.0f);
		Vector(const D3DXVECTOR3& vector);

		operator D3DXVECTOR3(void) const;

		bool operator==(const Vector& other) const;
		bool operator!=(const Vector& other) const;

		Vector operator-(void) const;

		Vector operator+(const Vector& other) const;
		Vector operator-(const Vector& other) const;
		Vector operator*(const Vector& other) const;
		Vector operator*(const float& other) const;
		Vector operator/(const Vector& other) const;
		Vector operator/(const float& other) const;

		Vector& operator+=(const Vector& other);
		Vector& operator-=(const Vector& other);
		Vector& operator*=(const Vector& other);
		Vector& operator*=(const float& other);
		Vector& operator/=(const Vector& other);
		Vector& operator/=(const float& other);

		float& operator[](const int id);

		const float distance(const Vector& other) const;
		const float magnitude(void) const;
		Vector& normalize(void);

		const float dot(const Vector& other) const;
		const Vector cross(const Vector& other) const;

		float X;
		float Y;
		float Z;
	};
}

#endif //VECTOR_H