class VECTOR
{
public:
	float x,y,z;

	VECTOR();
	VECTOR(float x, float y, float z);

	void set(float x, float y, float z);
	void get(float **floatvector);

	VECTOR operator+(VECTOR const &V1);
    VECTOR operator-(VECTOR const &V1);
	VECTOR operator*(VECTOR const &V1);
    VECTOR operator/(VECTOR const &V1);
    VECTOR operator*(float const &c);
	VECTOR operator*(double const &c);   
    VECTOR operator/(float const &c);
	float length();
	float squaredLength();
	void SetLength(float c);
	void normalize();
	float dot(VECTOR V);    
	VECTOR cross(VECTOR V);    
};

class PLANE 
{
public:
	float equation[4];
	VECTOR origin;
	VECTOR normal;

	PLANE(VECTOR origin, VECTOR normal);
	PLANE(VECTOR p1, VECTOR p2, VECTOR p3);

	bool isFrontFacingTo(VECTOR direction);
	double signedDistanceTo(VECTOR point);
};