OpenMW
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
MWRender::RenderingManager Class Reference

#include <renderingmanager.hpp>

List of all members.

Public Member Functions

 RenderingManager (OEngine::Render::OgreRenderer &_rend, const boost::filesystem::path &resDir, const boost::filesystem::path &cacheDir, OEngine::Physic::PhysicEngine *engine, MWWorld::Fallback *fallback)
virtual ~RenderingManager ()
void togglePOV ()
void togglePreviewMode (bool enable)
bool toggleVanityMode (bool enable)
void allowVanityMode (bool allow)
void togglePlayerLooking (bool enable)
void changeVanityModeScale (float factor)
void resetCamera ()
bool vanityRotateCamera (const float *rot)
void setCameraDistance (float dist, bool adjust=false, bool override=true)
float getCameraDistance () const
void setupPlayer (const MWWorld::Ptr &ptr)
void renderPlayer (const MWWorld::Ptr &ptr)
SkyManagergetSkyManager ()
void toggleLight ()
bool toggleRenderMode (int mode)
OEngine::Render::FadergetFader ()
void removeCell (MWWorld::CellStore *store)
void cellAdded (MWWorld::CellStore *store)
void waterAdded (MWWorld::CellStore *store)
void enableTerrain (bool enable)
void removeWater ()
void preCellChange (MWWorld::CellStore *store)
 this event is fired immediately before changing cell
void addObject (const MWWorld::Ptr &ptr)
void removeObject (const MWWorld::Ptr &ptr)
void moveObject (const MWWorld::Ptr &ptr, const Ogre::Vector3 &position)
void scaleObject (const MWWorld::Ptr &ptr, const Ogre::Vector3 &scale)
void rotateObject (const MWWorld::Ptr &ptr)
 Updates an object's rotation.
void setWaterHeight (const float height)
void toggleWater ()
void updateObjectCell (const MWWorld::Ptr &old, const MWWorld::Ptr &cur)
void updatePlayerPtr (const MWWorld::Ptr &ptr)
 Specifies an updated Ptr object for the player (used on cell change).
void rebuildPtr (const MWWorld::Ptr &ptr)
void update (float duration, bool paused)
void setAmbientColour (const Ogre::ColourValue &colour)
void setSunColour (const Ogre::ColourValue &colour)
void setSunDirection (const Ogre::Vector3 &direction)
void sunEnable (bool real)
void sunDisable (bool real)
void disableLights (bool sun)
void enableLights (bool sun)
void preRenderTargetUpdate (const Ogre::RenderTargetEvent &evt)
void postRenderTargetUpdate (const Ogre::RenderTargetEvent &evt)
bool occlusionQuerySupported ()
OcclusionQuerygetOcclusionQuery ()
float getTerrainHeightAt (Ogre::Vector3 worldPos)
ShadowsgetShadows ()
void switchToInterior ()
void switchToExterior ()
void getTriangleBatchCount (unsigned int &triangles, unsigned int &batches)
void setGlare (bool glare)
void skyEnable ()
void skyDisable ()
void skySetHour (double hour)
void skySetDate (int day, int month)
int skyGetMasserPhase () const
int skyGetSecundaPhase () const
void skySetMoonColour (bool red)
void configureAmbient (MWWorld::CellStore &mCell)
void addWaterRippleEmitter (const MWWorld::Ptr &ptr, float scale=1.f, float force=1.f)
void removeWaterRippleEmitter (const MWWorld::Ptr &ptr)
void updateWaterRippleEmitterPtr (const MWWorld::Ptr &old, const MWWorld::Ptr &ptr)
void requestMap (MWWorld::CellStore *cell)
 request the local map for a cell
void configureFog (MWWorld::CellStore &mCell)
 configure fog according to cell
void configureFog (const float density, const Ogre::ColourValue &colour)
 configure fog manually
Ogre::Vector4 boundingBoxToScreen (Ogre::AxisAlignedBox bounds)
void processChangedSettings (const Settings::CategorySettingVector &settings)
Ogre::Viewport * getViewport ()
void getInteriorMapPosition (Ogre::Vector2 position, float &nX, float &nY, int &x, int &y)
 see MWRender::LocalMap::getInteriorMapPosition
bool isPositionExplored (float nX, float nY, int x, int y, bool interior)
 see MWRender::LocalMap::isPositionExplored
void setupExternalRendering (MWRender::ExternalRendering &rendering)
AnimationgetAnimation (const MWWorld::Ptr &ptr)
void playVideo (const std::string &name, bool allowSkipping)
void stopVideo ()
void frameStarted (float dt, bool paused)

Protected Member Functions

virtual void windowResized (int x, int y)

Private Member Functions

virtual MWRender::ObjectsgetObjects ()
virtual MWRender::ActorsgetActors ()
void setAmbientMode ()
void applyFog (bool underwater)
void setMenuTransparency (float val)

Private Attributes

