Fixed warnings

This commit is contained in:
Robert Osfield
2011-01-25 16:48:53 +00:00
parent f20bebe52e
commit 9bb86b5534
7 changed files with 9 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ WriterCompareTriangle::operator()(const std::pair<Triangle, int>& t1,
int val2 = inWhichBox(x2,y2,z2);
return (val1 < val2);
};
}
void
WriterCompareTriangle::setMaxMin(unsigned int& nbVerticesX,

View File

@@ -17,7 +17,6 @@ FbxMaterialToOsgStateSet::convert(const KFbxSurfaceMaterial* pFbxMat)
FbxMaterialMap::const_iterator it = _fbxMaterialMap.find(pFbxMat);
if (it != _fbxMaterialMap.end())
return it->second;
static int nbMat = 0;
osg::ref_ptr<osg::Material> pOsgMat = new osg::Material;
pOsgMat->setName(pFbxMat->GetName());

View File

@@ -62,7 +62,7 @@ struct StateSetContent
DIFFUSE_TEXTURE_UNIT = 0,
OPACITY_TEXTURE_UNIT,
REFLECTION_TEXTURE_UNIT,
EMISSIVE_TEXTURE_UNIT,
EMISSIVE_TEXTURE_UNIT
// more texture units here...
};
};

View File

@@ -344,7 +344,7 @@ void readFbxRotationAnimation(osgAnimation::Channel* channels[3],
}
else
{
char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z};
const char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z};
fbxDouble3 fbxPropValue = pNode->LclRotation.Get();
fbxPropValue[0] = osg::DegreesToRadians(fbxPropValue[0]);
@@ -472,9 +472,8 @@ std::string OsgFbxReader::readFbxAnimation(KFbxNode* pNode, const char* targetNa
for (int j = 0; j < nbAnimLayers; j++)
{
KFbxAnimLayer* pAnimLayer = pAnimStack->GetMember(FBX_TYPE(KFbxAnimLayer), j);
if (osgAnimation::Animation* pAnimation = ::readFbxAnimation(
pNode, pAnimLayer, pTakeName, targetName, pAnimationManager))
osgAnimation::Animation* pAnimation = ::readFbxAnimation(pNode, pAnimLayer, pTakeName, targetName, pAnimationManager);
if (pAnimation)
{
result = targetName;
}

View File

@@ -725,7 +725,7 @@ osgDB::ReaderWriter::ReadResult OsgFbxReader::readMesh(
{
geomType = GEOMETRY_RIG;
}
else if (nMorphShapeCount = fbxMesh->GetShapeCount())
else if ((nMorphShapeCount = fbxMesh->GetShapeCount()))
{
geomType = GEOMETRY_MORPH;
}

View File

@@ -216,7 +216,7 @@ void readRotationElement(KFbxTypedProperty<fbxDouble3>& prop,
}
else
{
char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z};
const char* curveNames[3] = {KFCURVENODE_R_X, KFCURVENODE_R_Y, KFCURVENODE_R_Z};
osg::Vec3 axes[3] = {osg::Vec3(1,0,0), osg::Vec3(0,1,0), osg::Vec3(0,0,1)};
fbxDouble3 fbxPropValue = prop.Get();

View File

@@ -50,9 +50,9 @@ public:
fbxMaterialToOsgStateSet(fbxMaterialToOsgStateSet1),
fbxSkeletons(fbxSkeletons1),
options(options1),
authoringTool(authoringTool1),
lightmapTextures(lightmapTextures1),
tessellatePolygons(tessellatePolygons1)
tessellatePolygons(tessellatePolygons1),
authoringTool(authoringTool1)
{}
osgDB::ReaderWriter::ReadResult readFbxNode(