#ifndef _COMMON_VECTOR_HPP_
#define _COMMON_VECTOR_HPP_
#ifndef _COMMON_MATH_HPP_
#include <common/math.hpp>
#endif
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif

class Vector
{
public:
	Vector(void);
	Vector(float x,float y,float z);
	Vector(const Vector &someVector);
	virtual ~Vector();
	float x(void)const;
	float y(void)const;
	float z(void)const;
	void x(float x);
	void y(float y);
	void z(float z);
	WORD operator==(const Vector &someVector)const;
	Vector &operator=(const Vector &someVector);
	Vector &operator-=(const Vector &someVector);
	operator Point3D(void)const;
private:
	float mx;
	float my;
	float mz;
};

inline
Vector::Vector(void)
: mx(0.00), my(0.00), mz(0.00)
{
}

inline
Vector::Vector(float x,float y,float z)
: mx(x), my(y), mz(z)
{
}

inline
Vector::Vector(const Vector &someVector)
: mx(someVector.mx), my(someVector.my), mz(someVector.mz)
{
}

inline
Vector::~Vector()
{
}

inline
float Vector::x(void)const
{
	return mx;
}

inline
float Vector::y(void)const
{
	return my;
}

inline
float Vector::z(void)const
{
	return mz;
}

inline
void Vector::x(float newz)
{
	mx=newz;
}

inline
void Vector::y(float newz)
{
	my=newz;
}

inline
void Vector::z(float newz)
{
	mz=newz;
}

inline
WORD Vector::operator==(const Vector &someVector)const
{
	return (mx==someVector.mx&&
					my==someVector.my&&
					mz==someVector.mz);
}

inline
Vector &Vector::operator=(const Vector &someVector)
{
	mx=someVector.mx;
	my=someVector.my;
	mz=someVector.mz;
	return *this;
}

inline
Vector &Vector::operator-=(const Vector &someVector)
{
	mx-=someVector.mx;
	my-=someVector.my;
	mz-=someVector.mz;
 return *this;
}

inline
Vector::operator Point3D(void)const
{
  return Point3D(mx,my,mz);
}
#endif
