OpenMW
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
MWRender::RippleSimulation Class Reference

#include <ripplesimulation.hpp>

List of all members.

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< EmittermEmitters
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

Constructor & Destructor Documentation

MWRender::RippleSimulation::RippleSimulation ( Ogre::SceneManager *  mainSceneManager)

Member Function Documentation

void MWRender::RippleSimulation::addEmitter ( const MWWorld::Ptr ptr,
float  scale = 1.f,
float  force = 1.f 
)

adds an emitter, position will be tracked automatically

Todo:
it should be more efficient to render all emitters at once
void MWRender::RippleSimulation::update ( float  dt,
Ogre::Vector2  position 
)

Member Data Documentation

Ogre::Camera* MWRender::RippleSimulation::mCamera [private]
Ogre::Rectangle2D* MWRender::RippleSimulation::mImpulse [private]
Ogre::SceneManager* MWRender::RippleSimulation::mMainSceneMgr [private]
Ogre::Rectangle2D* MWRender::RippleSimulation::mRectangle [private]
Ogre::RenderTexture* MWRender::RippleSimulation::mRenderTargets[4] [private]
Ogre::SceneManager* MWRender::RippleSimulation::mSceneMgr [private]
Ogre::TexturePtr MWRender::RippleSimulation::mTextures[4] [private]
const int MWRender::RippleSimulation::TEX_NORMAL = 3 [static, private]

The documentation for this class was generated from the following files: