33 , mTextureName(TextureName)
36 , mPosition(
Ogre::Vector2(0,0))
37 , mSize(
Ogre::Vector2(1,1))
38 , mOrientation(
Ogre::Radian(0))
43 mProjector->setProjectionType(Ogre::PT_ORTHOGRAPHIC);
48 mSceneNode->setOrientation(Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::NEGATIVE_UNIT_X));
68 _Pass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
69 _Pass->setCullingMode(Ogre::CULL_NONE);
70 _Pass->setDepthBias(1,1);
71 _Pass->setLightingEnabled(
false);
72 _Pass->setDepthWriteEnabled(
false);
74 Ogre::TextureUnitState *DecalTexture = _Pass->createTextureUnitState(
mTextureName);
75 DecalTexture->setProjectiveTexturing(
true,
mProjector);
76 DecalTexture->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
77 DecalTexture->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
78 DecalTexture->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_MANUAL, 1.0,
mTransparency);
96 mSceneNode->setPosition(Position.x, 0, Position.y);
123 ->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_MANUAL, 1.0,
mTransparency);
141 , mLastUnderwater(false)
143 , mForceToUpdate(false)
174 Ogre::AxisAlignedBox DecalBox;
180 if (!(*DecalIt)->isVisible())
185 if ((*DecalIt)->getRegisteredPass())
187 (*DecalIt)->unregister();
191 (*DecalIt)->registerPass(
193 getTechnique(0)->createPass());
197 (*DecalIt)->registerPass(
199 getTechnique(0)->createPass());
208 if (!(*DecalIt)->isVisible())
213 DPos = (*DecalIt)->getPosition();
214 DSize = (*DecalIt)->getSize()/2;
216 DecalBox = Ogre::AxisAlignedBox(DPos.x - DSize.x, HHeight -
mWaterStrength, DPos.y - DSize.y,
221 if (!(*DecalIt)->getRegisteredPass())
225 (*DecalIt)->registerPass(
227 getTechnique(0)->createPass());
231 (*DecalIt)->registerPass(
233 getTechnique(0)->createPass());
239 (*DecalIt)->unregister();
258 getTechnique(0)->createPass());
270 if((*DecalIt)->getId() == Id)
276 return static_cast<Decal*
>(NULL);
283 if((*DecalIt)->getId() == Id)
309 (*DecalIt)->unregister();
313 (*DecalIt)->registerPass(
315 getTechnique(0)->createPass());
319 (*DecalIt)->registerPass(
321 getTechnique(0)->createPass());