Commit 2d463f33 by Philipp Adolf

Move Edge to vertex.h

parent 07f07b7a
......@@ -125,21 +125,6 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
}
}
struct Edge {
unsigned int a;
unsigned int b;
friend bool operator<(const Edge &l, const Edge &r) {
if (l.a < r.a) {
return true;
} else if (l.a > r.a) {
return false;
} else {
return l.b < r.b;
}
}
};
/**
* @brief Subdivision::precomputeTables
* @param mesh
......
......@@ -26,6 +26,33 @@ struct Vertex
};
#pragma pack(pop)
QDebug operator<< (QDebug d, const Vertex &v);
struct Edge {
unsigned int a;
unsigned int b;
Edge(unsigned int u, unsigned int v){
a = u;
b = v;
}
Edge(){
a = 0;
b = 0;
}
friend bool operator<(const Edge &l, const Edge &r) {
if (l.a < r.a) {
return true;
} else if (l.a > r.a) {
return false;
} else {
return l.b < r.b;
}
}
};
QDebug operator<< (QDebug d, const Vertex &v);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment