OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
world.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWBASE_WORLD_H
2 #define GAME_MWBASE_WORLD_H
3 
4 #include <vector>
5 #include <map>
6 #include <set>
7 
9 
10 #include "../mwworld/ptr.hpp"
11 
12 #include "../mwrender/rendermode.hpp"
13 
14 namespace osg
15 {
16  class Vec3f;
17  class Matrixf;
18  class Quat;
19  class Image;
20 }
21 
22 namespace Loading
23 {
24  class Listener;
25 }
26 
27 namespace ESM
28 {
29  class ESMReader;
30  class ESMWriter;
31  struct Position;
32  struct Cell;
33  struct Class;
34  struct Potion;
35  struct Spell;
36  struct NPC;
37  struct Armor;
38  struct Weapon;
39  struct Clothing;
40  struct Enchantment;
41  struct Book;
42  struct EffectList;
43  struct CreatureLevList;
44  struct ItemLevList;
45 }
46 
47 namespace MWRender
48 {
49  class Animation;
50 }
51 
52 namespace MWMechanics
53 {
54  struct Movement;
55 }
56 
57 namespace MWWorld
58 {
59  class CellStore;
60  class Player;
61  class LocalScripts;
62  class TimeStamp;
63  class ESMStore;
64  class RefData;
65 
66  typedef std::vector<std::pair<MWWorld::Ptr,MWMechanics::Movement> > PtrMovementList;
67 }
68 
69 namespace Fallback
70 {
71  class Map;
72 }
73 
74 namespace MWBase
75 {
77  class World
78  {
79  World (const World&);
81 
82  World& operator= (const World&);
84 
85  public:
86 
87  struct DoorMarker
88  {
89  std::string name;
90  float x, y; // world position
92  };
93 
94  World() {}
95 
96  virtual ~World() {}
97 
98  virtual void startNewGame (bool bypass) = 0;
100 
101  virtual void clear() = 0;
102 
103  virtual int countSavedGameRecords() const = 0;
104  virtual int countSavedGameCells() const = 0;
105 
106  virtual void write (ESM::ESMWriter& writer, Loading::Listener& listener) const = 0;
107 
108  virtual void readRecord (ESM::ESMReader& reader, uint32_t type,
109  const std::map<int, int>& contentFileMap) = 0;
110 
111  virtual MWWorld::CellStore *getExterior (int x, int y) = 0;
112 
113  virtual MWWorld::CellStore *getInterior (const std::string& name) = 0;
114 
115  virtual MWWorld::CellStore *getCell (const ESM::CellId& id) = 0;
116 
117  virtual void useDeathCamera() = 0;
118 
119  virtual void setWaterHeight(const float height) = 0;
120 
121  virtual bool toggleWater() = 0;
122  virtual bool toggleWorld() = 0;
123  virtual bool toggleBorders() = 0;
124 
125  virtual void adjustSky() = 0;
126 
127  virtual const Fallback::Map *getFallback () const = 0;
128 
129  virtual MWWorld::Player& getPlayer() = 0;
130  virtual MWWorld::Ptr getPlayerPtr() = 0;
131 
132  virtual const MWWorld::ESMStore& getStore() const = 0;
133 
134  virtual std::vector<ESM::ESMReader>& getEsmReader() = 0;
135 
136  virtual MWWorld::LocalScripts& getLocalScripts() = 0;
137 
138  virtual bool hasCellChanged() const = 0;
140 
141  virtual bool isCellExterior() const = 0;
142 
143  virtual bool isCellQuasiExterior() const = 0;
144 
145  virtual osg::Vec2f getNorthVector (const MWWorld::CellStore* cell) = 0;
147 
148  virtual void getDoorMarkers (MWWorld::CellStore* cell, std::vector<DoorMarker>& out) = 0;
150 
151  virtual void setGlobalInt (const std::string& name, int value) = 0;
153 
154  virtual void setGlobalFloat (const std::string& name, float value) = 0;
156 
157  virtual int getGlobalInt (const std::string& name) const = 0;
159 
160  virtual float getGlobalFloat (const std::string& name) const = 0;
162 
163  virtual char getGlobalVariableType (const std::string& name) const = 0;
165 
166  virtual std::string getCellName (const MWWorld::CellStore *cell = 0) const = 0;
171 
172  virtual void removeRefScript (MWWorld::RefData *ref) = 0;
173  //< Remove the script attached to ref from mLocalScripts
174 
175  virtual MWWorld::Ptr getPtr (const std::string& name, bool activeOnly) = 0;
178 
179  virtual MWWorld::Ptr searchPtr (const std::string& name, bool activeOnly) = 0;
182 
183  virtual MWWorld::Ptr searchPtrViaActorId (int actorId) = 0;
185 
186  virtual MWWorld::Ptr findContainer (const MWWorld::ConstPtr& ptr) = 0;
189 
190  virtual void enable (const MWWorld::Ptr& ptr) = 0;
191 
192  virtual void disable (const MWWorld::Ptr& ptr) = 0;
193 
194  virtual void advanceTime (double hours, bool incremental = false) = 0;
196 
197  virtual void setHour (double hour) = 0;
199 
200  virtual void setMonth (int month) = 0;
202 
203  virtual void setDay (int day) = 0;
205 
206  virtual int getDay() const = 0;
207  virtual int getMonth() const = 0;
208  virtual int getYear() const = 0;
209 
210  virtual std::string getMonthName (int month = -1) const = 0;
212 
213  virtual MWWorld::TimeStamp getTimeStamp() const = 0;
215 
216  virtual bool toggleSky() = 0;
218 
219  virtual void changeWeather(const std::string& region, const unsigned int id) = 0;
220 
221  virtual int getCurrentWeather() const = 0;
222 
223  virtual int getMasserPhase() const = 0;
224 
225  virtual int getSecundaPhase() const = 0;
226 
227  virtual void setMoonColour (bool red) = 0;
228 
229  virtual void modRegion(const std::string &regionid, const std::vector<char> &chances) = 0;
230 
231  virtual float getTimeScaleFactor() const = 0;
232 
233  virtual void changeToInteriorCell (const std::string& cellName, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
236 
237  virtual void changeToExteriorCell (const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
240 
241  virtual void changeToCell (const ESM::CellId& cellId, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
243 
244  virtual const ESM::Cell *getExterior (const std::string& cellName) const = 0;
246 
247  virtual void markCellAsUnchanged() = 0;
248 
249  virtual MWWorld::Ptr getFacedObject() = 0;
251 
252  virtual float getDistanceToFacedObject() = 0;
253 
254  virtual float getMaxActivationDistance() = 0;
255 
259  virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::ConstPtr &ptr, float distance, std::vector<MWWorld::Ptr> &targets) = 0;
260 
261  virtual void adjustPosition (const MWWorld::Ptr& ptr, bool force) = 0;
264 
265  virtual void fixPosition (const MWWorld::Ptr& actor) = 0;
267 
269  virtual void deleteObject (const MWWorld::Ptr& ptr) = 0;
270  virtual void undeleteObject (const MWWorld::Ptr& ptr) = 0;
271 
272  virtual MWWorld::Ptr moveObject (const MWWorld::Ptr& ptr, float x, float y, float z) = 0;
274 
275  virtual MWWorld::Ptr moveObject(const MWWorld::Ptr &ptr, MWWorld::CellStore* newCell, float x, float y, float z, bool movePhysics=true) = 0;
277 
278  virtual void scaleObject (const MWWorld::Ptr& ptr, float scale) = 0;
279 
280  virtual void rotateObject(const MWWorld::Ptr& ptr,float x,float y,float z, bool adjust = false) = 0;
281 
282  virtual MWWorld::Ptr placeObject(const MWWorld::ConstPtr& ptr, MWWorld::CellStore* cell, ESM::Position pos) = 0;
284 
285  virtual MWWorld::Ptr safePlaceObject (const MWWorld::ConstPtr& ptr, const MWWorld::ConstPtr& referenceObject, MWWorld::CellStore* referenceCell, int direction, float distance) = 0;
288 
289  virtual void indexToPosition (int cellX, int cellY, float &x, float &y, bool centre = false)
290  const = 0;
292 
293  virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0;
295 
296  virtual void queueMovement(const MWWorld::Ptr &ptr, const osg::Vec3f &velocity) = 0;
299 
300  virtual bool castRay (float x1, float y1, float z1, float x2, float y2, float z2, bool ignoreDoors=false) = 0;
302 
303  virtual bool toggleCollisionMode() = 0;
307 
308  virtual bool toggleRenderMode (MWRender::RenderMode mode) = 0;
311 
312  virtual const ESM::Potion *createRecord (const ESM::Potion& record) = 0;
315 
316  virtual const ESM::Spell *createRecord (const ESM::Spell& record) = 0;
319 
320  virtual const ESM::Class *createRecord (const ESM::Class& record) = 0;
323 
324  virtual const ESM::Cell *createRecord (const ESM::Cell& record) = 0;
327 
328  virtual const ESM::NPC *createRecord(const ESM::NPC &record) = 0;
331 
332  virtual const ESM::Armor *createRecord (const ESM::Armor& record) = 0;
335 
336  virtual const ESM::Weapon *createRecord (const ESM::Weapon& record) = 0;
339 
340  virtual const ESM::Clothing *createRecord (const ESM::Clothing& record) = 0;
343 
344  virtual const ESM::Enchantment *createRecord (const ESM::Enchantment& record) = 0;
347 
348  virtual const ESM::Book *createRecord (const ESM::Book& record) = 0;
351 
352  virtual const ESM::CreatureLevList *createOverrideRecord (const ESM::CreatureLevList& record) = 0;
355 
356  virtual const ESM::ItemLevList *createOverrideRecord (const ESM::ItemLevList& record) = 0;
359 
360  virtual void update (float duration, bool paused) = 0;
361 
362  virtual void updateWindowManager () = 0;
363 
364  virtual MWWorld::Ptr placeObject (const MWWorld::ConstPtr& object, float cursorX, float cursorY, int amount) = 0;
370 
371  virtual MWWorld::Ptr dropObjectOnGround (const MWWorld::Ptr& actor, const MWWorld::ConstPtr& object, int amount) = 0;
376 
377  virtual bool canPlaceObject (float cursorX, float cursorY) = 0;
379 
380  virtual void processChangedSettings (const std::set< std::pair<std::string, std::string> >& settings) = 0;
381 
382  virtual bool isFlying(const MWWorld::Ptr &ptr) const = 0;
383  virtual bool isSlowFalling(const MWWorld::Ptr &ptr) const = 0;
384  virtual bool isSwimming(const MWWorld::ConstPtr &object) const = 0;
385  virtual bool isWading(const MWWorld::ConstPtr &object) const = 0;
387  virtual bool isSubmerged(const MWWorld::ConstPtr &object) const = 0;
388  virtual bool isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const = 0;
389  virtual bool isUnderwater(const MWWorld::ConstPtr &object, const float heightRatio) const = 0;
390  virtual bool isWaterWalkingCastableOnTarget(const MWWorld::ConstPtr &target) const = 0;
391  virtual bool isOnGround(const MWWorld::Ptr &ptr) const = 0;
392 
393  virtual osg::Matrixf getActorHeadTransform(const MWWorld::ConstPtr& actor) const = 0;
394 
395  virtual void togglePOV() = 0;
396  virtual bool isFirstPerson() const = 0;
397  virtual void togglePreviewMode(bool enable) = 0;
398  virtual bool toggleVanityMode(bool enable) = 0;
399  virtual void allowVanityMode(bool allow) = 0;
400  virtual void togglePlayerLooking(bool enable) = 0;
401  virtual void changeVanityModeScale(float factor) = 0;
402  virtual bool vanityRotateCamera(float * rot) = 0;
403  virtual void setCameraDistance(float dist, bool adjust = false, bool override = true)=0;
404 
405  virtual void setupPlayer() = 0;
406  virtual void renderPlayer() = 0;
407 
409  virtual void activateDoor(const MWWorld::Ptr& door) = 0;
413  virtual void activateDoor(const MWWorld::Ptr& door, int state) = 0;
414 
415  virtual void getActorsStandingOn (const MWWorld::ConstPtr& object, std::vector<MWWorld::Ptr> &actors) = 0;
416  virtual bool getPlayerStandingOn (const MWWorld::ConstPtr& object) = 0;
417  virtual bool getActorStandingOn (const MWWorld::ConstPtr& object) = 0;
418  virtual bool getPlayerCollidingWith(const MWWorld::ConstPtr& object) = 0;
419  virtual bool getActorCollidingWith (const MWWorld::ConstPtr& object) = 0;
420  virtual void hurtStandingActors (const MWWorld::ConstPtr& object, float dmgPerSecond) = 0;
423  virtual void hurtCollidingActors (const MWWorld::ConstPtr& object, float dmgPerSecond) = 0;
426 
427  virtual float getWindSpeed() = 0;
428 
429  virtual void getContainersOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
431  virtual void getItemsOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
433 
434  virtual bool getLOS(const MWWorld::ConstPtr& actor,const MWWorld::ConstPtr& targetActor) = 0;
436 
437  virtual float getDistToNearestRayHit(const osg::Vec3f& from, const osg::Vec3f& dir, float maxDist, bool includeWater = false) = 0;
438 
439  virtual void enableActorCollision(const MWWorld::Ptr& actor, bool enable) = 0;
440 
442  {
447  };
448 
450  virtual RestPermitted canRest() const = 0;
451 
453  virtual MWRender::Animation* getAnimation(const MWWorld::Ptr &ptr) = 0;
454  virtual const MWRender::Animation* getAnimation(const MWWorld::ConstPtr &ptr) const = 0;
455  virtual void reattachPlayerCamera() = 0;
456 
458  virtual void screenshot (osg::Image* image, int w, int h) = 0;
459  virtual bool screenshot360 (osg::Image* image, std::string settingStr) = 0;
460 
463  virtual bool findExteriorPosition(const std::string &name, ESM::Position &pos) = 0;
464 
467  virtual bool findInteriorPosition(const std::string &name, ESM::Position &pos) = 0;
468 
470  virtual void enableTeleporting(bool enable) = 0;
471 
473  virtual bool isTeleportingEnabled() const = 0;
474 
476  virtual void enableLevitation(bool enable) = 0;
477 
479  virtual bool isLevitationEnabled() const = 0;
480 
481  virtual bool getGodModeState() = 0;
482 
483  virtual bool toggleGodMode() = 0;
484 
485  virtual bool toggleScripts() = 0;
486  virtual bool getScriptsEnabled() const = 0;
487 
493  virtual bool startSpellCast (const MWWorld::Ptr& actor) = 0;
494 
495  virtual void castSpell (const MWWorld::Ptr& actor, bool manualSpell=false) = 0;
496 
497  virtual void launchMagicBolt (const std::string& spellId, const MWWorld::Ptr& caster, const osg::Vec3f& fallbackDirection) = 0;
498  virtual void launchProjectile (MWWorld::Ptr& actor, MWWorld::Ptr& projectile,
499  const osg::Vec3f& worldPos, const osg::Quat& orient, MWWorld::Ptr& bow, float speed, float attackStrength) = 0;
500 
501  virtual void applyLoopingParticles(const MWWorld::Ptr& ptr) = 0;
502 
503  virtual const std::vector<std::string>& getContentFiles() const = 0;
504 
505  virtual void breakInvisibility (const MWWorld::Ptr& actor) = 0;
506 
507  // Allow NPCs to use torches?
508  virtual bool useTorches() const = 0;
509 
510  virtual bool findInteriorPositionInWorldSpace(const MWWorld::CellStore* cell, osg::Vec3f& result) = 0;
511 
514  virtual void teleportToClosestMarker (const MWWorld::Ptr& ptr,
515  const std::string& id) = 0;
516 
518  {
522  };
526  virtual void listDetectedReferences (const MWWorld::Ptr& ptr, std::vector<MWWorld::Ptr>& out,
527  DetectionType type) = 0;
528 
531  virtual void updateDialogueGlobals() = 0;
532 
534  virtual void confiscateStolenItems(const MWWorld::Ptr& ptr) = 0;
535 
536  virtual void goToJail () = 0;
537 
539  virtual void spawnRandomCreature(const std::string& creatureList) = 0;
540 
542  virtual void spawnBloodEffect (const MWWorld::Ptr& ptr, const osg::Vec3f& worldPosition) = 0;
543 
544  virtual void spawnEffect (const std::string& model, const std::string& textureOverride, const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true) = 0;
545 
546  virtual void explodeSpell(const osg::Vec3f& origin, const ESM::EffectList& effects, const MWWorld::Ptr& caster,
547  const MWWorld::Ptr& ignore, ESM::RangeType rangeType, const std::string& id,
548  const std::string& sourceName, const bool fromProjectile=false) = 0;
549 
550  virtual void activate (const MWWorld::Ptr& object, const MWWorld::Ptr& actor) = 0;
551 
553  virtual bool isInStorm() const = 0;
554 
556  virtual osg::Vec3f getStormDirection() const = 0;
557 
559  virtual void resetActors() = 0;
560 
561  virtual bool isWalkingOnWater (const MWWorld::ConstPtr& actor) const = 0;
562 
565  virtual osg::Vec3f aimToTarget(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
566 
568  virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
569 
570  virtual void removeContainerScripts(const MWWorld::Ptr& reference) = 0;
571 
572  virtual bool isPlayerInJail() const = 0;
573 
574  virtual void rest() = 0;
575 
576  virtual void setPlayerTraveling(bool traveling) = 0;
577  virtual bool isPlayerTraveling() const = 0;
578 
579  virtual void rotateWorldObject (const MWWorld::Ptr& ptr, osg::Quat rotate) = 0;
580 
582  virtual float getTerrainHeightAt(const osg::Vec3f& worldPos) const = 0;
583 
585  virtual osg::Vec3f getHalfExtents(const MWWorld::ConstPtr& actor, bool rendering=false) const = 0;
586 
589  virtual std::string exportSceneGraph(const MWWorld::Ptr& ptr) = 0;
590 
592  virtual void preloadEffects(const ESM::EffectList* effectList) = 0;
593  };
594 }
595 
596 #endif
virtual float getDistToNearestRayHit(const osg::Vec3f &from, const osg::Vec3f &dir, float maxDist, bool includeWater=false)=0
virtual std::string getMonthName(int month=-1) const =0
Return name of month (-1: current month)
virtual bool isSubmerged(const MWWorld::ConstPtr &object) const =0
Is the head of the creature underwater?
virtual bool isSlowFalling(const MWWorld::Ptr &ptr) const =0
virtual bool getPlayerStandingOn(const MWWorld::ConstPtr &object)=0
virtual void removeContainerScripts(const MWWorld::Ptr &reference)=0
virtual MWWorld::Ptr searchPtrViaActorId(int actorId)=0
Search is limited to the active cells.
virtual void queueMovement(const MWWorld::Ptr &ptr, const osg::Vec3f &velocity)=0
virtual void startNewGame(bool bypass)=0
virtual osg::Vec3f aimToTarget(const MWWorld::ConstPtr &actor, const MWWorld::ConstPtr &target)=0
virtual bool useTorches() const =0
virtual bool castRay(float x1, float y1, float z1, float x2, float y2, float z2, bool ignoreDoors=false)=0
cast a Ray and return true if there is an object in the ray path.
virtual osg::Vec2f getNorthVector(const MWWorld::CellStore *cell)=0
get north vector for given interior cell
virtual osg::Matrixf getActorHeadTransform(const MWWorld::ConstPtr &actor) const =0
virtual void getContainersOwnedBy(const MWWorld::ConstPtr &npc, std::vector< MWWorld::Ptr > &out)=0
get all containers in active cells owned by this Npc
virtual void setGlobalFloat(const std::string &name, float value)=0
Set value independently from real type.
virtual float getGlobalFloat(const std::string &name) const =0
Get value independently from real type.
virtual MWWorld::Ptr findContainer(const MWWorld::ConstPtr &ptr)=0
virtual bool isCellExterior() const =0
virtual void setHour(double hour)=0
Set in-game time hour.
virtual void setupPlayer()=0
virtual bool toggleVanityMode(bool enable)=0
std::string name
Definition: world.hpp:89
virtual int getSecundaPhase() const =0
Definition: world.hpp:443
virtual void togglePreviewMode(bool enable)=0
Definition: animation.hpp:85
virtual void indexToPosition(int cellX, int cellY, float &x, float &y, bool centre=false) const =0
Convert cell numbers to position.
virtual void spawnBloodEffect(const MWWorld::Ptr &ptr, const osg::Vec3f &worldPosition)=0
Spawn a blood effect for ptr at worldPosition.
virtual void rotateObject(const MWWorld::Ptr &ptr, float x, float y, float z, bool adjust=false)=0
virtual void useDeathCamera()=0
Interface for the World (implemented in MWWorld)
Definition: world.hpp:77
virtual MWWorld::Ptr safePlaceObject(const MWWorld::ConstPtr &ptr, const MWWorld::ConstPtr &referenceObject, MWWorld::CellStore *referenceCell, int direction, float distance)=0
virtual bool toggleScripts()=0
Definition: esmreader.hpp:21
virtual bool getScriptsEnabled() const =0
virtual bool isInStorm() const =0
virtual void enableTeleporting(bool enable)=0
Enables or disables use of teleport spell effects (recall, intervention, etc).
Definition: loadspel.hpp:14
virtual bool isTeleportingEnabled() const =0
Returns true if teleport spell effects are allowed.
virtual MWWorld::CellStore * getExterior(int x, int y)=0
virtual void changeWeather(const std::string &region, const unsigned int id)=0
Definition: loadarmo.hpp:66
virtual bool startSpellCast(const MWWorld::Ptr &actor)=0
startSpellCast attempt to start casting a spell. Might fail immediately if conditions are not met...
virtual bool vanityRotateCamera(float *rot)=0
virtual MWRender::Animation * getAnimation(const MWWorld::Ptr &ptr)=0
virtual bool isLevitationEnabled() const =0
Returns true if levitation spell effect is allowed.
virtual void advanceTime(double hours, bool incremental=false)=0
Advance in-game time.
NPC object representing the player and additional player data.
Definition: player.hpp:32
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
virtual MWWorld::CellStore * getInterior(const std::string &name)=0
Definition: world.hpp:446
virtual void getDoorMarkers(MWWorld::CellStore *cell, std::vector< DoorMarker > &out)=0
get a list of teleport door markers for a given cell, to be displayed on the local map ...
virtual const MWWorld::ESMStore & getStore() const =0
virtual bool canPlaceObject(float cursorX, float cursorY)=0
virtual void rest()=0
virtual bool toggleBorders()=0
virtual void scaleObject(const MWWorld::Ptr &ptr, float scale)=0
std::vector< std::pair< MWWorld::Ptr, MWMechanics::Movement > > PtrMovementList
Definition: world.hpp:64
virtual void deleteObject(const MWWorld::Ptr &ptr)=0
virtual void modRegion(const std::string &regionid, const std::vector< char > &chances)=0
virtual osg::Vec3f getStormDirection() const =0
virtual void launchMagicBolt(const std::string &spellId, const MWWorld::Ptr &caster, const osg::Vec3f &fallbackDirection)=0
virtual bool getActorStandingOn(const MWWorld::ConstPtr &object)=0
virtual void resetActors()=0
Resets all actors in the current active cells to their original location within that cell...
virtual int getDay() const =0
virtual bool isPlayerTraveling() const =0
virtual const Fallback::Map * getFallback() const =0
virtual bool getLOS(const MWWorld::ConstPtr &actor, const MWWorld::ConstPtr &targetActor)=0
get Line of Sight (morrowind stupid implementation)
virtual bool toggleGodMode()=0
virtual int getYear() const =0
virtual void breakInvisibility(const MWWorld::Ptr &actor)=0
World & operator=(const World &)
not implemented
virtual void spawnRandomCreature(const std::string &creatureList)=0
Spawn a random creature from a levelled list next to the player.
Definition: world.hpp:521
float y
Definition: world.hpp:90
virtual void setDay(int day)=0
Set in-game time day.
Definition: loadinglistener.hpp:8
virtual MWWorld::Ptr dropObjectOnGround(const MWWorld::Ptr &actor, const MWWorld::ConstPtr &object, int amount)=0
virtual void changeToCell(const ESM::CellId &cellId, const ESM::Position &position, bool adjustPlayerPos, bool changeEvent=true)=0
virtual int getMasserPhase() const =0
virtual void goToJail()=0
virtual bool isWading(const MWWorld::ConstPtr &object) const =0
RangeType
Definition: defs.hpp:27
virtual MWWorld::LocalScripts & getLocalScripts()=0
virtual void positionToIndex(float x, float y, int &cellX, int &cellY) const =0
Convert position to cell numbers.
Definition: refdata.hpp:29
virtual void update(float duration, bool paused)=0
virtual MWWorld::Ptr getPtr(const std::string &name, bool activeOnly)=0
virtual float getDistanceToFacedObject()=0
virtual void hurtCollidingActors(const MWWorld::ConstPtr &object, float dmgPerSecond)=0
virtual void renderPlayer()=0
virtual void castSpell(const MWWorld::Ptr &actor, bool manualSpell=false)=0
virtual void changeToExteriorCell(const ESM::Position &position, bool adjustPlayerPos, bool changeEvent=true)=0
Definition: esmwriter.hpp:17
virtual void clear()=0
virtual MWWorld::Ptr moveObject(const MWWorld::Ptr &ptr, float x, float y, float z)=0
virtual ~World()
Definition: world.hpp:96
virtual void write(ESM::ESMWriter &writer, Loading::Listener &listener) const =0
virtual bool isCellQuasiExterior() const =0
virtual bool findExteriorPosition(const std::string &name, ESM::Position &pos)=0
virtual bool getActorCollidingWith(const MWWorld::ConstPtr &object)=0
virtual void updateWindowManager()=0
Definition: world.hpp:87
Definition: esmstore.hpp:17
virtual bool getPlayerCollidingWith(const MWWorld::ConstPtr &object)=0
virtual const std::vector< std::string > & getContentFiles() const =0
Definition: world.hpp:520
virtual int countSavedGameRecords() const =0
virtual char getGlobalVariableType(const std::string &name) const =0
Return ' ', if there is no global variable with this name.
virtual void rotateWorldObject(const MWWorld::Ptr &ptr, osg::Quat rotate)=0
virtual RestPermitted canRest() const =0
check if the player is allowed to rest
Definition: loadnpc.hpp:23
virtual bool getGodModeState()=0
virtual void getItemsOwnedBy(const MWWorld::ConstPtr &npc, std::vector< MWWorld::Ptr > &out)=0
get all items in active cells owned by this Npc
ESM::CellId dest
Definition: world.hpp:91
virtual void activateDoor(const MWWorld::Ptr &door)=0
open or close a non-teleport door (depending on current state)
virtual void markCellAsUnchanged()=0
virtual void allowVanityMode(bool allow)=0
Mutable state of a cell.
Definition: cellstore.hpp:51
virtual void setPlayerTraveling(bool traveling)=0
virtual void preloadEffects(const ESM::EffectList *effectList)=0
Preload VFX associated with this effect list.
virtual MWWorld::CellStore * getCell(const ESM::CellId &id)=0
virtual void fixPosition(const MWWorld::Ptr &actor)=0
Attempt to fix position so that the Ptr is no longer inside collision geometry.
virtual bool toggleWater()=0
virtual void setCameraDistance(float dist, bool adjust=false, bool override=true)=0
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
virtual int countSavedGameCells() const =0
virtual float getTerrainHeightAt(const osg::Vec3f &worldPos) const =0
Return terrain height at worldPos position.
virtual void launchProjectile(MWWorld::Ptr &actor, MWWorld::Ptr &projectile, const osg::Vec3f &worldPos, const osg::Quat &orient, MWWorld::Ptr &bow, float speed, float attackStrength)=0
virtual int getCurrentWeather() const =0
virtual bool isWaterWalkingCastableOnTarget(const MWWorld::ConstPtr &target) const =0
virtual const ESM::Potion * createRecord(const ESM::Potion &record)=0
virtual void undeleteObject(const MWWorld::Ptr &ptr)=0
virtual void processChangedSettings(const std::set< std::pair< std::string, std::string > > &settings)=0
Definition: loadlevlist.hpp:46
virtual void setWaterHeight(const float height)=0
float distance(const ESM::Pathgrid::Point &point, float x, float y, float z)
Definition: pathfinding.cpp:69
virtual void activate(const MWWorld::Ptr &object, const MWWorld::Ptr &actor)=0
Definition: loadcell.hpp:64
virtual bool toggleRenderMode(MWRender::RenderMode mode)=0
virtual std::string getCellName(const MWWorld::CellStore *cell=0) const =0
virtual void explodeSpell(const osg::Vec3f &origin, const ESM::EffectList &effects, const MWWorld::Ptr &caster, const MWWorld::Ptr &ignore, ESM::RangeType rangeType, const std::string &id, const std::string &sourceName, const bool fromProjectile=false)=0
In-game time stamp.
Definition: timestamp.hpp:14
virtual void disable(const MWWorld::Ptr &ptr)=0
virtual void getActorsStandingOn(const MWWorld::ConstPtr &object, std::vector< MWWorld::Ptr > &actors)=0
get a list of actors standing on object
virtual int getMonth() const =0
virtual float getWindSpeed()=0
virtual bool isSwimming(const MWWorld::ConstPtr &object) const =0
virtual std::string exportSceneGraph(const MWWorld::Ptr &ptr)=0
virtual bool isPlayerInJail() const =0
virtual bool toggleWorld()=0
Definition: defs.hpp:38
virtual void applyLoopingParticles(const MWWorld::Ptr &ptr)=0
Definition: loadclot.hpp:18
virtual bool isFlying(const MWWorld::Ptr &ptr) const =0
virtual MWWorld::Ptr placeObject(const MWWorld::ConstPtr &ptr, MWWorld::CellStore *cell, ESM::Position pos)=0
Place an object. Makes a copy of the Ptr.
virtual void teleportToClosestMarker(const MWWorld::Ptr &ptr, const std::string &id)=0
Definition: world.hpp:519
virtual bool isWalkingOnWater(const MWWorld::ConstPtr &actor) const =0
virtual void adjustPosition(const MWWorld::Ptr &ptr, bool force)=0
List of active local scripts.
Definition: localscripts.hpp:16
virtual float getTimeScaleFactor() const =0
Definition: loadclas.hpp:18
virtual void changeToInteriorCell(const std::string &cellName, const ESM::Position &position, bool adjustPlayerPos, bool changeEvent=true)=0
RestPermitted
Definition: world.hpp:441
virtual MWWorld::Player & getPlayer()=0
virtual void enable(const MWWorld::Ptr &ptr)=0
virtual void updateDialogueGlobals()=0
World()
Definition: world.hpp:94
virtual void togglePlayerLooking(bool enable)=0
virtual void listDetectedReferences(const MWWorld::Ptr &ptr, std::vector< MWWorld::Ptr > &out, DetectionType type)=0
virtual bool findInteriorPositionInWorldSpace(const MWWorld::CellStore *cell, osg::Vec3f &result)=0
virtual bool isUnderwater(const MWWorld::CellStore *cell, const osg::Vec3f &pos) const =0
virtual MWWorld::Ptr searchPtr(const std::string &name, bool activeOnly)=0
virtual std::vector< ESM::ESMReader > & getEsmReader()=0
virtual bool toggleSky()=0
virtual void reattachPlayerCamera()=0
virtual void setGlobalInt(const std::string &name, int value)=0
Set value independently from real type.
virtual void changeVanityModeScale(float factor)=0
virtual void enableLevitation(bool enable)=0
Enables or disables use of levitation spell effect.
Definition: loadlevlist.hpp:66
virtual float getMaxActivationDistance()=0
virtual MWWorld::Ptr getPlayerPtr()=0
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual bool hasCellChanged() const =0
Has the set of active cells changed, since the last frame?
Definition: loadench.hpp:18
virtual void setMoonColour(bool red)=0
virtual void adjustSky()=0
Definition: loadalch.hpp:18
virtual int getGlobalInt(const std::string &name) const =0
Get value independently from real type.
float x
Definition: world.hpp:90
virtual float getHitDistance(const MWWorld::ConstPtr &actor, const MWWorld::ConstPtr &target)=0
Return the distance between actor's weapon and target's collision box.
virtual bool isOnGround(const MWWorld::Ptr &ptr) const =0
virtual MWWorld::TimeStamp getTimeStamp() const =0
Return current in-game time stamp.
virtual void screenshot(osg::Image *image, int w, int h)=0
Definition: cellid.hpp:11
DetectionType
Definition: world.hpp:517
virtual void enableActorCollision(const MWWorld::Ptr &actor, bool enable)=0
virtual bool findInteriorPosition(const std::string &name, ESM::Position &pos)=0
EffectList, ENAM subrecord.
Definition: effectlist.hpp:33
virtual const ESM::CreatureLevList * createOverrideRecord(const ESM::CreatureLevList &record)=0
virtual void confiscateStolenItems(const MWWorld::Ptr &ptr)=0
Moves all stolen items from ptr to the closest evidence chest.
virtual std::pair< MWWorld::Ptr, osg::Vec3f > getHitContact(const MWWorld::ConstPtr &ptr, float distance, std::vector< MWWorld::Ptr > &targets)=0
virtual void removeRefScript(MWWorld::RefData *ref)=0
virtual void togglePOV()=0
virtual void setMonth(int month)=0
Set in-game time month.
Definition: loadbook.hpp:15
Definition: world.hpp:444
virtual bool toggleCollisionMode()=0
virtual void spawnEffect(const std::string &model, const std::string &textureOverride, const osg::Vec3f &worldPos, float scale=1.f, bool isMagicVFX=true)=0
virtual MWWorld::Ptr getFacedObject()=0
Return pointer to the object the player is looking at, if it is within activation range...
RenderMode
Definition: rendermode.hpp:7
virtual void readRecord(ESM::ESMReader &reader, uint32_t type, const std::map< int, int > &contentFileMap)=0
virtual bool isFirstPerson() const =0
virtual bool screenshot360(osg::Image *image, std::string settingStr)=0
virtual void hurtStandingActors(const MWWorld::ConstPtr &object, float dmgPerSecond)=0
Definition: loadweap.hpp:16
const char * name
Definition: crashcatcher.cpp:67
virtual osg::Vec3f getHalfExtents(const MWWorld::ConstPtr &actor, bool rendering=false) const =0
Return physical or rendering half extents of the given actor.