sh::Factory * mFactory
bool mSunEnabled
MWWorld::FallbackmFallback
SkyManagermSkyManager
OcclusionQuerymOcclusionQuery
Terrain::WorldmTerrain
MWRender::WatermWater
GlobalMapmGlobalMap
OEngine::Render::OgreRenderermRendering
MWRender::ObjectsmObjects
MWRender::ActorsmActors
MWRender::NpcAnimationmPlayerAnimation
int mAmbientMode
Ogre::ColourValue mAmbientColor
Ogre::Light * mSun
Ogre::SceneNode * mRootNode
Ogre::ColourValue mFogColour
float mFogStart
float mFogEnd
OEngine::Physic::PhysicEnginemPhysicsEngine
MWRender::CameramCamera
MWRender::DebuggingmDebugging
MWRender::LocalMapmLocalMap
MWRender::ShadowsmShadows
VideoPlayermVideoPlayer

Constructor & Destructor Documentation

MWRender::RenderingManager::RenderingManager ( OEngine::Render::OgreRenderer _rend,
const boost::filesystem::path &  resDir,
const boost::filesystem::path &  cacheDir,
OEngine::Physic::PhysicEngine engine,
MWWorld::Fallback fallback 
)

Member Function Documentation

void MWRender::RenderingManager::addWaterRippleEmitter ( const MWWorld::Ptr ptr,
float  scale = 1.f,
float  force = 1.f 
)
void MWRender::RenderingManager::allowVanityMode ( bool  allow) [inline]
void MWRender::RenderingManager::applyFog ( bool  underwater) [private]
Ogre::Vector4 MWRender::RenderingManager::boundingBoxToScreen ( Ogre::AxisAlignedBox  bounds)

transform the specified bounding box (in world coordinates) into screen coordinates.

Returns:
packed vector4 (min_x, min_y, max_x, max_y)
Todo:
this function should be removed later. Instead the rendering subsystems should track when rebatching is needed and update automatically at the end of each frame.
void MWRender::RenderingManager::changeVanityModeScale ( float  factor) [inline]

configure fog according to cell

void MWRender::RenderingManager::configureFog ( const float  density,
const Ogre::ColourValue &  colour 
)

configure fog manually

Parameters:
sunwhether or not to really disable the sunlight (otherwise just set diffuse to 0)
void MWRender::RenderingManager::frameStarted ( float  dt,
bool  paused 
)
void MWRender::RenderingManager::getInteriorMapPosition ( Ogre::Vector2  position,
float &  nX,
float &  nY,
int &  x,
int &  y 
)
float MWRender::RenderingManager::getTerrainHeightAt ( Ogre::Vector3  worldPos)
void MWRender::RenderingManager::getTriangleBatchCount ( unsigned int &  triangles,
unsigned int &  batches 
)
Ogre::Viewport* MWRender::RenderingManager::getViewport ( ) [inline]
bool MWRender::RenderingManager::isPositionExplored ( float  nX,
float  nY,
int  x,
int  y,
bool  interior 
)
void MWRender::RenderingManager::moveObject ( const MWWorld::Ptr ptr,
const Ogre::Vector3 &  position 
)
Todo:
move this to the rendering-subsystems
void MWRender::RenderingManager::playVideo ( const std::string &  name,
bool  allowSkipping 
)
void MWRender::RenderingManager::postRenderTargetUpdate ( const Ogre::RenderTargetEvent &  evt)

this event is fired immediately before changing cell

void MWRender::RenderingManager::preRenderTargetUpdate ( const Ogre::RenderTargetEvent &  evt)

Currently for NPCs only. Rebuilds the NPC, updating their root model, animation sources, and equipment.

request the local map for a cell

Updates an object's rotation.

void MWRender::RenderingManager::scaleObject ( const MWWorld::Ptr ptr,
const Ogre::Vector3 &  scale 
)
void MWRender::RenderingManager::setAmbientColour ( const Ogre::ColourValue &  colour)
void MWRender::RenderingManager::setCameraDistance ( float  dist,
bool  adjust = false,
bool  override = true 
)
void MWRender::RenderingManager::setMenuTransparency ( float  val) [private]
void MWRender::RenderingManager::setSunColour ( const Ogre::ColourValue &  colour)
void MWRender::RenderingManager::setSunDirection ( const Ogre::Vector3 &  direction)
void MWRender::RenderingManager::setWaterHeight ( const float  height)
void MWRender::RenderingManager::skySetDate ( int  day,
int  month 
)
Parameters:
realwhether or not to really disable the sunlight (otherwise just set diffuse to 0)
void MWRender::RenderingManager::togglePlayerLooking ( bool  enable) [inline]
void MWRender::RenderingManager::togglePreviewMode ( bool  enable) [inline]
bool MWRender::RenderingManager::toggleVanityMode ( bool  enable) [inline]
void MWRender::RenderingManager::update ( float  duration,
bool  paused 
)

Updates object rendering after cell change

Parameters:
oldObject reference in previous cell
curObject reference in new cell

Specifies an updated Ptr object for the player (used on cell change).

void MWRender::RenderingManager::windowResized ( int  x,
int  y 
) [protected, virtual]

Member Data Documentation

Ogre::ColourValue MWRender::RenderingManager::mAmbientColor [private]
sh::Factory* MWRender::RenderingManager::mFactory [private]
Ogre::ColourValue MWRender::RenderingManager::mFogColour [private]
Ogre::SceneNode* MWRender::RenderingManager::mRootNode [private]
Ogre::Light* MWRender::RenderingManager::mSun [private]

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