Show
Ignore:
Timestamp:
03/21/12 18:36:20 (3 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/dae/daeRMaterials.cpp

    r12994 r13041  
    22 * Copyright 2006 Sony Computer Entertainment Inc. 
    33 * 
    4  * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this  
     4 * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this 
    55 * file except in compliance with the License. You may obtain a copy of the License at: 
    66 * http://research.scea.com/scea_shared_source_license.html 
    77 * 
    8  * Unless required by applicable law or agreed to in writing, software distributed under the License  
    9  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
    10  * implied. See the License for the specific language governing permissions and limitations under the  
    11  * License.  
     8 * Unless required by applicable law or agreed to in writing, software distributed under the License 
     9 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
     10 * implied. See the License for the specific language governing permissions and limitations under the 
     11 * License. 
    1212 */ 
    1313 
     
    128128        std::string materialName = drawable->getName(); 
    129129        osg::Geometry *cachedGeometry = dynamic_cast<osg::Geometry*>(cachedGeode->getDrawable(i)->asGeometry()); 
    130          
     130 
    131131        domInstance_material_Array &ima = bm->getTechnique_common()->getInstance_material_array(); 
    132132        std::string symbol; 
     
    136136            symbol = ima[j]->getSymbol(); 
    137137            if (symbol.compare(materialName) == 0) 
    138             {  
     138            { 
    139139                found = true; 
    140140                domMaterial *mat = daeSafeCast< domMaterial >(getElementFromURI( ima[j]->getTarget())); 
     
    168168                    clonedGeometry->getTexCoordArrayList().clear(); 
    169169 
    170                     // 2. For each possible texture unit find the correct texcoord array and  
     170                    // 2. For each possible texture unit find the correct texcoord array and 
    171171                    // indices from the cached drawable and place in the cloned drawable 
    172172                    // in the correct texture unit slot 
     
    209209    { 
    210210        processEffect(ss, effect); 
    211      
     211 
    212212        //TODO: process all of the setParams that could happen here in the material. ESP. the textures 
    213213    } 
     
    331331 
    332332        processColorOrTextureType(ss, b->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL,  &AmbientStateAttribute ); 
    333          
     333 
    334334        processColorOrTextureType(ss, b->getDiffuse(), osg::Material::DIFFUSE, mat.get(), NULL, &DiffuseStateAttribute ); 
    335         if (DiffuseStateAttribute != NULL )  
    336         { 
    337             if (AmbientStateAttribute != NULL )  
     335        if (DiffuseStateAttribute != NULL ) 
     336        { 
     337            if (AmbientStateAttribute != NULL ) 
    338338            { 
    339339                // Set the ambient and diffuse colour white so that the incoming fragment colour ends up as a 
     
    367367        else 
    368368        { 
    369             if (NULL != AmbientStateAttribute  )  
     369            if (NULL != AmbientStateAttribute  ) 
    370370                OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; 
    371371        } 
     
    403403        if (NULL != EmissionStateAttribute) 
    404404            OSG_WARN << "Currently no support for <texture> in Emission channel " << std::endl; 
    405          
     405 
    406406        processColorOrTextureType(ss, p->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL,  &AmbientStateAttribute ); 
    407          
     407 
    408408        processColorOrTextureType(ss, p->getDiffuse(), osg::Material::DIFFUSE, mat.get(), NULL, &DiffuseStateAttribute ); 
    409         if (DiffuseStateAttribute != NULL )  
    410         { 
    411             if (AmbientStateAttribute != NULL )  
     409        if (DiffuseStateAttribute != NULL ) 
     410        { 
     411            if (AmbientStateAttribute != NULL ) 
    412412            { 
    413413                // Set the ambient and diffuse colour white so that the incoming fragment colour ends up as a 
     
    441441        else 
    442442        { 
    443             if (NULL != AmbientStateAttribute  )  
     443            if (NULL != AmbientStateAttribute  ) 
    444444                OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; 
    445445        } 
    446          
     446 
    447447        if (processColorOrTextureType(ss, p->getSpecular(), osg::Material::SPECULAR, mat.get(), p->getShininess() ) && (NULL != DiffuseStateAttribute) ) 
    448448        { 
     
    475475        if (NULL != EmissionStateAttribute) 
    476476            OSG_WARN << "Currently no support for <texture> in Emission channel " << std::endl; 
    477          
     477 
    478478        processColorOrTextureType(ss, l->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL,  &AmbientStateAttribute); 
    479479 
    480480        processColorOrTextureType(ss, l->getDiffuse(), osg::Material::DIFFUSE, mat.get(), NULL, &DiffuseStateAttribute ); 
    481         if (DiffuseStateAttribute != NULL )  
    482         { 
    483             if (AmbientStateAttribute != NULL )  
     481        if (DiffuseStateAttribute != NULL ) 
     482        { 
     483            if (AmbientStateAttribute != NULL ) 
    484484            { 
    485485                // Set the ambient and diffuse colour white so that the incoming fragment colour ends up as a 
     
    513513        else 
    514514        { 
    515             if (NULL != AmbientStateAttribute  )  
     515            if (NULL != AmbientStateAttribute  ) 
    516516                OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; 
    517517        } 
     
    531531        osg::Texture2D *sa = NULL; 
    532532        processColorOrTextureType(ss, c->getEmission(), osg::Material::EMISSION, mat.get(), NULL, &sa ); 
    533         if (sa != NULL )  
     533        if (sa != NULL ) 
    534534        { 
    535535            unsigned int textureUnit( _pluginOptions.usePredefinedTextureUnits ? MAIN_TEXTURE_UNIT : 0); 
     
    563563//        0..*    extra 
    564564bool daeReader::processColorOrTextureType(const osg::StateSet* ss, 
    565                                           domCommon_color_or_texture_type *cot,  
     565                                          domCommon_color_or_texture_type *cot, 
    566566                                          osg::Material::ColorMode channel, 
    567567                                          osg::Material *mat, 
     
    606606            else 
    607607                OSG_WARN << "Currently no support for <texture> in Emission channel " << std::endl; 
    608         }        
     608        } 
    609609        else 
    610610        { 
     
    769769    } 
    770770 
    771     domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el );  
     771    domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el ); 
    772772    domFx_newparam_common *npc = daeSafeCast< domFx_newparam_common >( el ); 
    773773    if ((cnp != NULL) && (NULL != cnp->getFloat4())) 
     
    816816    } 
    817817 
    818     domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el );  
     818    domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el ); 
    819819    domFx_newparam_common *npc = daeSafeCast< domFx_newparam_common >( el ); 
    820820    if ((cnp != NULL) && (NULL != cnp->getFloat())) 
     
    10061006    std::string target = std::string("./") + std::string(tex->getTexture()); 
    10071007    OSG_NOTICE<<"processTexture("<<target<<")"<<std::endl; 
    1008      
     1008 
    10091009    daeSIDResolver res1( _currentEffect, target.c_str() ); 
    10101010    daeElement *el = res1.getElement(); 
     
    10221022    else 
    10231023    { 
    1024         domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el );  
     1024        domCommon_newparam_type *cnp = daeSafeCast< domCommon_newparam_type >( el ); 
    10251025        domFx_newparam_common *npc = daeSafeCast< domFx_newparam_common >( el ); 
    10261026 
     
    10491049            return NULL; 
    10501050        } 
    1051         cnp = daeSafeCast< domCommon_newparam_type >( el );  
     1051        cnp = daeSafeCast< domCommon_newparam_type >( el ); 
    10521052        npc = daeSafeCast< domFx_newparam_common >( el ); 
    10531053 
     
    11651165• RGB_ONE: Takes the transparency information from the color’s red, green, and blue channels, where the value 1.0 
    11661166* is opaque, with each channel modulated independently. 
    1167 * When we update to a version of the dom using that schema we will need to modify the code below  
     1167* When we update to a version of the dom using that schema we will need to modify the code below 
    11681168*/ 
    11691169