From Roland Smeenk, "I took a quick look at the warnings and they contain nothing serious.

Attached you will find updates of the files to hopefully solve the warnings (in VS2005 only one warning occured). In addition I fixed a tiny bug that caused a crash with one of my test files."
This commit is contained in:
Robert Osfield
2010-03-04 12:57:24 +00:00
parent 4282b284e5
commit 225d99c5f1
6 changed files with 25 additions and 20 deletions

View File

@@ -671,9 +671,8 @@ daeReader::ChannelPart* daeReader::processSampler(domChannel* pDomChannel, Sourc
}
//work around for files output by the Autodesk FBX converter.
if (interpolationType == INTERPOLATION_BEZIER &&
_authoringTool == FBX_CONVERTER ||
_authoringTool == MAYA)
if ((interpolationType == INTERPOLATION_BEZIER) &&
(_authoringTool == FBX_CONVERTER || _authoringTool == MAYA))
{
interpolationType = INTERPOLATION_HERMITE;
}
@@ -717,6 +716,8 @@ daeReader::ChannelPart* daeReader::processSampler(domChannel* pDomChannel, Sourc
sources[output_outtangent_source].getMatrixArray(),
interpolationType);
break;
default:
;// Fall through
}
if (keyframes)

View File

@@ -602,7 +602,7 @@ void processVertices(
// to OpenSceneGraph.
// Why not use a vector? Because a large map of VertexIndices is used and
// allocating vectors for each element would make it a lot slower.
const int MAX_TEXTURE_COORDINATE_SETS = 4;
const unsigned int MAX_TEXTURE_COORDINATE_SETS = 4;
void resolveMeshInputs(
const domInputLocalOffset_Array &inputs,

View File

@@ -839,6 +839,8 @@ osg::Texture::WrapMode getWrapMode(domFx_sampler_wrap_common domWrap)
case FX_SAMPLER_WRAP_COMMON_NONE:
case FX_SAMPLER_WRAP_COMMON_BORDER:
return osg::Texture::CLAMP_TO_BORDER;
default:
;// fall through
}
return osg::Texture::CLAMP;
@@ -852,24 +854,27 @@ osg::Texture::FilterMode getFilterMode(domFx_sampler_filter_common domFilter, bo
return osg::Texture::NEAREST;
case FX_SAMPLER_FILTER_COMMON_LINEAR:
return osg::Texture::LINEAR;
}
if (allowMipMap)
{
switch (domFilter)
{
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_NEAREST:
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_NEAREST:
if (allowMipMap)
return osg::Texture::NEAREST_MIPMAP_NEAREST;
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_NEAREST:
break;
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_NEAREST:
if (allowMipMap)
return osg::Texture::LINEAR_MIPMAP_NEAREST;
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_LINEAR:
break;
case FX_SAMPLER_FILTER_COMMON_NEAREST_MIPMAP_LINEAR:
if (allowMipMap)
return osg::Texture::NEAREST_MIPMAP_LINEAR;
case FX_SAMPLER_FILTER_COMMON_NONE:
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_LINEAR:
break;
case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_LINEAR:
if (allowMipMap)
return osg::Texture::LINEAR_MIPMAP_LINEAR;
}
break;
case FX_SAMPLER_FILTER_COMMON_NONE:
return osg::Texture::NEAREST;
default:
; // Fall through
}
return osg::Texture::LINEAR;
}

View File

@@ -117,7 +117,7 @@ void daeReader::processSkins()
if (pDomSkeletons.getCount() == 0)
{
domNode* skelNode = _skeletonMap.begin()->first;
if (skelNode = findSkeletonNode(skelNode, pDomInstanceController))
if (skelNode == findSkeletonNode(skelNode, pDomInstanceController))
{
skelSkinMap[skelNode].push_back(pDomInstanceController);
}

View File

@@ -138,7 +138,7 @@ osg::Transform* daeReader::processOsgMatrixTransform(domNode *node, bool isBone)
around.normalize();
along *= shear / along.length();
pTransformElement = new osgAnimation::StackedMatrixElement(pDomLookat->getSid() ? pDomLookat->getSid() : "",
pTransformElement = new osgAnimation::StackedMatrixElement(pDomSkew->getSid() ? pDomSkew->getSid() : "",
osg::Matrix(
normal.x() * along.x() + 1.0f, normal.x() * along.y(), normal.x() * along.z(), 0.0f,
normal.y() * along.x(), normal.y() * along.y() + 1.0f, normal.y() * along.z(), 0.0f,

View File

@@ -102,7 +102,6 @@ void daeWriter::writeRigGeometry(osgAnimation::RigGeometry *pOsgRigGeometry)
std::string url = "#" + std::string(pDomGeometry->getId());
pDomSkin->setSource(url.c_str());
domSkin::domBind_shape_matrix* pDomBindShapeMatrix = daeSafeCast< domSkin::domBind_shape_matrix >(pDomSkin->add( COLLADA_ELEMENT_BIND_SHAPE_MATRIX ));
domSource* pDomJointsSource = daeSafeCast< domSource >(pDomSkin->add( COLLADA_ELEMENT_SOURCE ));
std::string skinJointsName = name + "_skin_joints";