Ignore:
Timestamp:
06/26/06 09:52:08 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp

    r949 r1055  
    1515                                                                                                                                bool updateAllFace, 
    1616                                                                                                                                bool useDistance, 
     17                                                                                                                                float attenuation, 
    1718                                                                                                                                Pass* pass, 
    1819                                                                                                                                OgreRenderable* parentRenderable, 
     
    2223                                                        RenderTechnique( parentRenderable, parentTechniqueGroup) 
    2324{        
     25        this->attenuation = attenuation; 
    2426        this->photonMapMaterialName = photonMapMaterialName; 
    2527         
     
    103105                                                                                                causticMapMaterialName, 
    104106                                                                                                photonMapTexID, 
    105                                                                                                 updateAllFace 
     107                                                                                                updateAllFace, 
     108                                                                                                attenuation 
    106109                                                                                                ); 
    107110 
     
    185188                OgreCausticCasterRenderTechniqueFactory* f = (OgreCausticCasterRenderTechniqueFactory*) factory; 
    186189                f->causticMapMaterialName =  params; 
     190        } 
     191 
     192        void parseAttenuation(String& params, RenderTechniqueFactory* factory) 
     193        { 
     194                OgreCausticCasterRenderTechniqueFactory* f = (OgreCausticCasterRenderTechniqueFactory*) factory; 
     195                f->attenuation =  StringConverter::parseReal(params); 
    187196        } 
    188197} 
     
    206215        this->attributeParsers.insert(AttribParserList::value_type("distance_impostor", (ILLUM_ATTRIBUTE_PARSER) parseUseDistance)); 
    207216        this->attributeParsers.insert(AttribParserList::value_type("update_all_face", (ILLUM_ATTRIBUTE_PARSER) parseUpdateAllFace)); 
    208  
     217        this->attributeParsers.insert(AttribParserList::value_type("attenuation", (ILLUM_ATTRIBUTE_PARSER) parseAttenuation)); 
     218         
    209219} 
    210220 
     
    216226{        
    217227        //reset parameters 
     228        attenuation = 1.0; 
    218229        startFrame = 1; 
    219230        photonMapUpdateInterval = 1; 
     
    237248                                                                                                photonMapTexID, 
    238249                                                                                                updateAllFace, 
    239                                                                                                 useDistance,                                             
     250                                                                                                useDistance, 
     251                                                                                                attenuation, 
    240252                                                                                                pass, 
    241253                                                                                                parentRenderable, 
Note: See TracChangeset for help on using the changeset viewer.