Show
Ignore:
Timestamp:
09/01/14 21:13:35 (7 hours ago)
Author:
robert
Message:

Added DragCallback? class to help dialog dragging support.
Introduced a new Widget::computeExtentsPositionInLocalCoordinates() method that intersects with a ray through mouse pointer and the extents of the widget.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/fbx/fbxRMesh.cpp

    r13041 r13466  
    3434}; 
    3535 
    36 osg::Vec3d convertVec3(const KFbxVector4& v) 
     36osg::Vec3d convertVec3(const FbxVector4& v) 
    3737{ 
    3838    return osg::Vec3d( 
     
    4343 
    4444template <typename T> 
    45 bool layerElementValid(const KFbxLayerElementTemplate<T>* pLayerElement) 
     45bool layerElementValid(const FbxLayerElementTemplate<T>* pLayerElement) 
    4646{ 
    4747    if (!pLayerElement) 
     
    5050    switch (pLayerElement->GetMappingMode()) 
    5151    { 
    52     case KFbxLayerElement::eBY_CONTROL_POINT: 
    53     case KFbxLayerElement::eBY_POLYGON_VERTEX: 
    54     case KFbxLayerElement::eBY_POLYGON: 
     52    case FbxLayerElement::eByControlPoint: 
     53    case FbxLayerElement::eByPolygonVertex: 
     54    case FbxLayerElement::eByPolygon: 
    5555        break; 
    5656    default: 
     
    6060    switch (pLayerElement->GetReferenceMode()) 
    6161    { 
    62     case KFbxLayerElement::eDIRECT: 
    63     case KFbxLayerElement::eINDEX_TO_DIRECT: 
     62    case FbxLayerElement::eDirect: 
     63    case FbxLayerElement::eIndexToDirect: 
    6464        return true; 
    6565    default: 
     
    7171 
    7272template <typename T> 
    73 int getVertexIndex(const KFbxLayerElementTemplate<T>* pLayerElement, 
    74     const KFbxMesh* fbxMesh, 
     73int getVertexIndex(const FbxLayerElementTemplate<T>* pLayerElement, 
     74    const FbxMesh* fbxMesh, 
    7575    int nPolygon, int nPolyVertex, int nMeshVertex) 
    7676{ 
     
    7979    switch (pLayerElement->GetMappingMode()) 
    8080    { 
    81     case KFbxLayerElement::eBY_CONTROL_POINT: 
     81    case FbxLayerElement::eByControlPoint: 
    8282        index = fbxMesh->GetPolygonVertex(nPolygon, nPolyVertex); 
    8383        break; 
    84     case KFbxLayerElement::eBY_POLYGON_VERTEX: 
     84    case FbxLayerElement::eByPolygonVertex: 
    8585        index = nMeshVertex; 
    8686        break; 
    87     case KFbxLayerElement::eBY_POLYGON: 
     87    case FbxLayerElement::eByPolygon: 
    8888        index = nPolygon; 
    8989        break; 
     
    9292    } 
    9393 
    94     if (pLayerElement->GetReferenceMode() == KFbxLayerElement::eDIRECT) 
     94    if (pLayerElement->GetReferenceMode() == FbxLayerElement::eDirect) 
    9595    { 
    9696        return index; 
     
    101101 
    102102template <typename T> 
    103 int getPolygonIndex(const KFbxLayerElementTemplate<T>* pLayerElement, int nPolygon) 
     103int getPolygonIndex(const FbxLayerElementTemplate<T>* pLayerElement, int nPolygon) 
    104104{ 
    105105    if (pLayerElement && 
    106         pLayerElement->GetMappingMode() == KFbxLayerElement::eBY_POLYGON) 
     106        pLayerElement->GetMappingMode() == FbxLayerElement::eByPolygon) 
    107107    { 
    108108        switch (pLayerElement->GetReferenceMode()) 
    109109        { 
    110         case KFbxLayerElement::eDIRECT: 
     110        case FbxLayerElement::eDirect: 
    111111            return nPolygon; 
    112         case KFbxLayerElement::eINDEX_TO_DIRECT: 
     112        case FbxLayerElement::eIndexToDirect: 
    113113            return pLayerElement->GetIndexArray().GetAt(nPolygon); 
    114114        default: 
     
    121121 
    122122template <typename FbxT> 
    123 FbxT getElement(const KFbxLayerElementTemplate<FbxT>* pLayerElement, 
    124     const KFbxMesh* fbxMesh, 
     123FbxT getElement(const FbxLayerElementTemplate<FbxT>* pLayerElement, 
     124    const FbxMesh* fbxMesh, 
    125125    int nPolygon, int nPolyVertex, int nMeshVertex) 
    126126{ 
     
    362362} 
    363363 
    364 void readAnimation(KFbxNode* pNode, KFbxScene& fbxScene, const std::string& targetName, 
     364void readAnimation(FbxNode* pNode, FbxScene& fbxScene, const std::string& targetName, 
    365365    osg::ref_ptr<osgAnimation::AnimationManagerBase>& pAnimationManager, 
    366     KFbxMesh* pMesh, int nBlendShape, int nBlendShapeChannel, int nShape) 
    367 { 
    368     for (int i = 0; i < fbxScene.GetSrcObjectCount(FBX_TYPE(KFbxAnimStack)); ++i) 
    369     { 
    370         KFbxAnimStack* pAnimStack = KFbxCast<KFbxAnimStack>(fbxScene.GetSrcObject(FBX_TYPE(KFbxAnimStack), i)); 
    371  
    372         int nbAnimLayers = pAnimStack->GetMemberCount(FBX_TYPE(KFbxAnimLayer)); 
     366    FbxMesh* pMesh, int nBlendShape, int nBlendShapeChannel, int nShape) 
     367{ 
     368    for (int i = 0; i < fbxScene.GetSrcObjectCount<FbxAnimStack>(); ++i) 
     369    { 
     370        FbxAnimStack* pAnimStack = FbxCast<FbxAnimStack>(fbxScene.GetSrcObject<FbxAnimStack>(i)); 
     371 
     372        int nbAnimLayers = pAnimStack->GetMemberCount<FbxAnimLayer>(); 
    373373 
    374374        const char* pTakeName = pAnimStack->GetName(); 
     
    379379        for (int j = 0; j < nbAnimLayers; j++) 
    380380        { 
    381             KFbxAnimLayer* pAnimLayer = pAnimStack->GetMember(FBX_TYPE(KFbxAnimLayer), j); 
    382  
    383             KFbxAnimCurve* pCurve = pMesh->GetShapeChannel(nBlendShape, nBlendShapeChannel, pAnimLayer, false); 
     381            FbxAnimLayer* pAnimLayer = pAnimStack->GetMember<FbxAnimLayer>(j); 
     382 
     383            FbxAnimCurve* pCurve = pMesh->GetShapeChannel(nBlendShape, nBlendShapeChannel, pAnimLayer, false); 
    384384 
    385385            if (!pCurve) 
     
    399399            for (int k = 0; k < nKeys; ++k) 
    400400            { 
    401                 KFbxAnimCurveKey key = pCurve->KeyGet(k); 
     401                FbxAnimCurveKey key = pCurve->KeyGet(k); 
    402402                double fTime = key.GetTime().GetSecondDouble(); 
    403403                float fValue = static_cast<float>(key.GetValue() * 0.01); 
     
    416416void addBindMatrix( 
    417417    BindMatrixMap& boneBindMatrices, 
    418     KFbxNode* pBone, 
     418    FbxNode* pBone, 
    419419    const osg::Matrix& bindMatrix, 
    420420    osgAnimation::RigGeometry* pRigGeometry) 
     
    424424} 
    425425 
    426 void addVec2ArrayElement(osg::Array& a, const KFbxVector2& v) 
     426void addVec2ArrayElement(osg::Array& a, const FbxVector2& v) 
    427427{ 
    428428    if (a.getType() == osg::Array::Vec2dArrayType) 
     
    438438} 
    439439 
    440 void addVec3ArrayElement(osg::Array& a, const KFbxVector4& v) 
     440void addVec3ArrayElement(osg::Array& a, const FbxVector4& v) 
    441441{ 
    442442    if (a.getType() == osg::Array::Vec3dArrayType) 
     
    453453} 
    454454 
    455 void addColorArrayElement(osg::Array& a, const KFbxColor& c) 
     455void addColorArrayElement(osg::Array& a, const FbxColor& c) 
    456456{ 
    457457    if (a.getType() == osg::Array::Vec4dArrayType) 
     
    476476    for (unsigned int i = 0; i < stateSetList.size(); i++) 
    477477    { 
    478         if (0 == strcmp(pName, KFbxSurfaceMaterial::sDiffuse)) 
     478        if (0 == strcmp(pName, FbxSurfaceMaterial::sDiffuse)) 
    479479            return stateSetList[i].diffuseChannel; 
    480         if (0 == strcmp(pName, KFbxSurfaceMaterial::sTransparentColor)) 
     480        if (0 == strcmp(pName, FbxSurfaceMaterial::sTransparentColor)) 
    481481            return stateSetList[i].opacityChannel; 
    482         if (0 == strcmp(pName, KFbxSurfaceMaterial::sReflection)) 
     482        if (0 == strcmp(pName, FbxSurfaceMaterial::sReflection)) 
    483483            return stateSetList[i].reflectionChannel; 
    484         if (0 == strcmp(pName, KFbxSurfaceMaterial::sEmissive)) 
     484        if (0 == strcmp(pName, FbxSurfaceMaterial::sEmissive)) 
    485485            return stateSetList[i].emissiveChannel; 
    486486        // more here... 
     
    491491 
    492492// scans mesh layers looking for the UV element corresponding to the specified channel name... 
    493 const KFbxLayerElementUV* getUVElementForChannel(std::string uvChannelName, 
    494     KFbxLayerElement::ELayerElementType elementType, KFbxMesh* pFbxMesh) 
     493const FbxLayerElementUV* getUVElementForChannel(std::string uvChannelName, 
     494    FbxLayerElement::EType elementType, FbxMesh* pFbxMesh) 
    495495{ 
    496496    // scan layers for specified UV channel... 
    497497    for (int cLayerIndex = 0; cLayerIndex < pFbxMesh->GetLayerCount(); cLayerIndex++) 
    498498    { 
    499         const KFbxLayer* pFbxLayer = pFbxMesh->GetLayer(cLayerIndex); 
     499        const FbxLayer* pFbxLayer = pFbxMesh->GetLayer(cLayerIndex); 
    500500        if (!pFbxLayer) 
    501501            continue; 
    502502 
    503         if (const KFbxLayerElementUV* uv = pFbxLayer->GetUVs()) 
     503        if (const FbxLayerElementUV* uv = pFbxLayer->GetUVs()) 
    504504        { 
    505505            if (0 == uvChannelName.compare(uv->GetName())) 
     
    510510    for (int cLayerIndex = 0; cLayerIndex < pFbxMesh->GetLayerCount(); cLayerIndex++) 
    511511    { 
    512         const KFbxLayer* pFbxLayer = pFbxMesh->GetLayer(cLayerIndex); 
     512        const FbxLayer* pFbxLayer = pFbxMesh->GetLayer(cLayerIndex); 
    513513        if (!pFbxLayer) 
    514514            continue; 
    515515 
    516         if (const KFbxLayerElementUV* uv = pFbxLayer->GetUVs(elementType)) 
     516        if (const FbxLayerElementUV* uv = pFbxLayer->GetUVs(elementType)) 
    517517        { 
    518518            return uv; 
     
    527527typedef std::map<GIPair, int> OsgToFbxNormalMap; 
    528528 
    529 void readMeshTriangle(const KFbxMesh * fbxMesh, int i /*polygonIndex*/, 
     529void readMeshTriangle(const FbxMesh * fbxMesh, int i /*polygonIndex*/, 
    530530                      int posInPoly0, int posInPoly1, int posInPoly2, 
    531531                      int meshVertex0, int meshVertex1, int meshVertex2, 
    532532                      FbxToOsgVertexMap& fbxToOsgVertMap, 
    533533                      OsgToFbxNormalMap& osgToFbxNormMap, 
    534                       const KFbxVector4* pFbxVertices, 
    535                       const KFbxLayerElementNormal* pFbxNormals, 
    536                       const KFbxLayerElementUV* pFbxUVs_diffuse, 
    537                       const KFbxLayerElementUV* pFbxUVs_opacity, 
    538                       const KFbxLayerElementUV* pFbxUVs_emissive, 
    539                       const KFbxLayerElementVertexColor* pFbxColors, 
     534                      const FbxVector4* pFbxVertices, 
     535                      const FbxLayerElementNormal* pFbxNormals, 
     536                      const FbxLayerElementUV* pFbxUVs_diffuse, 
     537                      const FbxLayerElementUV* pFbxUVs_opacity, 
     538                      const FbxLayerElementUV* pFbxUVs_emissive, 
     539                      const FbxLayerElementVertexColor* pFbxColors, 
    540540                      osg::Geometry* pGeometry, 
    541541                      osg::Array* pVertices, 
     
    606606 
    607607/// Says if a quad should be split using vertices 02 (or else 13) 
    608 bool quadSplit02(const KFbxMesh * fbxMesh, int i /*polygonIndex*/, 
     608bool quadSplit02(const FbxMesh * fbxMesh, int i /*polygonIndex*/, 
    609609                 int posInPoly0, int posInPoly1, int posInPoly2, int posInPoly3, 
    610                  const KFbxVector4* pFbxVertices) 
     610                 const FbxVector4* pFbxVertices) 
    611611{ 
    612612    // Algorithm may be a bit dumb. If you got a faster one, feel free to change. 
     
    660660 
    661661osgDB::ReaderWriter::ReadResult OsgFbxReader::readMesh( 
    662     KFbxNode* pNode, 
    663     KFbxMesh* fbxMesh, 
     662    FbxNode* pNode, 
     663    FbxMesh* fbxMesh, 
    664664    std::vector<StateSetContent>& stateSetList, 
    665665    const char* szName) 
     
    670670    pGeode->setName(szName); 
    671671 
    672     const KFbxLayerElementNormal* pFbxNormals = 0; 
    673     const KFbxLayerElementVertexColor* pFbxColors = 0; 
    674     const KFbxLayerElementMaterial* pFbxMaterials = 0; 
    675  
    676     const KFbxVector4* pFbxVertices = fbxMesh->GetControlPoints(); 
     672    const FbxLayerElementNormal* pFbxNormals = 0; 
     673    const FbxLayerElementVertexColor* pFbxColors = 0; 
     674    const FbxLayerElementMaterial* pFbxMaterials = 0; 
     675 
     676    const FbxVector4* pFbxVertices = fbxMesh->GetControlPoints(); 
    677677 
    678678    // scan layers for Normals, Colors and Materials elements (this will get the first available elements)... 
    679679    for (int cLayerIndex = 0; cLayerIndex < fbxMesh->GetLayerCount(); cLayerIndex++) 
    680680    { 
    681         const KFbxLayer* pFbxLayer = fbxMesh->GetLayer(cLayerIndex); 
     681        const FbxLayer* pFbxLayer = fbxMesh->GetLayer(cLayerIndex); 
    682682        if (!pFbxLayer) 
    683683            continue; 
     
    693693 
    694694    // look for UV elements (diffuse, opacity, reflection, emissive, ...) and get their channels names... 
    695     std::string diffuseChannel = getUVChannelForTextureMap(stateSetList, KFbxSurfaceMaterial::sDiffuse); 
    696     std::string opacityChannel = getUVChannelForTextureMap(stateSetList, KFbxSurfaceMaterial::sTransparentColor); 
    697     std::string emissiveChannel = getUVChannelForTextureMap(stateSetList, KFbxSurfaceMaterial::sEmissive); 
     695    std::string diffuseChannel = getUVChannelForTextureMap(stateSetList, FbxSurfaceMaterial::sDiffuse); 
     696    std::string opacityChannel = getUVChannelForTextureMap(stateSetList, FbxSurfaceMaterial::sTransparentColor); 
     697    std::string emissiveChannel = getUVChannelForTextureMap(stateSetList, FbxSurfaceMaterial::sEmissive); 
    698698    // look for more UV elements here... 
    699699 
    700700    // UV elements... 
    701     const KFbxLayerElementUV* pFbxUVs_diffuse = getUVElementForChannel(diffuseChannel, KFbxLayerElement::eDIFFUSE_TEXTURES, fbxMesh); 
    702     const KFbxLayerElementUV* pFbxUVs_opacity = getUVElementForChannel(opacityChannel, KFbxLayerElement::eTRANSPARENT_TEXTURES, fbxMesh); 
    703     const KFbxLayerElementUV* pFbxUVs_emissive = getUVElementForChannel(emissiveChannel, KFbxLayerElement::eEMISSIVE_TEXTURES, fbxMesh); 
     701    const FbxLayerElementUV* pFbxUVs_diffuse = getUVElementForChannel(diffuseChannel, FbxLayerElement::eTextureDiffuse, fbxMesh); 
     702    const FbxLayerElementUV* pFbxUVs_opacity = getUVElementForChannel(opacityChannel, FbxLayerElement::eTextureTransparency, fbxMesh); 
     703    const FbxLayerElementUV* pFbxUVs_emissive = getUVElementForChannel(emissiveChannel, FbxLayerElement::eTextureEmissive, fbxMesh); 
    704704    // more UV elements here... 
    705705 
     
    715715    int nPolys = fbxMesh->GetPolygonCount(); 
    716716 
    717     int nDeformerCount = fbxMesh->GetDeformerCount(KFbxDeformer::eSKIN); 
    718     int nDeformerBlendShapeCount = fbxMesh->GetDeformerCount(KFbxDeformer::eBLENDSHAPE); 
     717    int nDeformerCount = fbxMesh->GetDeformerCount(FbxDeformer::eSkin); 
     718    int nDeformerBlendShapeCount = fbxMesh->GetDeformerCount(FbxDeformer::eBlendShape); 
    719719 
    720720    GeometryType geomType = GEOMETRY_STATIC; 
     
    942942        for (int i = 0; i < nDeformerCount; ++i) 
    943943        { 
    944             KFbxSkin* pSkin = (KFbxSkin*)fbxMesh->GetDeformer(i, KFbxDeformer::eSKIN); 
     944            FbxSkin* pSkin = (FbxSkin*)fbxMesh->GetDeformer(i, FbxDeformer::eSkin); 
    945945            int nClusters = pSkin->GetClusterCount(); 
    946946            for (int j = 0; j < nClusters; ++j) 
    947947            { 
    948                 KFbxCluster* pCluster = (KFbxCluster*)pSkin->GetCluster(j); 
     948                FbxCluster* pCluster = pSkin->GetCluster(j); 
    949949                //assert(KFbxCluster::eNORMALIZE == pCluster->GetLinkMode()); 
    950                 KFbxNode* pBone = pCluster->GetLink(); 
    951  
    952                 KFbxXMatrix transformLink; 
     950                FbxNode* pBone = pCluster->GetLink(); 
     951 
     952                FbxAMatrix transformLink; 
    953953                pCluster->GetTransformLinkMatrix(transformLink); 
    954                 KFbxXMatrix transformLinkInverse = transformLink.Inverse(); 
     954                FbxAMatrix transformLinkInverse = transformLink.Inverse(); 
    955955                const double* pTransformLinkInverse = transformLinkInverse; 
    956956                osg::Matrix bindMatrix(pTransformLinkInverse); 
     
    999999            for (int nBlendShape = 0; nBlendShape < nDeformerBlendShapeCount; ++nBlendShape) 
    10001000            { 
    1001                 KFbxBlendShape* pBlendShape = KFbxCast<KFbxBlendShape>(fbxMesh->GetDeformer(nBlendShape, KFbxDeformer::eBLENDSHAPE)); 
     1001                FbxBlendShape* pBlendShape = FbxCast<FbxBlendShape>(fbxMesh->GetDeformer(nBlendShape, FbxDeformer::eBlendShape)); 
    10021002                const int nBlendShapeChannelCount = pBlendShape->GetBlendShapeChannelCount(); 
    10031003 
    10041004                for (int nBlendShapeChannel = 0; nBlendShapeChannel < nBlendShapeChannelCount; ++nBlendShapeChannel) 
    10051005                { 
    1006                     KFbxBlendShapeChannel* pBlendShapeChannel = pBlendShape->GetBlendShapeChannel(nBlendShapeChannel); 
     1006                    FbxBlendShapeChannel* pBlendShapeChannel = pBlendShape->GetBlendShapeChannel(nBlendShapeChannel); 
    10071007                    if (!pBlendShapeChannel->GetTargetShapeCount()) continue; 
    10081008 
     
    10121012                        OSG_WARN << "Multiple FBX Target Shapes, only the first will be used" << std::endl; 
    10131013                    } 
    1014                     const KFbxGeometryBase* pMorphShape = pBlendShapeChannel->GetTargetShape(0); 
    1015  
    1016                     const KFbxLayerElementNormal* pFbxShapeNormals = 0; 
    1017                     if (const KFbxLayer* pFbxShapeLayer = pMorphShape->GetLayer(0)) 
     1014                    const FbxGeometryBase* pMorphShape = pBlendShapeChannel->GetTargetShape(0); 
     1015 
     1016                    const FbxLayerElementNormal* pFbxShapeNormals = 0; 
     1017                    if (const FbxLayer* pFbxShapeLayer = pMorphShape->GetLayer(0)) 
    10181018                    { 
    10191019                        pFbxShapeNormals = pFbxShapeLayer->GetNormals(); 
     
    10441044        for (int nBlendShape = 0; nBlendShape < nDeformerBlendShapeCount; ++nBlendShape) 
    10451045        { 
    1046             KFbxBlendShape* pBlendShape = KFbxCast<KFbxBlendShape>(fbxMesh->GetDeformer(nBlendShape, KFbxDeformer::eBLENDSHAPE)); 
     1046            FbxBlendShape* pBlendShape = FbxCast<FbxBlendShape>(fbxMesh->GetDeformer(nBlendShape, FbxDeformer::eBlendShape)); 
    10471047            const int nBlendShapeChannelCount = pBlendShape->GetBlendShapeChannelCount(); 
    10481048 
    10491049            for (int nBlendShapeChannel = 0; nBlendShapeChannel < nBlendShapeChannelCount; ++nBlendShapeChannel) 
    10501050            { 
    1051                 KFbxBlendShapeChannel* pBlendShapeChannel = pBlendShape->GetBlendShapeChannel(nBlendShapeChannel); 
     1051                FbxBlendShapeChannel* pBlendShapeChannel = pBlendShape->GetBlendShapeChannel(nBlendShapeChannel); 
    10521052                if (!pBlendShapeChannel->GetTargetShapeCount()) continue; 
    10531053 
    10541054                //Assume one shape again 
    1055                 const KFbxGeometryBase* pMorphShape = pBlendShapeChannel->GetTargetShape(0); 
    1056  
    1057                 const KFbxLayerElementNormal* pFbxShapeNormals = 0; 
    1058                 if (const KFbxLayer* pFbxShapeLayer = pMorphShape->GetLayer(0)) 
     1055                const FbxGeometryBase* pMorphShape = pBlendShapeChannel->GetTargetShape(0); 
     1056 
     1057                const FbxLayerElementNormal* pFbxShapeNormals = 0; 
     1058                if (const FbxLayer* pFbxShapeLayer = pMorphShape->GetLayer(0)) 
    10591059                { 
    10601060                    pFbxShapeNormals = pFbxShapeLayer->GetNormals(); 
     
    10621062                } 
    10631063 
    1064                 const KFbxVector4* pControlPoints = pMorphShape->GetControlPoints(); 
     1064                const FbxVector4* pControlPoints = pMorphShape->GetControlPoints(); 
    10651065                int nControlPoints = pMorphShape->GetControlPointsCount(); 
    10661066                for (int fbxIndex = 0; fbxIndex < nControlPoints; ++fbxIndex) 
     
    11121112    } 
    11131113 
    1114     KFbxXMatrix fbxGeometricTransform; 
     1114    FbxAMatrix fbxGeometricTransform; 
    11151115    fbxGeometricTransform.SetTRS( 
    11161116        pNode->GeometricTranslation.Get(), 
     
    11221122    if (geomType == GEOMETRY_RIG) 
    11231123    { 
    1124         KFbxSkin* pSkin = (KFbxSkin*)fbxMesh->GetDeformer(0, KFbxDeformer::eSKIN); 
     1124        FbxSkin* pSkin = (FbxSkin*)fbxMesh->GetDeformer(0, FbxDeformer::eSkin); 
    11251125        if (pSkin->GetClusterCount()) 
    11261126        { 
    1127             KFbxXMatrix fbxTransformMatrix; 
     1127            FbxAMatrix fbxTransformMatrix; 
    11281128            pSkin->GetCluster(0)->GetTransformMatrix(fbxTransformMatrix); 
    11291129            const double* pTransformMatrix = fbxTransformMatrix; 
     
    11441144    { 
    11451145        //Add the geometry to the skeleton ancestor of one of the bones. 
    1146         KFbxSkin* pSkin = (KFbxSkin*)fbxMesh->GetDeformer(0, KFbxDeformer::eSKIN); 
     1146        FbxSkin* pSkin = (FbxSkin*)fbxMesh->GetDeformer(0, FbxDeformer::eSkin); 
    11471147        if (pSkin->GetClusterCount()) 
    11481148        { 
     
    11571157} 
    11581158 
    1159 osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxMesh(KFbxNode* pNode, 
     1159osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxMesh(FbxNode* pNode, 
    11601160    std::vector<StateSetContent>& stateSetList) 
    11611161{ 
    1162     KFbxMesh* lMesh = KFbxCast<KFbxMesh>(pNode->GetNodeAttribute()); 
     1162    FbxMesh* lMesh = FbxCast<FbxMesh>(pNode->GetNodeAttribute()); 
    11631163 
    11641164    if (!lMesh)