- #ifndef _VEC_H
- #define _VEC_H
-
- #include "spoly.h"
-
- #include <string>
- #include <vector>
- class Vec {
- private:
- public:
- std::vector<SPoly*> faces;
- 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);
- void sub(Vec a);
- void add(Vec& a);
- void sub(Vec& a);
- Vec operator-(Vec& v);
- Vec operator*(float s);
- Vec operator*(Vec& s);
- Vec operator/(float s);
- float angle(Vec& v);
- float dotP(Vec& v);
- Vec cross(Vec& v);
- Vec normalize();
- float length();
- void print();
- Vec* clone();
- void vardump(std::string whitespace);
- void registerFace(SPoly* p);
- };
- #endif