Ignore:
Timestamp:
04/24/07 14:04:48 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h

    r2320 r2333  
    130130                @brief Size of the shadow maps. 
    131131        */ 
    132         unsigned int shadowMapSize; 
     132        unsigned int shadowMapSizePoint; 
     133        unsigned int shadowMapSizeSpot; 
     134        unsigned int shadowMapSizeDirectional; 
    133135        /** 
    134136                @brief Size of area lights for soft shadows. 
     
    138140                @brief Sets if light space perspective shadow mapping should be used. 
    139141        */ 
    140         bool useLISPSM; 
     142        bool useLISPSMPoint; 
     143        bool useLISPSMSpot; 
     144        bool useLISPSMDirectional; 
    141145        /** 
    142146                @brief Sets if the shadow maps should be blurred. 
     
    144148                Used in variance shadow mapping. 
    145149        */ 
    146         bool blurSM; 
     150        bool blurSMPoint; 
     151        bool blurSMSpot; 
     152        bool blurSMDirectional; 
    147153        /** 
    148154                @brief Sets if shadow maps should be focused. 
    149155        */ 
    150         bool focusingSM; 
     156        bool focusingSMPoint; 
     157        bool focusingSMSpot; 
     158        bool focusingSMDirectional; 
    151159        /** 
    152160                @brief The material name that should be used during rendering the shadow maps. 
     
    166174                 - directional lights : GTP/Basic/Depth or GTP/Basic/DepthCCW 
    167175        */ 
    168         String shadowMapMaterialName; 
     176        String shadowMapMaterialNamePoint; 
     177        String shadowMapMaterialNameSpot; 
     178        String shadowMapMaterialNameDirectional; 
    169179        /** 
    170180                @brief Size of the phase texture. 
     
    241251        std::vector<UpdateListener*> updateListeners; 
    242252 
     253        bool joinRuns; 
     254 
    243255public: 
     256 
     257        void joinSharedRuns(bool join){joinRuns = join;} 
    244258        /** 
    245259                @brief Registers an UpdateListener instance. @see UpdateListener 
     
    296310                @see shadowMapSize 
    297311        */ 
    298         void setShadowMapSize(unsigned int size){shadowMapSize = size;} 
     312        void setShadowMapSize(unsigned int size) 
     313        { 
     314                shadowMapSizeDirectional = size; 
     315                shadowMapSizePoint = size; 
     316                shadowMapSizeSpot = size; 
     317        } 
     318        void setShadowMapSize(Light::LightTypes type, unsigned int size) 
     319        { 
     320                switch(type) 
     321                { 
     322                        case Light::LT_DIRECTIONAL: 
     323                                shadowMapSizeDirectional = size;break; 
     324                        case Light::LT_POINT: 
     325                                shadowMapSizePoint = size;break; 
     326                        case Light::LT_SPOTLIGHT: 
     327                                shadowMapSizeSpot = size;break; 
     328                } 
     329        } 
    299330        /** 
    300331                @brief Returns the one and only OgreIlluminationManager instance. 
     
    454485                @see useLISPSM 
    455486        */ 
    456         bool getUseLISPSM(){return useLISPSM;} 
     487        bool getUseLISPSM(Light::LightTypes type) 
     488        { 
     489                switch(type) 
     490                { 
     491                        case Light::LT_DIRECTIONAL: 
     492                        return useLISPSMDirectional; 
     493                        case Light::LT_POINT: 
     494                        return useLISPSMPoint; 
     495                        case Light::LT_SPOTLIGHT: 
     496                        return useLISPSMSpot; 
     497                } 
     498        } 
    457499        /** 
    458500                @see focusingSM 
    459501        */ 
    460         bool getFocusingShadowMap(){return focusingSM;} 
     502        bool getFocusingShadowMap(Light::LightTypes type) 
     503        { 
     504                switch(type) 
     505                { 
     506                        case Light::LT_DIRECTIONAL: 
     507                        return focusingSMDirectional; 
     508                        case Light::LT_POINT: 
     509                        return focusingSMPoint; 
     510                        case Light::LT_SPOTLIGHT: 
     511                        return focusingSMSpot; 
     512                } 
     513        } 
    461514        /** 
    462515                @see blurSM 
    463516        */ 
    464         bool getBlurShadowMap(){return blurSM;} 
     517        bool getBlurShadowMap(Light::LightTypes type) 
     518        { 
     519                switch(type) 
     520                { 
     521                        case Light::LT_DIRECTIONAL: 
     522                        return blurSMDirectional; 
     523                        case Light::LT_POINT: 
     524                        return blurSMPoint; 
     525                        case Light::LT_SPOTLIGHT: 
     526                        return blurSMSpot; 
     527                } 
     528        } 
    465529        /** 
    466530                @see useLISPSM 
    467531        */ 
    468         void setUseLISPSM(bool use){useLISPSM = use;} 
     532        void setUseLISPSM(bool use) 
     533        { 
     534                useLISPSMDirectional = use; 
     535                useLISPSMPoint = use; 
     536                useLISPSMSpot = use; 
     537        } 
     538        void setUseLISPSM(Light::LightTypes type, bool use) 
     539        { 
     540                switch(type) 
     541                { 
     542                        case Light::LT_DIRECTIONAL: 
     543                                useLISPSMDirectional = use;break; 
     544                        case Light::LT_POINT: 
     545                                useLISPSMPoint = use;break; 
     546                        case Light::LT_SPOTLIGHT: 
     547                                useLISPSMSpot = use;break; 
     548                } 
     549        } 
    469550        /** 
    470551                @see focusingSM 
    471552        */ 
    472         void setFocusingSM(bool use){focusingSM = use;} 
     553        void setFocusingSM(bool use) 
     554        { 
     555                focusingSMDirectional = use; 
     556                focusingSMPoint = use; 
     557                focusingSMSpot = use; 
     558        } 
     559        void setFocusingSM(Light::LightTypes type, bool use) 
     560        { 
     561                switch(type) 
     562                { 
     563                        case Light::LT_DIRECTIONAL: 
     564                                focusingSMDirectional = use;break; 
     565                        case Light::LT_POINT: 
     566                                focusingSMPoint = use;break; 
     567                        case Light::LT_SPOTLIGHT: 
     568                                focusingSMSpot = use;break; 
     569                } 
     570        } 
    473571        /** 
    474572                @see blurSM 
    475573        */ 
    476         void setBlurShadowMap(bool use){blurSM = use;} 
     574        void setBlurShadowMap(bool use) 
     575        { 
     576                blurSMDirectional = use; 
     577                blurSMPoint = use; 
     578                blurSMSpot = use; 
     579        } 
     580        void setBlurShadowMap(Light::LightTypes type, bool use) 
     581        { 
     582                switch(type) 
     583                { 
     584                        case Light::LT_DIRECTIONAL: 
     585                                blurSMDirectional = use;break; 
     586                        case Light::LT_POINT: 
     587                                blurSMPoint = use;break; 
     588                        case Light::LT_SPOTLIGHT: 
     589                                blurSMSpot = use;break; 
     590                } 
     591        } 
    477592        /** 
    478593                @see shadowMapMaterialName 
    479594        */ 
    480         void setShadowMapMaterialName(String name){shadowMapMaterialName = name;} 
     595        void setShadowMapMaterialName(String name) 
     596        { 
     597                shadowMapMaterialNameDirectional = name; 
     598                shadowMapMaterialNamePoint = name; 
     599                shadowMapMaterialNameSpot = name; 
     600        } 
     601        void setShadowMapMaterialName(Light::LightTypes type, String name) 
     602        { 
     603                switch(type) 
     604                { 
     605                        case Light::LT_DIRECTIONAL: 
     606                                shadowMapMaterialNameDirectional = name;break; 
     607                        case Light::LT_POINT: 
     608                                shadowMapMaterialNamePoint = name;break; 
     609                        case Light::LT_SPOTLIGHT: 
     610                                shadowMapMaterialNameSpot = name;break; 
     611                } 
     612        } 
    481613        /** 
    482614                @brief Registers a PathMapClusters structure for a given subentity. 
Note: See TracChangeset for help on using the changeset viewer.