for (final int index : _meshManager.getIndices()) {
indexBuffer.put(index);
}
mesh.getMeshData().setIndices(indexBuffer);
final VertGroupData groupData = new VertGroupData();
// set all smooth groups to use "blend as long as UVs and SmoothGroup are same".
for (final long group : groups) {
groupData.setGroupConditions(group, EnumSet.of(MatchCondition.UVs));
}
// set the "no smooth" smooth group to use "blend only if vertex is same". (No color data in obj, so
// ignoring)
groupData.setVertGroups(vertGroups);
groupData.setGroupConditions(VertGroupData.DEFAULT_GROUP,
EnumSet.of(MatchCondition.Normal, MatchCondition.UVs));
GeometryTool.minimizeVerts(mesh, groupData);
applyCurrentMaterial(mesh);
mapToGroups(mesh);