C++ (Qt)uint qHash(const QVector3D &val){ float f[3] = { val.x(), val.y(), val.z() }; uint32 * dummy = (uint32 *) f; return dummy[0] ^ dummy[1] ^ dummy[2];}
return (dummy[0] * A) ^ (dummy[1] * B) ^ (dummy[2] * C);
C++ (Qt)bool comp(QVector3D &a, QVector3D &b) { if (a.x() < b.x()) return true; if (a.x() > b.x()) return false; if (a.y() < y.x()) return true; if (a.y() > y.x()) return false; return a.z() < b.z();}
C++ (Qt) if (a.x() < b.x()) return true; if (a.x() > b.x()) return false; if (a.y() < b.y()) return true; if (a.y() > b.y()) return false;