Restore merging of near-identical vertices for JoinIdenticalVertices (#6278)
* Restore merging of near-identical vertices for JoinIdenticalVertices --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
@@ -183,29 +183,6 @@ struct Vertex {
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator < (const Vertex & o) const {
|
||||
if (position < o.position) return true;
|
||||
if (position != o.position) return false;
|
||||
|
||||
if (normal < o.normal) return true;
|
||||
if (normal != o.normal) return false;
|
||||
|
||||
for (uint32_t i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; i ++) {
|
||||
if (texcoords[i] < o.texcoords[i]) return true;
|
||||
if (texcoords[i] != o.texcoords[i]) return false;
|
||||
}
|
||||
|
||||
// note that tangent/bitangent are not checked since they are optional
|
||||
|
||||
for (uint32_t i = 0; i < AI_MAX_NUMBER_OF_COLOR_SETS; i ++) {
|
||||
if (colors[i] < o.colors[i]) return true;
|
||||
if (colors[i] != o.colors[i]) return false;
|
||||
}
|
||||
|
||||
// if reached this point, they are equal
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/// Convert back to non-interleaved storage
|
||||
void SortBack(aiMesh* out, unsigned int idx) const {
|
||||
|
||||
Reference in New Issue
Block a user