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:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -568,6 +568,8 @@ osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxNode(
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (bEmpty)
|
||||
|
||||
Reference in New Issue
Block a user