Skip to content
Snippets Groups Projects
Commit a2e7226f authored by Amorilia's avatar Amorilia
Browse files

Add first vertex in match group to the head of the group, so indices are...

Add first vertex in match group to the head of the group, so indices are consequetive (might have a small performance benefit, and looks more like official nifs).
parent fa008c0e
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,8 @@ void NiTriShapeData::DoMatchDetection() {
/* we may find a valid group for this vertex */
MatchGroup group;
/* this vertex belongs to the group as well */
group.vertexIndices.push_back(i);
// Find all vertices that match this one.
for ( unsigned short j = i + 1; j < vertices.size(); ++j ) {
......@@ -234,10 +236,7 @@ void NiTriShapeData::DoMatchDetection() {
}
/* the currently observed vertex shares a normal with others */
if ( ( group.numVertices = group.vertexIndices.size() ) > 0 ) {
/* this vertex belongs to the group as well */
group.vertexIndices.push_back(i);
if ( ( group.numVertices = group.vertexIndices.size() ) > 1 ) {
/* mark all of the participating vertices to belong to a group */
int groupid = matchGroups.size() + 1;
for ( int n = 0; n < group.numVertices; n++ )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment