#ifndef TXS_VERTEX_GUARD #define TXS_VERTEX_GUARD #include using namespace std; #include "../ADFCreator_debug_flags.h" #include "../mathlib/mathlib.h" // Don't #include TxsFace.h namespace TXS { class TxsFace; class TxsVertex { private: Point p; /* * A list of faces which are using this vertex. */ list incidentFaces; Vector avgNormal; public: TxsVertex(const Point &p) { this->p = p; } /* * TxsVertex is NOT responsible for freeing f */ void addIncidentFace(TxsFace* f) { this->incidentFaces.push_back(f); } list getIncidentFaces() { return this->incidentFaces; } list &getIncidentFacesRef() { return this->incidentFaces; } int getNumIncidentFaces() { return (int)this->incidentFaces.size(); } Point getPoint() { return this->p; } /* * call this when all incident faces have been collected */ void calcAvgNormal(); Vector getAvgNormal() { return this->avgNormal; } }; } #endif /* TXS_VERTEX_GUARD */