Fixed redundant "enumeration not handled in switch" warnings.

Fixed a warning about a comparison between different enums - EUnifiedMappingType was being compared with EMappingType. In general the FBX SDK is moving away from Get & Set functions to giving direct access to properties, so I have changed GetMappingType() to CurrentMappingType.Get()
This commit is contained in:
Michael PLATINGS
2011-06-21 09:29:32 +00:00
parent 90a88488d3
commit dc123461c7
4 changed files with 11 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ FbxMaterialToOsgStateSet::convert(const KFbxSurfaceMaterial* pFbxMat)
if (lTexture)
{
// support only spherical reflection maps...
if (KFbxFileTexture::eUMT_ENVIRONMENT == lTexture->GetMappingType())
if (KFbxFileTexture::eUMT_ENVIRONMENT == lTexture->CurrentMappingType.Get())
{
result.reflectionTexture = fbxTextureToOsgTexture(lTexture);
result.reflectionChannel = lTexture->UVSet.Get();

View File

@@ -56,6 +56,8 @@ osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxLight(KFbxNode* pNode, int&
switch (fbxLight->DecayType.Get())
{
case KFbxLight::eNONE:
break;
case KFbxLight::eLINEAR:
osgLight->setLinearAttenuation(fbxDecayStart);
break;

View File

@@ -62,6 +62,8 @@ bool layerElementValid(const KFbxLayerElementTemplate<T>* pLayerElement)
case KFbxLayerElement::eDIRECT:
case KFbxLayerElement::eINDEX_TO_DIRECT:
return true;
default:
break;
}
return false;
@@ -85,6 +87,8 @@ int getVertexIndex(const KFbxLayerElementTemplate<T>* pLayerElement,
case KFbxLayerElement::eBY_POLYGON:
index = nPolygon;
break;
default:
OSG_WARN << "getVertexIndex: unsupported FBX mapping mode" << std::endl;
}
if (pLayerElement->GetReferenceMode() == KFbxLayerElement::eDIRECT)
@@ -107,6 +111,8 @@ int getPolygonIndex(const KFbxLayerElementTemplate<T>* pLayerElement, int nPolyg
return nPolygon;
case KFbxLayerElement::eINDEX_TO_DIRECT:
return pLayerElement->GetIndexArray().GetAt(nPolygon);
default:
break;
}
}

View File

@@ -568,6 +568,8 @@ osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxNode(
}
}
break;
default:
break;
}
if (bEmpty)