if (m.faceMats() > 0){
//List face Materials //TODO USE LOGGERS!!
logger.debug(" Num Face-Materials: " + m.faceMats() );
for( int n = 0; n < m.faceMats(); n++ ){
FaceMat3ds fmat = m.faceMat( n );
logger.debug(" FaceMat ID: " + fmat.matIndex() );
logger.debug(" FaceMat indices: " + fmat.faceIndexes());
int[] faceIndicesForMaterial = fmat.faceIndex();
if (faceIndicesForMaterial.length <= 0){
continue;
}
//Check if there already is a group with the same material
Group group = materialIdToGroup.get(fmat.matIndex());
//If not, create a new group and save it in map
if (group == null){
group = new Group(new Integer(fmat.matIndex()).toString());
materialIdToGroup.put(fmat.matIndex(), group);
}
//Go through all pointers to the faces for this material
//and get the corresponding face
for (int j = 0; j < faceIndicesForMaterial.length; j++) {