#ifndef VEC4_H
#define VEC4_H

#include "Vec.h"

namespace Salamander
{

/*
** A Four-Dimensional implementation of a vector. Defines no additional operators.
*/

class Vec4 : public Vec<Vec4>
{
public:
	Vec4(double x = 0.0f, 
		 double y = 0.0f,
		 double z = 0.0f,
		 double w = 0.0f);
	virtual ~Vec4();

public:
	// Comparison Operators
	virtual bool operator== (const Vec4& v);	// Equals
	virtual bool operator!= (const Vec4& v);	// Does not equal

	// Unary Operators
	Vec4 operator-();			// Negate

	// Scalar Operators
	Vec4 operator* (double s);	// Scalar multiply
	Vec4 operator/ (double s);	// Scalar divide

	// Vector Operators
	Vec4 operator+ (const Vec4& v);		// Component add
	Vec4 operator- (const Vec4& v);		// Component subtract
	double operator* (const Vec4& v);	// Dot product
	Vec4 operator/ (const Vec4& v);		// Component divide

	// Additive Operators
	Vec4& operator*= (double s);	// Scalar multiply increment
	Vec4& operator/= (double s);	// Scalar divide increment
	Vec4& operator+= (const Vec4& v);	// Vector increment
	Vec4& operator-= (const Vec4& v);	// Vector decrement

	// Properties
	double length();
	double lengthSquared();

	// Other operations
	Vec4& normalise();		// Normalise this vector
	Vec4 normal();			// Return a normalised copy

public:
	double x_, y_, z_, w_;

};

}
#endif // VEC4_H


