Newer
Older
cg / include / vec.h
@ajaggi ajaggi on 28 Dec 2005 450 bytes Moved classes to their own files.
#ifndef _VEC_H
#define _VEC_H
class Vec {
	public:
		float c[3];

		Vec(float vx, float vy, float vz);
		Vec(Vec* v);
		float x();
		float y();
		float z();
		float* getCoords();
		Vec operator+(Vec* v);
		Vec operator+(Vec c);
		void add(Vec& a);
		Vec operator-(Vec& v);
		Vec operator*(float s);
		Vec operator*(Vec& s);
		Vec operator/(float s);
		Vec cross(Vec* v);
		Vec normalize();
		float length();
		void print();
		Vec* clone();
};
#endif