/*
 * (C) Copyright Chris B. Kaynor 2006
 * All Rights Reserved.
 *
 * CONTACT: chris@kaynor.net
*/

#ifndef CBK_VECTOR_H
#define CBK_VECTOR_H

#include "Settings.h"
#include "Macros.h"

class cbk_vector {
public:
	cbk_vector(GLfloat value1, GLfloat value2, GLfloat value3);
	cbk_vector(GLfloat *values);
	cbk_vector(void);

	GLfloat GetValue(unsigned int ValueID);
	cbk_vector SetValue(cbk_vector Value);
	cbk_vector SetValue(unsigned int ValueID, GLfloat Value);
	cbk_vector SetValue(GLfloat Value1, GLfloat Value2, GLfloat Value3);

	GLfloat operator*(cbk_vector Input); //Dot product operator

	cbk_vector operator+(cbk_vector Input); //Item-based addition
	cbk_vector operator-(cbk_vector Input); //Item-based substration
	void operator+=(cbk_vector Input); //Item-based addition
	void operator-=(cbk_vector Input); //Item-based substration

	void operator*=(GLfloat Input); //Item-based multiplation, with a scaler
	cbk_vector operator*(GLfloat Input); //Item-based multiplation, with a scaler
	void operator/=(GLfloat Input); //Item-based division, with a scaler
	cbk_vector operator/(GLfloat Input); //Item-based division, with a scaler

	GLfloat operator~(); //Returns the magitude of the vector (dot product of it and itself).

	GLfloat GetMagitude();

private:
	GLfloat c_value1;
	GLfloat c_value2;
	GLfloat c_value3;
};

#endif /* CBK_OBJECT_DATA_H */
