OpenMW
|
#include <renderingmanager.hpp>
Classes | |
struct | RayResult |
Public Member Functions | |
RenderingManager (osgViewer::Viewer *viewer, osg::ref_ptr< osg::Group > rootNode, Resource::ResourceSystem *resourceSystem, const Fallback::Map *fallback, const std::string &resourcePath) | |
~RenderingManager () | |
MWRender::Objects & | getObjects () |
Resource::ResourceSystem * | getResourceSystem () |
SceneUtil::WorkQueue * | getWorkQueue () |
SceneUtil::UnrefQueue * | getUnrefQueue () |
Terrain::World * | getTerrain () |
void | preloadCommonAssets () |
double | getReferenceTime () const |
osg::Group * | getLightRoot () |
void | setNightEyeFactor (float factor) |
void | setAmbientColour (const osg::Vec4f &colour) |
void | skySetDate (int day, int month) |
int | skyGetMasserPhase () const |
int | skyGetSecundaPhase () const |
void | skySetMoonColour (bool red) |
void | setSunDirection (const osg::Vec3f &direction) |
void | setSunColour (const osg::Vec4f &diffuse, const osg::Vec4f &specular) |
void | configureAmbient (const ESM::Cell *cell) |
void | configureFog (const ESM::Cell *cell) |
void | configureFog (float fogDepth, float underwaterFog, const osg::Vec4f &colour) |
void | addCell (const MWWorld::CellStore *store) |
void | removeCell (const MWWorld::CellStore *store) |
void | updatePtr (const MWWorld::Ptr &old, const MWWorld::Ptr &updated) |
void | rotateObject (const MWWorld::Ptr &ptr, const osg::Quat &rot) |
void | moveObject (const MWWorld::Ptr &ptr, const osg::Vec3f &pos) |
void | scaleObject (const MWWorld::Ptr &ptr, const osg::Vec3f &scale) |
void | removeObject (const MWWorld::Ptr &ptr) |
void | setWaterEnabled (bool enabled) |
void | setWaterHeight (float level) |
void | screenshot (osg::Image *image, int w, int h) |
Take a screenshot of w*h onto the given image, not including the GUI. More... | |
RayResult | castRay (const osg::Vec3f &origin, const osg::Vec3f &dest, bool ignorePlayer, bool ignoreActors=false) |
RayResult | castCameraToViewportRay (const float nX, const float nY, float maxDistance, bool ignorePlayer, bool ignoreActors=false) |
osg::Vec4f | getScreenBounds (const MWWorld::Ptr &ptr) |
Get the bounding box of the given object in screen coordinates as (minX, minY, maxX, maxY), with (0,0) being the top left corner. More... | |
void | setSkyEnabled (bool enabled) |
bool | toggleRenderMode (RenderMode mode) |
SkyManager * | getSkyManager () |
void | spawnEffect (const std::string &model, const std::string &texture, const osg::Vec3f &worldPosition, float scale=1.f, bool isMagicVFX=true) |
void | clear () |
Clear all savegame-specific data. More... | |
void | notifyWorldSpaceChanged () |
Clear all worldspace-specific data. More... | |
void | update (float dt, bool paused) |
Animation * | getAnimation (const MWWorld::Ptr &ptr) |
const Animation * | getAnimation (const MWWorld::ConstPtr &ptr) const |
void | addWaterRippleEmitter (const MWWorld::Ptr &ptr) |
void | removeWaterRippleEmitter (const MWWorld::Ptr &ptr) |
void | emitWaterRipple (const osg::Vec3f &pos) |
void | updatePlayerPtr (const MWWorld::Ptr &ptr) |
void | removePlayer (const MWWorld::Ptr &player) |
void | setupPlayer (const MWWorld::Ptr &player) |
void | renderPlayer (const MWWorld::Ptr &player) |
void | rebuildPtr (const MWWorld::Ptr &ptr) |
void | processChangedSettings (const Settings::CategorySettingVector &settings) |
float | getNearClipDistance () const |
float | getTerrainHeightAt (const osg::Vec3f &pos) |
bool | vanityRotateCamera (const float *rot) |
void | setCameraDistance (float dist, bool adjust, bool override) |
void | resetCamera () |
float | getCameraDistance () const |
Camera * | getCamera () |
const osg::Vec3f & | getCameraPosition () const |
void | togglePOV () |
void | togglePreviewMode (bool enable) |
bool | toggleVanityMode (bool enable) |
void | allowVanityMode (bool allow) |
void | togglePlayerLooking (bool enable) |
void | changeVanityModeScale (float factor) |
void | overrideFieldOfView (float val) |
temporarily override the field of view with given value. More... | |
void | resetFieldOfView () |
reset a previous overrideFieldOfView() call, i.e. revert to field of view specified in the settings file. More... | |
Public Member Functions inherited from MWRender::RenderingInterface | |
virtual | ~RenderingInterface () |
Private Member Functions | |
void | updateProjectionMatrix () |
void | updateTextureFiltering () |
void | updateAmbient () |
void | setFogColor (const osg::Vec4f &color) |
void | operator= (const RenderingManager &) |
RenderingManager (const RenderingManager &) | |
MWRender::RenderingManager::RenderingManager | ( | osgViewer::Viewer * | viewer, |
osg::ref_ptr< osg::Group > | rootNode, | ||
Resource::ResourceSystem * | resourceSystem, | ||
const Fallback::Map * | fallback, | ||
const std::string & | resourcePath | ||
) |
MWRender::RenderingManager::~RenderingManager | ( | ) |
|
private |
void MWRender::RenderingManager::addCell | ( | const MWWorld::CellStore * | store | ) |
void MWRender::RenderingManager::addWaterRippleEmitter | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::allowVanityMode | ( | bool | allow | ) |
RenderingManager::RayResult MWRender::RenderingManager::castCameraToViewportRay | ( | const float | nX, |
const float | nY, | ||
float | maxDistance, | ||
bool | ignorePlayer, | ||
bool | ignoreActors = false |
||
) |
Return the object under the mouse cursor / crosshair position, given by nX and nY normalized screen coordinates, where (0,0) is the top left corner.
RenderingManager::RayResult MWRender::RenderingManager::castRay | ( | const osg::Vec3f & | origin, |
const osg::Vec3f & | dest, | ||
bool | ignorePlayer, | ||
bool | ignoreActors = false |
||
) |
void MWRender::RenderingManager::changeVanityModeScale | ( | float | factor | ) |
void MWRender::RenderingManager::clear | ( | ) |
Clear all savegame-specific data.
void MWRender::RenderingManager::configureAmbient | ( | const ESM::Cell * | cell | ) |
void MWRender::RenderingManager::configureFog | ( | const ESM::Cell * | cell | ) |
void MWRender::RenderingManager::configureFog | ( | float | fogDepth, |
float | underwaterFog, | ||
const osg::Vec4f & | colour | ||
) |
void MWRender::RenderingManager::emitWaterRipple | ( | const osg::Vec3f & | pos | ) |
MWRender::Animation * MWRender::RenderingManager::getAnimation | ( | const MWWorld::Ptr & | ptr | ) |
const MWRender::Animation * MWRender::RenderingManager::getAnimation | ( | const MWWorld::ConstPtr & | ptr | ) | const |
Camera * MWRender::RenderingManager::getCamera | ( | ) |
float MWRender::RenderingManager::getCameraDistance | ( | ) | const |
const osg::Vec3f & MWRender::RenderingManager::getCameraPosition | ( | ) | const |
osg::Group * MWRender::RenderingManager::getLightRoot | ( | ) |
float MWRender::RenderingManager::getNearClipDistance | ( | ) | const |
|
virtual |
Implements MWRender::RenderingInterface.
double MWRender::RenderingManager::getReferenceTime | ( | ) | const |
Resource::ResourceSystem * MWRender::RenderingManager::getResourceSystem | ( | ) |
osg::Vec4f MWRender::RenderingManager::getScreenBounds | ( | const MWWorld::Ptr & | ptr | ) |
Get the bounding box of the given object in screen coordinates as (minX, minY, maxX, maxY), with (0,0) being the top left corner.
SkyManager * MWRender::RenderingManager::getSkyManager | ( | ) |
Terrain::World * MWRender::RenderingManager::getTerrain | ( | ) |
float MWRender::RenderingManager::getTerrainHeightAt | ( | const osg::Vec3f & | pos | ) |
SceneUtil::UnrefQueue * MWRender::RenderingManager::getUnrefQueue | ( | ) |
SceneUtil::WorkQueue * MWRender::RenderingManager::getWorkQueue | ( | ) |
void MWRender::RenderingManager::moveObject | ( | const MWWorld::Ptr & | ptr, |
const osg::Vec3f & | pos | ||
) |
void MWRender::RenderingManager::notifyWorldSpaceChanged | ( | ) |
Clear all worldspace-specific data.
|
private |
void MWRender::RenderingManager::overrideFieldOfView | ( | float | val | ) |
temporarily override the field of view with given value.
void MWRender::RenderingManager::preloadCommonAssets | ( | ) |
void MWRender::RenderingManager::processChangedSettings | ( | const Settings::CategorySettingVector & | settings | ) |
void MWRender::RenderingManager::rebuildPtr | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::removeCell | ( | const MWWorld::CellStore * | store | ) |
void MWRender::RenderingManager::removeObject | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::removePlayer | ( | const MWWorld::Ptr & | player | ) |
void MWRender::RenderingManager::removeWaterRippleEmitter | ( | const MWWorld::Ptr & | ptr | ) |
void MWRender::RenderingManager::renderPlayer | ( | const MWWorld::Ptr & | player | ) |
void MWRender::RenderingManager::resetCamera | ( | ) |
void MWRender::RenderingManager::resetFieldOfView | ( | ) |
reset a previous overrideFieldOfView() call, i.e. revert to field of view specified in the settings file.
void MWRender::RenderingManager::rotateObject | ( | const MWWorld::Ptr & | ptr, |
const osg::Quat & | rot | ||
) |
void MWRender::RenderingManager::scaleObject | ( | const MWWorld::Ptr & | ptr, |
const osg::Vec3f & | scale | ||
) |
Take a screenshot of w*h onto the given image, not including the GUI.
void MWRender::RenderingManager::setAmbientColour | ( | const osg::Vec4f & | colour | ) |
|
private |
void MWRender::RenderingManager::setNightEyeFactor | ( | float | factor | ) |
void MWRender::RenderingManager::setSkyEnabled | ( | bool | enabled | ) |
void MWRender::RenderingManager::setSunColour | ( | const osg::Vec4f & | diffuse, |
const osg::Vec4f & | specular | ||
) |
void MWRender::RenderingManager::setSunDirection | ( | const osg::Vec3f & | direction | ) |
void MWRender::RenderingManager::setupPlayer | ( | const MWWorld::Ptr & | player | ) |
void MWRender::RenderingManager::setWaterEnabled | ( | bool | enabled | ) |
void MWRender::RenderingManager::setWaterHeight | ( | float | level | ) |
int MWRender::RenderingManager::skyGetMasserPhase | ( | ) | const |
int MWRender::RenderingManager::skyGetSecundaPhase | ( | ) | const |
void MWRender::RenderingManager::skySetMoonColour | ( | bool | red | ) |
void MWRender::RenderingManager::spawnEffect | ( | const std::string & | model, |
const std::string & | texture, | ||
const osg::Vec3f & | worldPosition, | ||
float | scale = 1.f , |
||
bool | isMagicVFX = true |
||
) |
void MWRender::RenderingManager::togglePlayerLooking | ( | bool | enable | ) |
void MWRender::RenderingManager::togglePOV | ( | ) |
void MWRender::RenderingManager::togglePreviewMode | ( | bool | enable | ) |
bool MWRender::RenderingManager::toggleRenderMode | ( | RenderMode | mode | ) |
void MWRender::RenderingManager::update | ( | float | dt, |
bool | paused | ||
) |
|
private |
void MWRender::RenderingManager::updatePlayerPtr | ( | const MWWorld::Ptr & | ptr | ) |
|
private |
void MWRender::RenderingManager::updatePtr | ( | const MWWorld::Ptr & | old, |
const MWWorld::Ptr & | updated | ||
) |
|
private |
bool MWRender::RenderingManager::vanityRotateCamera | ( | const float * | rot | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |