source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h @ 836

Revision 836, 3.6 KB checked in by szirmay, 18 years ago (diff)
Line 
1#pragma once
2
3//disable inheritance warning caused by multiple inheritance
4#if _WIN32
5#if _MSC_VER
6#pragma warning(disable: 4250)
7#endif
8#endif
9
10#include "OgreRenderTechnique.h"
11#include "CausticCasterRenderTechnique.h"
12
13/**
14        @brief CausticCasterRenderTechnique used in an OGRE environment.
15*/
16class OgreCausticCasterRenderTechnique : public OgreRenderTechnique,
17                                                                                        public CausticCasterRenderTechnique     
18{
19public:
20        /**
21                @brief Constructor.
22
23                @param startFrame                                       adds an offset to the current frame number to help evenly distribute updates between frames
24                @param photonMapUpdateInterval          photon map and caustic cubemap update frequency
25                @param photonMapResolution                      photon map resolution
26                @param causticCubeMapResolution         caustic cubemap resolution
27                @param photonMapMaterialName            the name of the material should be used when rendering the choton hit map
28                @param causticMapMaterialName           the name of the material that should be used when rendering the caustic cubemap
29                @param photonMapTexID                           the texture unit state id of the caustic map generation material where the photonhit map should be bound to
30                @param updateAllFace                            defines if all cubemap faces should be updated in a frame or only one face per frame
31                @param useDistance                                      tells if a distance cubemap impostor should be used in photon hit calculation (recommended)
32                @param pass                                                     the pass to operate on
33                @param parentRenderable                         the object to operate on
34                @param parentTechniqueGroup                     the TechniqueGroup this RenderedTechnique is attached to
35        */
36        OgreCausticCasterRenderTechnique( unsigned long startFrame,
37                                                        unsigned long photonMapUpdateInterval,
38                                                        unsigned int photonMapResolution,
39                                                        unsigned int custicCubeMapResolution,
40                                                        String photonMapMaterialName,
41                                                        String causticMapMaterialName,
42                                                        unsigned char photonMapTexID,
43                                                        bool updateAllFace,
44                                                        bool useDistance,
45                                                        Pass* pass,
46                                                        OgreRenderable* parentRenderable,
47                                                        OgreTechniqueGroup* parentTechniqueGroup
48                                                        );
49        /**
50                @brief Destructor.
51        */
52        ~OgreCausticCasterRenderTechnique();   
53        /**
54                @brief Returns the name of the created caustic cubemap.
55
56                @return name of the caustic cubemap texture
57        */
58        String& getCausticCubeMapName();
59
60protected:
61
62        /**
63                @brief name of the created photon hit map texture
64        */
65    String photonMapMaterialName;
66        /**
67                @brief name of the created caustic cubemap texture
68        */
69        String causticMapMaterialName;
70        /**
71                @brief the texture unit state id of the caustic map generation material where the photonhit map should be bound to.
72        */
73        unsigned char photonMapTexID;
74       
75        //inherited
76        virtual void photonMapRunChanged(RenderingRun* run);
77        //inherited     
78        virtual void causticCubeMapRunChanged(RenderingRun* run);
79        //inherited
80        virtual void distanceCubeMapRunChanged(RenderingRun* run);
81        //inherited
82        virtual RenderingRun* createPhotonMapRun();
83        //inherited
84        virtual RenderingRun* createCausticCubeMapRun();
85        //inherited
86        virtual RenderingRun* createDistanceCubeMapRun();
87};
88
89
90class OgreCausticCasterRenderTechniqueFactory : public RenderTechniqueFactory
91{
92public:
93       
94        OgreCausticCasterRenderTechniqueFactory();
95
96        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
97                                                                                Pass* pass,
98                                                                                OgreRenderable* parentRenderable,
99                                                                                OgreTechniqueGroup* parentTechniqueGroup);
100
101
102        unsigned long startFrame;
103        unsigned long photonMapUpdateInterval;
104        unsigned int photonMapResolution;
105        unsigned int causticCubeMapResolution;
106        String photonMapMaterialName;
107        String causticMapMaterialName;
108        unsigned char photonMapTexID;
109        bool updateAllFace;
110        bool useDistance;
111       
112
113};
Note: See TracBrowser for help on using the repository browser.