Changeset 1055 for GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include
- Timestamp:
- 06/26/06 09:52:08 (19 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreIlluminationManager.h
r949 r1055 13 13 #include "OgreDepthShadowMapRenderingRun.h" 14 14 #include "OgreDepthShadowRecieverRenderTechnique.h" 15 #include "OgreFireRenderTechnique.h" 15 16 16 17 … … 51 52 */ 52 53 BillboardSet* findRenderableInParticleSystem(ParticleSystem* system); 54 void preAllUpdates(); 55 void postAllUpdates(); 53 56 54 57 /** … … 62 65 */ 63 66 float maxRad; 67 std::map<RenderingRunType,float> maxRads; 64 68 /** 65 69 @brief The camera attached to the player. … … 106 110 std::map<String, OgreSharedRuns*> perLightRuns; 107 111 108 112 std::map<GlobalTargetType, GlobalUseRenderTarget*> globalTargets; 113 114 std::vector<UpdateListener*> updateListeners; 115 109 116 public: 110 117 118 void addUpdateListener(UpdateListener* l){updateListeners.push_back(l);} 111 119 /** 112 120 @brief registers a RenderTechniqueFactory … … 120 128 */ 121 129 float getMaxJoinRadius(){return maxRad;} 130 float getMaxJoinRadius(RenderingRunType type){return maxRads[type];} 122 131 /** 123 132 @brief sets the maximum bounding sphere radius with two SharedRuns can be joined. 124 133 */ 125 void setMaxJoinRadius(float rad){maxRad = rad;} 134 void setMaxJoinRadius(float rad) 135 { 136 std::map<RenderingRunType,float> ::iterator it = maxRads.begin(); 137 std::map<RenderingRunType,float> ::iterator itend = maxRads.end(); 138 139 maxRad = rad; 140 141 while(it != itend) 142 { 143 (*it).second = maxRad; 144 it++; 145 } 146 147 } 148 void setMaxJoinRadius(RenderingRunType type, float rad){maxRads[type] = rad;} 126 149 /** 127 150 @brief Returns the one and only OgreIlluminationManager instance. … … 146 169 */ 147 170 void initTechniques(Entity* e); 171 /** 172 @brief searches for RenderTechniques in materials and creates them for a Billboardset. 173 */ 174 void initTechniques(BillboardSet* bbs, ParticleSystem* sys); 148 175 /** 149 176 @brief Returns a pointer to the player camera. … … 224 251 */ 225 252 RenderingRun* getGlobalRun(RenderingRunType runType); 253 254 GlobalUseRenderTarget* getGlobalTarget(GlobalTargetType type); 255 void addGlobalTarget(GlobalTargetType type, GlobalUseRenderTarget* target); 226 256 /** 227 257 @brief Updates a global RenderingRun with the given type. -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderTechnique.h
r836 r1055 5 5 6 6 class OgreTechniqueGroup; 7 8 class UpdateListener 9 { 10 public: 11 virtual void preAllUpdates(){} 12 virtual void postAllUpdates(){} 13 }; 7 14 8 15 /** -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderable.h
r790 r1055 45 45 @param billboardset the BillboardSet to wrap 46 46 */ 47 OgreRenderable(BillboardSet* billboardset );47 OgreRenderable(BillboardSet* billboardset, ParticleSystem* sys = 0); 48 48 /** 49 49 @brief Destructor. … … 149 149 */ 150 150 BillboardSet* billboardSetRenderable; 151 ParticleSystem* parentParticleSystem; 151 152 152 153 /** -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreRenderingRun.h
r808 r1055 30 30 */ 31 31 OgreRenderingRun* asOgreRenderingRun(){return this;} 32 33 virtual bool canJoin(OgreRenderingRun* run){return true;} 32 34 33 35 protected: … … 66 68 @see renderPixelSprites 67 69 */ 68 SpriteSet* pixelSprites;70 BillboardSet* pixelSprites; 69 71 /** 70 72 @brief unique name of the SpriteSet used in pixel sprite rendering -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/OgreSharedRuns.h
r790 r1055 6 6 using namespace Ogre; 7 7 8 enum GlobalTargetType 9 { 10 ILLUM_GLOBAL_TARGET_FIREPARTICLES 11 }; 12 13 class GlobalUseRenderTarget 14 { 15 public: 16 GlobalUseRenderTarget(){lastUpdated = 0; renderTarget = 0;} 17 18 unsigned long lastUpdated; 19 RenderTarget* renderTarget; 20 }; 8 21 /** 9 22 @brief Class of SharedRuns used in an OGRE environment. … … 112 125 @param r2 pointer to the other SharedRuns instance 113 126 */ 114 static bool haveCommonRuns(SharedRuns* r1, SharedRuns* r2 );127 static bool haveCommonRuns(SharedRuns* r1, SharedRuns* r2, std::vector<RenderingRunType>& commonruns); 115 128 /** 116 129 @brief Checks if this node has a resource with the given type. … … 170 183 //inherited 171 184 void destroy(); 185 void runUpdated(RenderingRunType runType, RenderingRun* run); 186 void runChanged(RenderingRunType runType, RenderingRun* run); 187 virtual void addTechniqueGroup(TechniqueGroup* group){childTechniqueGroups.push_back(group);} 172 188 173 189 protected: 190 /** 191 @brief child TechniqueGroup instance. 192 193 If this SharedRuns node is a leaf, it containes a reference to a TechniqueGroup instance. 194 All messages will be transfered to this object, 195 and bounding information will be retrieved from this TechniqueGroup 196 */ 197 std::vector<TechniqueGroup*> childTechniqueGroups; 174 198 /** 175 199 @brief map of contained RenderingRuns -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreCausticCasterRenderTechnique.h
r949 r1055 43 43 bool updateAllFace, 44 44 bool useDistance, 45 float attenuation, 45 46 Pass* pass, 46 47 OgreRenderable* parentRenderable, … … 57 58 */ 58 59 String& getCausticCubeMapName(); 60 float getAttenuation(){return attenuation;} 59 61 60 62 protected: 61 63 62 64 /** 63 65 @brief name of the created photon hit map texture … … 72 74 */ 73 75 unsigned char photonMapTexID; 76 float attenuation; 74 77 75 78 //inherited 76 v irtual void photonMapRunChanged(RenderingRun* run);79 void photonMapRunChanged(RenderingRun* run); 77 80 //inherited 78 v irtual void causticCubeMapRunChanged(RenderingRun* run);81 void causticCubeMapRunChanged(RenderingRun* run); 79 82 //inherited 80 v irtual void distanceCubeMapRunChanged(RenderingRun* run);83 void distanceCubeMapRunChanged(RenderingRun* run); 81 84 //inherited 82 85 void distanceCubeMapRunUpdated(RenderingRun* run); 83 86 //inherited 84 virtualRenderingRun* createPhotonMapRun();87 RenderingRun* createPhotonMapRun(); 85 88 //inherited 86 virtualRenderingRun* createCausticCubeMapRun();89 RenderingRun* createCausticCubeMapRun(); 87 90 //inherited 88 virtualRenderingRun* createDistanceCubeMapRun();91 RenderingRun* createDistanceCubeMapRun(); 89 92 }; 90 93 … … 102 105 103 106 107 float attenuation; 104 108 unsigned long startFrame; 105 109 unsigned long photonMapUpdateInterval; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h
r836 r1055 18 18 */ 19 19 class OgreSBBRenderTechnique : public OgreRenderTechnique, 20 public SBBRenderTechnique 20 public SBBRenderTechnique, 21 public RenderTargetListener, 22 public FrameListener, 23 public UpdateListener 21 24 { 22 25 public: … … 39 42 //inherited 40 43 virtual void update(unsigned long frameNum); 44 45 void preRenderTargetUpdate (const RenderTargetEvent &evt); 46 void postRenderTargetUpdate (const RenderTargetEvent &evt); 47 bool frameEnded (const FrameEvent &evt); 48 void preAllUpdates(); 49 void postAllUpdates(); 41 50 42 51 protected: … … 45 54 */ 46 55 unsigned char depthTexID; 56 57 bool lastVisibility; 47 58 48 59 }; -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreCausticCubeMapRenderingRun.h
r790 r1055 40 40 String materialName, 41 41 unsigned char photonMapTexId, 42 bool updateAllFace 42 bool updateAllFace, 43 float attenuation 43 44 ); 44 45 /** … … 49 50 //inherited 50 51 void photonMapChanged(RenderingRun* run); 52 float getAttenuation(){return attenuation;} 51 53 54 bool canJoin(OgreRenderingRun* run) 55 { 56 OgreCausticCubeMapRenderingRun* r = (OgreCausticCubeMapRenderingRun*) run; 57 if(r->materialName == materialName) 58 return true; 59 return false; 60 } 61 52 62 protected: 53 63 /** … … 71 81 */ 72 82 String materialName; 83 float attenuation; 73 84 74 85 //inherited -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgreDepthShadowMapRenderingRun.h
r790 r1055 41 41 @brief returns the depth shadow map texture created by this run 42 42 */ 43 String getDepthMapTextureName( ){return name;}43 String getDepthMapTextureName(int i){return names[i];} 44 44 /** 45 45 @brief Refreshes light camera matrices, called in each update. … … 49 49 @brief retuns the view matrix of the camera from which the depth shadow map was created 50 50 */ 51 Matrix4 getLightViewMatrix( );51 Matrix4 getLightViewMatrix(int i); 52 52 /** 53 53 @brief retuns the concatenation of the view and projection matrices of the camera from which the depth shadow map was created 54 54 */ 55 Matrix4 getLightViewProjMatrix( );55 Matrix4 getLightViewProjMatrix(int i); 56 56 57 57 protected: … … 63 63 @brief pointer to the camera of the lightsource 64 64 */ 65 Camera* depthMapCamera ;65 Camera* depthMapCameras[2]; 66 66 /** 67 67 @brief the name of the material to be used when rendering the depth shadow map … … 75 75 @brief the name of the depth shadow map texture that was created by this run 76 76 */ 77 String name ;77 String names[2]; 78 78 /** 79 79 @brief a pointer to the depth shadow texture that was created by this run 80 80 */ 81 Texture* depthMapTexture ;81 Texture* depthMapTextures[2]; 82 82 83 83 //inherited -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderingRuns/OgrePhotonMapRenderingRun.h
r949 r1055 48 48 void refreshLight(); 49 49 50 50 bool canJoin(OgreRenderingRun* run) 51 { 52 OgrePhotonMapRenderingRun* r = (OgrePhotonMapRenderingRun*) run; 53 if(r->materialName == materialName) 54 return true; 55 return false; 56 } 51 57 void distanceCubeMapChanged(RenderingRun* run); 52 58
Note: See TracChangeset
for help on using the changeset viewer.