#pragma once

#include <d3dx9math.h>

struct DXVector4
{
	float x;
	float y;
	float z;
	float w;

	DXVector4() {}
	DXVector4(const float _x, const float _y, const float _z, const float _w);
	DXVector4(const float* const v);
	DXVector4(const DXVector4 &v);

	//casting
	operator float* ();
	operator const float* () const;
	operator D3DXVECTOR4* ();
	operator const D3DXVECTOR4* () const;
	operator D3DXVECTOR4 () const;

    // assignment operators
    DXVector4& operator += (const DXVector4&);
    DXVector4& operator -= (const DXVector4&);
    DXVector4& operator *= (const float);
    DXVector4& operator /= (const float);

    // unary operators
    DXVector4 operator + () const;
    DXVector4 operator - () const;

    // binary operators
    DXVector4 operator + (const DXVector4&) const;
    DXVector4 operator - (const DXVector4&) const;
    DXVector4 operator * (float) const;
    DXVector4 operator / (float) const;

    friend DXVector4 operator * (float, const DXVector4&);

    bool operator == (const DXVector4&) const;
    bool operator != (const DXVector4&) const;
};

#include "DXVector4.inl"
