OpenMW
|
#include <renderingmanager.hpp>
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) |
SkyManager * | getSkyManager () |
void | toggleLight () |
bool | toggleRenderMode (int mode) |
OEngine::Render::Fader * | getFader () |
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 () |
OcclusionQuery * | getOcclusionQuery () |
float | getTerrainHeightAt (Ogre::Vector3 worldPos) |
Shadows * | getShadows () |
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) |
Animation * | getAnimation (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::Objects & | getObjects () |
virtual MWRender::Actors & | getActors () |
void | setAmbientMode () |
void | applyFog (bool underwater) |
void | setMenuTransparency (float val) |
Private Attributes | |
sh::Factory * | mFactory |
bool | mSunEnabled |
MWWorld::Fallback * | mFallback |
SkyManager * | mSkyManager |
OcclusionQuery * | mOcclusionQuery |
Terrain::World * | mTerrain |
MWRender::Water * | mWater |
GlobalMap * | mGlobalMap |
OEngine::Render::OgreRenderer & | mRendering |
MWRender::Objects * | mObjects |
MWRender::Actors * | mActors |
MWRender::NpcAnimation * | mPlayerAnimation |
int | mAmbientMode |
Ogre::ColourValue | mAmbientColor |
Ogre::Light * | mSun |
Ogre::SceneNode * | mRootNode |
Ogre::ColourValue | mFogColour |
float | mFogStart |
float | mFogEnd |
OEngine::Physic::PhysicEngine * | mPhysicsEngine |
MWRender::Camera * | mCamera |
MWRender::Debugging * | mDebugging |
MWRender::LocalMap * | mLocalMap |
MWRender::Shadows * | mShadows |
VideoPlayer * | mVideoPlayer |
MWRender::RenderingManager::RenderingManager | ( | OEngine::Render::OgreRenderer & | _rend, |
const boost::filesystem::path & | resDir, | ||
const boost::filesystem::path & | cacheDir, | ||
OEngine::Physic::PhysicEngine * | engine, | ||
MWWorld::Fallback * | fallback | ||
) |
MWRender::RenderingManager::~RenderingManager | ( | ) | [virtual] |
void MWRender::RenderingManager::addObject | ( | const MWWorld::Ptr & | ptr | ) |
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.
void MWRender::RenderingManager::cellAdded | ( | MWWorld::CellStore * | store | ) |
void MWRender::RenderingManager::changeVanityModeScale | ( | float | factor | ) | [inline] |
void MWRender::RenderingManager::configureAmbient | ( | MWWorld::CellStore & | mCell | ) |
void MWRender::RenderingManager::configureFog | ( | MWWorld::CellStore & | mCell | ) |
configure fog according to cell
void MWRender::RenderingManager::configureFog | ( | const float | density, |
const Ogre::ColourValue & | colour | ||
) |
configure fog manually
void MWRender::RenderingManager::disableLights | ( | bool | sun | ) |
sun | whether or not to really disable the sunlight (otherwise just set diffuse to 0) |
void MWRender::RenderingManager::enableLights | ( | bool | sun | ) |
void MWRender::RenderingManager::enableTerrain | ( | bool | enable | ) |
void MWRender::RenderingManager::frameStarted | ( | float | dt, |
bool | paused | ||
) |
MWRender::Actors & MWRender::RenderingManager::getActors | ( | ) | [private, virtual] |
Implements MWRender::RenderingInterface.
Animation * MWRender::RenderingManager::getAnimation | ( | const MWWorld::Ptr & | ptr | ) |
float MWRender::RenderingManager::getCameraDistance | ( | ) | const |
void MWRender::RenderingManager::getInteriorMapPosition | ( | Ogre::Vector2 | position, |
float & | nX, | ||
float & | nY, | ||
int & | x, | ||
int & | y | ||
) |
MWRender::Objects & MWRender::RenderingManager::getObjects | ( | ) | [private, virtual] |
Implements MWRender::RenderingInterface.
OcclusionQuery* MWRender::RenderingManager::getOcclusionQuery | ( | ) | [inline] |
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 | ||
) |
bool MWRender::RenderingManager::occlusionQuerySupported | ( | ) | [inline] |
void MWRender::RenderingManager::playVideo | ( | const std::string & | name, |
bool | allowSkipping | ||
) |
void MWRender::RenderingManager::postRenderTargetUpdate | ( | const Ogre::RenderTargetEvent & | evt | ) |
void MWRender::RenderingManager::preCellChange | ( | MWWorld::CellStore * | store | ) |
this event is fired immediately before changing cell
void MWRender::RenderingManager::preRenderTargetUpdate | ( | const Ogre::RenderTargetEvent & | evt | ) |
void MWRender::RenderingManager::processChangedSettings | ( | const Settings::CategorySettingVector & | settings | ) |
void MWRender::RenderingManager::rebuildPtr | ( | const MWWorld::Ptr & | ptr | ) |
Currently for NPCs only. Rebuilds the NPC, updating their root model, animation sources, and equipment.
void MWRender::RenderingManager::removeCell | ( | MWWorld::CellStore * | store | ) |
void MWRender::RenderingManager::removeObject | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::removeWaterRippleEmitter | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::renderPlayer | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::requestMap | ( | MWWorld::CellStore * | cell | ) |
request the local map for a cell
void MWRender::RenderingManager::rotateObject | ( | const MWWorld::Ptr & | ptr | ) |
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::setAmbientMode | ( | ) | [private] |
void MWRender::RenderingManager::setCameraDistance | ( | float | dist, |
bool | adjust = false , |
||
bool | override = true |
||
) |
void MWRender::RenderingManager::setGlare | ( | bool | glare | ) |
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::setupExternalRendering | ( | MWRender::ExternalRendering & | rendering | ) |
void MWRender::RenderingManager::setupPlayer | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::setWaterHeight | ( | const float | height | ) |
int MWRender::RenderingManager::skyGetMasserPhase | ( | ) | const |
int MWRender::RenderingManager::skyGetSecundaPhase | ( | ) | const |
void MWRender::RenderingManager::skySetDate | ( | int | day, |
int | month | ||
) |
void MWRender::RenderingManager::skySetHour | ( | double | hour | ) |
void MWRender::RenderingManager::skySetMoonColour | ( | bool | red | ) |
void MWRender::RenderingManager::sunDisable | ( | bool | real | ) |
void MWRender::RenderingManager::sunEnable | ( | bool | real | ) |
real | whether or not to really disable the sunlight (otherwise just set diffuse to 0) |
void MWRender::RenderingManager::togglePlayerLooking | ( | bool | enable | ) | [inline] |
void MWRender::RenderingManager::togglePOV | ( | ) | [inline] |
void MWRender::RenderingManager::togglePreviewMode | ( | bool | enable | ) | [inline] |
bool MWRender::RenderingManager::toggleRenderMode | ( | int | mode | ) |
bool MWRender::RenderingManager::toggleVanityMode | ( | bool | enable | ) | [inline] |
void MWRender::RenderingManager::update | ( | float | duration, |
bool | paused | ||
) |
void MWRender::RenderingManager::updateObjectCell | ( | const MWWorld::Ptr & | old, |
const MWWorld::Ptr & | cur | ||
) |
Updates object rendering after cell change
old | Object reference in previous cell |
cur | Object reference in new cell |
void MWRender::RenderingManager::updatePlayerPtr | ( | const MWWorld::Ptr & | ptr | ) |
Specifies an updated Ptr object for the player (used on cell change).
void MWRender::RenderingManager::updateWaterRippleEmitterPtr | ( | const MWWorld::Ptr & | old, |
const MWWorld::Ptr & | ptr | ||
) |
bool MWRender::RenderingManager::vanityRotateCamera | ( | const float * | rot | ) |
void MWRender::RenderingManager::waterAdded | ( | MWWorld::CellStore * | store | ) |
void MWRender::RenderingManager::windowResized | ( | int | x, |
int | y | ||
) | [protected, virtual] |
Implements OEngine::Render::WindowSizeListener.
Ogre::ColourValue MWRender::RenderingManager::mAmbientColor [private] |
int MWRender::RenderingManager::mAmbientMode [private] |
sh::Factory* MWRender::RenderingManager::mFactory [private] |
Ogre::ColourValue MWRender::RenderingManager::mFogColour [private] |
float MWRender::RenderingManager::mFogEnd [private] |
float MWRender::RenderingManager::mFogStart [private] |
GlobalMap* MWRender::RenderingManager::mGlobalMap [private] |
Ogre::SceneNode* MWRender::RenderingManager::mRootNode [private] |
Ogre::Light* MWRender::RenderingManager::mSun [private] |
bool MWRender::RenderingManager::mSunEnabled [private] |