OpenMW
|
#include <ripplesimulation.hpp>
Public Member Functions | |
RippleSimulation (Ogre::SceneManager *mainSceneManager) | |
~RippleSimulation () | |
void | update (float dt, Ogre::Vector2 position) |
void | addEmitter (const MWWorld::Ptr &ptr, float scale=1.f, float force=1.f) |
adds an emitter, position will be tracked automatically | |
void | removeEmitter (const MWWorld::Ptr &ptr) |
void | updateEmitterPtr (const MWWorld::Ptr &old, const MWWorld::Ptr &ptr) |
Private Member Functions | |
void | addImpulses () |
void | heightMapToNormalMap () |
void | waterSimulation () |
void | swapHeightMaps () |
Private Attributes | |
std::vector< Emitter > | mEmitters |
Ogre::RenderTexture * | mRenderTargets [4] |
Ogre::TexturePtr | mTextures [4] |
int | mTextureSize |
float | mRippleAreaLength |
float | mImpulseSize |
bool | mFirstUpdate |
Ogre::Camera * | mCamera |
Ogre::SceneManager * | mSceneMgr |
Ogre::Rectangle2D * | mRectangle |
Ogre::SceneManager * | mMainSceneMgr |
Ogre::Rectangle2D * | mImpulse |
float | mTime |
Ogre::Vector2 | mRippleCenter |
Ogre::Vector2 | mTexelOffset |
Ogre::Vector2 | mCurrentFrameOffset |
Ogre::Vector2 | mPreviousFrameOffset |
Static Private Attributes | |
static const int | TEX_NORMAL = 3 |
MWRender::RippleSimulation::RippleSimulation | ( | Ogre::SceneManager * | mainSceneManager | ) |
void MWRender::RippleSimulation::addEmitter | ( | const MWWorld::Ptr & | ptr, |
float | scale = 1.f , |
||
float | force = 1.f |
||
) |
adds an emitter, position will be tracked automatically
void MWRender::RippleSimulation::addImpulses | ( | ) | [private] |
void MWRender::RippleSimulation::heightMapToNormalMap | ( | ) | [private] |
void MWRender::RippleSimulation::removeEmitter | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RippleSimulation::swapHeightMaps | ( | ) | [private] |
void MWRender::RippleSimulation::update | ( | float | dt, |
Ogre::Vector2 | position | ||
) |
void MWRender::RippleSimulation::updateEmitterPtr | ( | const MWWorld::Ptr & | old, |
const MWWorld::Ptr & | ptr | ||
) |
void MWRender::RippleSimulation::waterSimulation | ( | ) | [private] |
Ogre::Camera* MWRender::RippleSimulation::mCamera [private] |
Ogre::Vector2 MWRender::RippleSimulation::mCurrentFrameOffset [private] |
std::vector<Emitter> MWRender::RippleSimulation::mEmitters [private] |
bool MWRender::RippleSimulation::mFirstUpdate [private] |
Ogre::Rectangle2D* MWRender::RippleSimulation::mImpulse [private] |
float MWRender::RippleSimulation::mImpulseSize [private] |
Ogre::SceneManager* MWRender::RippleSimulation::mMainSceneMgr [private] |
Ogre::Vector2 MWRender::RippleSimulation::mPreviousFrameOffset [private] |
Ogre::Rectangle2D* MWRender::RippleSimulation::mRectangle [private] |
Ogre::RenderTexture* MWRender::RippleSimulation::mRenderTargets[4] [private] |
float MWRender::RippleSimulation::mRippleAreaLength [private] |
Ogre::Vector2 MWRender::RippleSimulation::mRippleCenter [private] |
Ogre::SceneManager* MWRender::RippleSimulation::mSceneMgr [private] |
Ogre::Vector2 MWRender::RippleSimulation::mTexelOffset [private] |
Ogre::TexturePtr MWRender::RippleSimulation::mTextures[4] [private] |
int MWRender::RippleSimulation::mTextureSize [private] |
float MWRender::RippleSimulation::mTime [private] |
const int MWRender::RippleSimulation::TEX_NORMAL = 3 [static, private] |