#ifndef _VEC_H #define _VEC_H #include "spoly.h" #include <string> #include <vector> class Vec { private: std::vector<SPoly*> faces; public: float c[3]; Vec(); 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(); void vardump(std::string whitespace); void registerFace(SPoly* p); }; #endif