Show
Ignore:
Timestamp:
09/02/14 19:05:23 (7 hours ago)
Author:
robert
Message:

Added debug setting of VolumeSettings? that is commented out

Files:
1 modified

Legend:

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

    r13464 r13466  
    1111#include "fbxReader.h" 
    1212 
    13 osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxLight(KFbxNode* pNode, int& nLightCount) 
     13osgDB::ReaderWriter::ReadResult OsgFbxReader::readFbxLight(FbxNode* pNode, int& nLightCount) 
    1414{ 
    15     const KFbxLight* fbxLight = KFbxCast<KFbxLight>(pNode->GetNodeAttribute()); 
     15    const FbxLight* fbxLight = FbxCast<FbxLight>(pNode->GetNodeAttribute()); 
    1616 
    1717    if (!fbxLight) 
     
    2323    osg::LightSource* osgLightSource = new osg::LightSource; 
    2424 
     25    osgLightSource->setLight(osgLight); 
    2526    osgLight->setLightNum(nLightCount++); 
    26     osgLightSource->setLight(osgLight); 
    2727 
    28     KFbxLight::ELightType fbxLightType = fbxLight->LightType.IsValid() ? 
    29         fbxLight->LightType.Get() : KFbxLight::ePOINT; 
     28    FbxLight::EType fbxLightType = fbxLight->LightType.IsValid() ? 
     29        fbxLight->LightType.Get() : FbxLight::ePoint; 
    3030 
    31     osgLight->setPosition(osg::Vec4(0,0,0,fbxLightType != KFbxLight::eDIRECTIONAL)); 
     31    osgLight->setPosition(osg::Vec4(0,0,0,fbxLightType != FbxLight::eDirectional)); 
    3232 
    33     if (fbxLightType == KFbxLight::eSPOT) 
     33    if (fbxLightType == FbxLight::eSpot) 
    3434    { 
    35         double coneAngle = fbxLight->ConeAngle.IsValid() ? fbxLight->ConeAngle.Get() : 45.0; 
    36         double hotSpot = fbxLight->HotSpot.IsValid() ? fbxLight->HotSpot.Get() : 45.0; 
     35        double coneAngle = fbxLight->OuterAngle.Get(); 
     36        double hotSpot = fbxLight->InnerAngle.Get(); 
    3737        const float MIN_HOTSPOT = 0.467532f; 
    3838 
     
    4040 
    4141        //Approximate the hotspot using the GL light exponent. 
    42         //This formula maps a hotspot of 180 to exponent 0 (uniform light 
     42        // This formula maps a hotspot of 180 to exponent 0 (uniform light 
    4343        // distribution) and a hotspot of 45 to exponent 1 (effective light 
    4444        // intensity is attenuated by the cosine of the angle between the 
     
    5757        switch (fbxLight->DecayType.Get()) 
    5858        { 
    59         case KFbxLight::eNONE: 
     59        case FbxLight::eNone: 
    6060            break; 
    61         case KFbxLight::eLINEAR: 
     61        case FbxLight::eLinear: 
    6262            osgLight->setLinearAttenuation(fbxDecayStart); 
    6363            break; 
    64         case KFbxLight::eQUADRATIC: 
    65         case KFbxLight::eCUBIC: 
     64        case FbxLight::eQuadratic: 
     65        case FbxLight::eCubic: 
    6666            osgLight->setQuadraticAttenuation(fbxDecayStart); 
    6767            break; 
     
    7373    if (fbxLight->Color.IsValid()) 
    7474    { 
    75         fbxDouble3 fbxColor = fbxLight->Color.Get(); 
     75        FbxDouble3 fbxColor = fbxLight->Color.Get(); 
    7676        osgDiffuseSpecular.set( 
    7777            static_cast<float>(fbxColor[0]), 
     
    8585    if (fbxLight->ShadowColor.IsValid()) 
    8686    { 
    87         fbxDouble3 fbxShadowColor = fbxLight->ShadowColor.Get(); 
     87        FbxDouble3 fbxShadowColor = fbxLight->ShadowColor.Get(); 
    8888        osgAmbient.set( 
    8989            static_cast<float>(fbxShadowColor[0]),