Ok... i finally figured it out and made a fool out of myself in the process.
The way in which core::map uses the < operator is inconsistent with the vector3df use of the operator.
For example compare (as in <, >) the following vectors : (1, 0, -1) ? (-1, 1, 0)
Obviously (1, 0, -1) < (-1, 1, 0) won't cut it.
Neither will (1, 0, -1) > (-1, 1, 0).
Case closed.
My dumbass solution:
1) Open vector3d.h
2) First of all, for the sake of consistency add these functions:
Code: Select all
bool ltAll(const vector3d<T>&other) const {
return X<other.X && Y<other.Y && Z<other.Z;
}
bool gtAll(const vector3d<T>&other) const {
return X>other.X && Y>other.Y && Z>other.Z;
}
Code: Select all
bool operator<(const vector3d<T>&other) const {
return X<other.X ||
(X==other.X && Y<other.Y) ||
(X==other.X && Y==other.Y && Z<other.Z);
}
//Actually this operator is not used in core::map so it's not really needed
bool operator>(const vector3d<T>&other) const {
return X>other.X ||
(X==other.X && Y>other.Y) ||
(X==other.X && Y==other.Y && Z>other.Z);
}
Again, I personally NEED this solution because I NEED to get access to the EXACT vertices that I exported.
I do wonder:
If you import, then use the IMeshWriter, then import again, then use the IMeshWriter, etc... how many times will the vertices be duplicated ?