// VTR.H #ifndef VTR_H #define VTR_H #include "dgtd-performance.hpp" class vtr { friend fp_t dotP(vtr, vtr); friend fp_t Length(vtr); friend fp_t Determinant(vtr, vtr, vtr); private: fp_t x, y, z; public: // constructor explicit vtr (fp_t =0.0, fp_t =0.0, fp_t =0.0); // operators vtr operator+(const vtr &) const; vtr operator-(const vtr &) const; vtr operator*(const vtr &) const; vtr operator*(const fp_t &) const; vtr operator/(const fp_t &) const; int operator==(const vtr &) const; int operator!=(const vtr &) const; int operator>(const vtr &) const; int operator<(const vtr &) const; vtr& operator=(const vtr &); // set functions void setvtr(fp_t, fp_t, fp_t); void reset(); void unitvtr(); void addvtr(fp_t = 0.0, fp_t = 0.0, fp_t = 0.0); void subvtr(fp_t = 0.0, fp_t = 0.0, fp_t = 0.0); void Scale(fp_t = 1.0); void negate(); // get functions fp_t getx() const; fp_t gety() const; fp_t getz() const; fp_t magnitude(); fp_t magSquare(); // print void print(); }; // added by MV 05/27/03 fp_t findArea( vtr *ndArray, int ndNum ); fp_t triArea( vtr nd0, vtr nd1, vtr nd2 ); #endif