1 #ifndef OPENMW_MWRENDER_RENDERINGMANAGER_H
2 #define OPENMW_MWRENDER_RENDERINGMANAGER_H
17 class PositionAttitudeTransform;
67 const Fallback::Map* fallback,
const std::string& resourcePath);
94 void setSunColour(
const osg::Vec4f& diffuse,
const osg::Vec4f& specular);
98 void configureFog(
float fogDepth,
float underwaterFog,
const osg::Vec4f& colour);
115 void screenshot(osg::Image* image,
int w,
int h);
126 RayResult castRay(
const osg::Vec3f& origin,
const osg::Vec3f& dest,
bool ignorePlayer,
bool ignoreActors=
false);
141 void spawnEffect(
const std::string &model,
const std::string &texture,
const osg::Vec3f &worldPosition,
float scale = 1.f,
bool isMagicVFX =
true);
149 void update(
float dt,
bool paused);
211 std::auto_ptr<SkyManager>
mSky;
bool toggleRenderMode(RenderMode mode)
Definition: renderingmanager.cpp:397
const osg::Vec3f & getCameraPosition() const
Definition: renderingmanager.cpp:954
Wrapper class that constructs and provides access to the most commonly used resource subsystems...
Definition: resourcesystem.hpp:24
void removePlayer(const MWWorld::Ptr &player)
Definition: renderingmanager.cpp:500
float mViewDistance
Definition: renderingmanager.hpp:231
RayResult castCameraToViewportRay(const float nX, const float nY, float maxDistance, bool ignorePlayer, bool ignoreActors=false)
Definition: renderingmanager.cpp:721
RenderingManager(osgViewer::Viewer *viewer, osg::ref_ptr< osg::Group > rootNode, Resource::ResourceSystem *resourceSystem, const Fallback::Map *fallback, const std::string &resourcePath)
Definition: renderingmanager.cpp:154
float mUnderwaterFog
Definition: renderingmanager.hpp:223
osg::ref_ptr< SceneUtil::UnrefQueue > mUnrefQueue
Definition: renderingmanager.hpp:203
RayResult castRay(const osg::Vec3f &origin, const osg::Vec3f &dest, bool ignorePlayer, bool ignoreActors=false)
Definition: renderingmanager.cpp:710
osg::Vec4f mUnderwaterColor
Definition: renderingmanager.hpp:221
bool toggleVanityMode(bool enable)
Definition: renderingmanager.cpp:969
void renderPlayer(const MWWorld::Ptr &player)
Definition: renderingmanager.cpp:796
Definition: animation.hpp:77
The basic interface for a terrain world. How the terrain chunks are paged and displayed is up to the ...
Definition: world.hpp:32
Definition: renderingmanager.hpp:63
A work queue that users can push work items onto, to be completed by one or more background threads...
Definition: workqueue.hpp:45
void emitWaterRipple(const osg::Vec3f &pos)
Definition: renderingmanager.cpp:833
osg::Vec3f mHitNormalWorld
Definition: renderingmanager.hpp:120
float mNearClip
Definition: renderingmanager.hpp:230
void scaleObject(const MWWorld::Ptr &ptr, const osg::Vec3f &scale)
Definition: renderingmanager.cpp:521
float getNearClipDistance() const
Definition: renderingmanager.cpp:904
float mFieldOfView
Definition: renderingmanager.hpp:234
void togglePlayerLooking(bool enable)
Definition: renderingmanager.cpp:979
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
float getCameraDistance() const
Definition: renderingmanager.cpp:944
std::auto_ptr< NpcAnimation > mPlayerAnimation
Definition: renderingmanager.hpp:213
Animation * getAnimation(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:763
osg::ref_ptr< osg::Light > mSunLight
Definition: renderingmanager.hpp:205
Definition: renderinginterface.hpp:9
osg::Vec3f mCurrentCameraPos
Definition: renderingmanager.hpp:216
osg::ref_ptr< osg::Group > mSceneRoot
Definition: renderingmanager.hpp:199
void screenshot(osg::Image *image, int w, int h)
Take a screenshot of w*h onto the given image, not including the GUI.
Definition: renderingmanager.cpp:577
int skyGetSecundaPhase() const
Definition: renderingmanager.cpp:336
float mFogDepth
Definition: renderingmanager.hpp:220
float getTerrainHeightAt(const osg::Vec3f &pos)
Definition: renderingmanager.cpp:909
~RenderingManager()
Definition: renderingmanager.cpp:259
The SkyManager handles rendering of the sky domes, celestial bodies as well as other objects that nee...
Definition: sky.hpp:107
void skySetMoonColour(bool red)
Definition: renderingmanager.cpp:341
void resetCamera()
Definition: renderingmanager.cpp:939
void moveObject(const MWWorld::Ptr &ptr, const osg::Vec3f &pos)
Definition: renderingmanager.cpp:516
void updatePtr(const MWWorld::Ptr &old, const MWWorld::Ptr &updated)
Definition: renderingmanager.cpp:740
void configureFog(const ESM::Cell *cell)
Definition: renderingmanager.cpp:434
void clear()
Clear all savegame-specific data.
Definition: renderingmanager.cpp:756
void setFogColor(const osg::Vec4f &color)
Definition: renderingmanager.cpp:873
Definition: renderingmanager.hpp:117
std::set< std::pair< std::string, std::string > > CategorySettingVector
Definition: settings.hpp:11
void changeVanityModeScale(float factor)
Definition: renderingmanager.cpp:984
float mFirstPersonFieldOfView
Definition: renderingmanager.hpp:235
void removeWaterRippleEmitter(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:828
void updateProjectionMatrix()
Definition: renderingmanager.cpp:838
std::auto_ptr< Water > mWater
Definition: renderingmanager.hpp:209
osg::Vec4f mFogColor
Definition: renderingmanager.hpp:225
osg::ref_ptr< SceneUtil::PositionAttitudeTransform > mPlayerNode
Definition: renderingmanager.hpp:214
void setSunColour(const osg::Vec4f &diffuse, const osg::Vec4f &specular)
Definition: renderingmanager.cpp:356
void addWaterRippleEmitter(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:823
void rebuildPtr(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:805
float mUnderwaterWeight
Definition: renderingmanager.hpp:222
void preloadCommonAssets()
Definition: renderingmanager.cpp:290
std::auto_ptr< Camera > mCamera
Definition: renderingmanager.hpp:215
bool mHit
Definition: renderingmanager.hpp:119
float mFieldOfViewOverride
Definition: renderingmanager.hpp:232
void operator=(const RenderingManager &)
void removeObject(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:529
osg::Group * getLightRoot()
Definition: renderingmanager.cpp:306
void skySetDate(int day, int month)
Definition: renderingmanager.cpp:326
float mRatio
Definition: renderingmanager.hpp:123
void togglePOV()
Definition: renderingmanager.cpp:959
osg::ref_ptr< SceneUtil::WorkQueue > mWorkQueue
Definition: renderingmanager.hpp:202
void removeCell(const MWWorld::CellStore *store)
Definition: renderingmanager.cpp:381
Mutable state of a cell.
Definition: cellstore.hpp:53
void resetFieldOfView()
reset a previous overrideFieldOfView() call, i.e. revert to field of view specified in the settings f...
Definition: renderingmanager.cpp:1000
void setWaterHeight(float level)
Definition: renderingmanager.cpp:541
void setSunDirection(const osg::Vec3f &direction)
Definition: renderingmanager.cpp:363
void addCell(const MWWorld::CellStore *store)
Definition: renderingmanager.cpp:372
float mUnderwaterIndoorFog
Definition: renderingmanager.hpp:224
MWRender::Objects & getObjects()
Definition: renderingmanager.cpp:265
void configureAmbient(const ESM::Cell *cell)
Definition: renderingmanager.cpp:346
std::auto_ptr< SkyManager > mSky
Definition: renderingmanager.hpp:211
std::auto_ptr< Objects > mObjects
Definition: renderingmanager.hpp:208
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
SkyManager * getSkyManager()
Definition: renderingmanager.cpp:448
osg::Vec3f mHitPointWorld
Definition: renderingmanager.hpp:121
Definition: loadcell.hpp:64
SceneUtil::WorkQueue * getWorkQueue()
Definition: renderingmanager.cpp:275
void setupPlayer(const MWWorld::Ptr &player)
Definition: renderingmanager.cpp:779
osg::ref_ptr< StateUpdater > mStateUpdater
Definition: renderingmanager.hpp:218
osg::ref_ptr< osg::Group > mRootNode
Definition: renderingmanager.hpp:198
void processChangedSettings(const Settings::CategorySettingVector &settings)
Definition: renderingmanager.cpp:880
void setNightEyeFactor(float factor)
Definition: renderingmanager.cpp:311
void spawnEffect(const std::string &model, const std::string &texture, const osg::Vec3f &worldPosition, float scale=1.f, bool isMagicVFX=true)
Definition: renderingmanager.cpp:745
double getReferenceTime() const
Definition: renderingmanager.cpp:301
Camera control.
Definition: camera.hpp:24
Resource::ResourceSystem * getResourceSystem()
Definition: renderingmanager.cpp:270
void notifyWorldSpaceChanged()
Clear all worldspace-specific data.
Definition: renderingmanager.cpp:750
osg::ref_ptr< osgViewer::Viewer > mViewer
Definition: renderingmanager.hpp:197
void rotateObject(const MWWorld::Ptr &ptr, const osg::Quat &rot)
Definition: renderingmanager.cpp:505
bool mFieldOfViewOverridden
Definition: renderingmanager.hpp:233
std::auto_ptr< Pathgrid > mPathgrid
Definition: renderingmanager.hpp:207
MWWorld::Ptr mHitObject
Definition: renderingmanager.hpp:122
bool vanityRotateCamera(const float *rot)
Definition: renderingmanager.cpp:914
Camera * getCamera()
Definition: renderingmanager.cpp:949
void allowVanityMode(bool allow)
Definition: renderingmanager.cpp:974
void updateTextureFiltering()
Definition: renderingmanager.cpp:847
osg::Vec4f mAmbientColor
Definition: renderingmanager.hpp:227
Handles unreferencing of objects through the WorkQueue. Typical use scenario would be the main thread...
Definition: unrefqueue.hpp:19
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.
Definition: renderingmanager.cpp:626
float mNightEyeFactor
Definition: renderingmanager.hpp:228
void setSkyEnabled(bool enabled)
Definition: renderingmanager.cpp:392
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
void update(float dt, bool paused)
Definition: renderingmanager.cpp:453
std::auto_ptr< Terrain::World > mTerrain
Definition: renderingmanager.hpp:210
std::auto_ptr< EffectManager > mEffectManager
Definition: renderingmanager.hpp:212
void enable(CodeContainer &code, Literals &literals, const std::string &id)
Definition: generator.cpp:870
Terrain::World * getTerrain()
Definition: renderingmanager.cpp:285
void setAmbientColour(const osg::Vec4f &colour)
Definition: renderingmanager.cpp:320
Resource::ResourceSystem * mResourceSystem
Definition: renderingmanager.hpp:200
void setCameraDistance(float dist, bool adjust, bool override)
Definition: renderingmanager.cpp:923
void updateAmbient()
Definition: renderingmanager.cpp:863
RenderMode
Definition: rendermode.hpp:7
void updatePlayerPtr(const MWWorld::Ptr &ptr)
Definition: renderingmanager.cpp:492
SceneUtil::UnrefQueue * getUnrefQueue()
Definition: renderingmanager.cpp:280
void overrideFieldOfView(float val)
temporarily override the field of view with given value.
Definition: renderingmanager.cpp:990
void togglePreviewMode(bool enable)
Definition: renderingmanager.cpp:964
Definition: objects.hpp:64
int skyGetMasserPhase() const
Definition: renderingmanager.cpp:331
void setWaterEnabled(bool enabled)
Definition: renderingmanager.cpp:535