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 preloadCommonAssets() = 0;
99 
100  virtual void startNewGame (bool bypass) = 0;
102 
103  virtual void clear() = 0;
104 
105  virtual int countSavedGameRecords() const = 0;
106  virtual int countSavedGameCells() const = 0;
107 
108  virtual void write (ESM::ESMWriter& writer, Loading::Listener& listener) const = 0;
109 
110  virtual void readRecord (ESM::ESMReader& reader, uint32_t type,
111  const std::map<int, int>& contentFileMap) = 0;
112 
113  virtual MWWorld::CellStore *getExterior (int x, int y) = 0;
114 
115  virtual MWWorld::CellStore *getInterior (const std::string& name) = 0;
116 
117  virtual MWWorld::CellStore *getCell (const ESM::CellId& id) = 0;
118 
119  virtual void useDeathCamera() = 0;
120 
121  virtual void setWaterHeight(const float height) = 0;
122 
123  virtual bool toggleWater() = 0;
124  virtual bool toggleWorld() = 0;
125 
126  virtual void adjustSky() = 0;
127 
128  virtual const Fallback::Map *getFallback () const = 0;
129 
130  virtual MWWorld::Player& getPlayer() = 0;
131  virtual MWWorld::Ptr getPlayerPtr() = 0;
132 
133  virtual const MWWorld::ESMStore& getStore() const = 0;
134 
135  virtual std::vector<ESM::ESMReader>& getEsmReader() = 0;
136 
137  virtual MWWorld::LocalScripts& getLocalScripts() = 0;
138 
139  virtual bool hasCellChanged() const = 0;
141 
142  virtual bool isCellExterior() const = 0;
143 
144  virtual bool isCellQuasiExterior() const = 0;
145 
146  virtual osg::Vec2f getNorthVector (const MWWorld::CellStore* cell) = 0;
148 
149  virtual void getDoorMarkers (MWWorld::CellStore* cell, std::vector<DoorMarker>& out) = 0;
151 
152  virtual void setGlobalInt (const std::string& name, int value) = 0;
154 
155  virtual void setGlobalFloat (const std::string& name, float value) = 0;
157 
158  virtual int getGlobalInt (const std::string& name) const = 0;
160 
161  virtual float getGlobalFloat (const std::string& name) const = 0;
163 
164  virtual char getGlobalVariableType (const std::string& name) const = 0;
166 
167  virtual std::string getCellName (const MWWorld::CellStore *cell = 0) const = 0;
172 
173  virtual void removeRefScript (MWWorld::RefData *ref) = 0;
174  //< Remove the script attached to ref from mLocalScripts
175 
176  virtual MWWorld::Ptr getPtr (const std::string& name, bool activeOnly) = 0;
179 
180  virtual MWWorld::Ptr searchPtr (const std::string& name, bool activeOnly) = 0;
183 
184  virtual MWWorld::Ptr searchPtrViaActorId (int actorId) = 0;
186 
187  virtual MWWorld::Ptr findContainer (const MWWorld::ConstPtr& ptr) = 0;
190 
191  virtual void enable (const MWWorld::Ptr& ptr) = 0;
192 
193  virtual void disable (const MWWorld::Ptr& ptr) = 0;
194 
195  virtual void advanceTime (double hours, bool incremental = false) = 0;
197 
198  virtual void setHour (double hour) = 0;
200 
201  virtual void setMonth (int month) = 0;
203 
204  virtual void setDay (int day) = 0;
206 
207  virtual int getDay() const = 0;
208  virtual int getMonth() const = 0;
209  virtual int getYear() const = 0;
210 
211  virtual std::string getMonthName (int month = -1) const = 0;
213 
214  virtual MWWorld::TimeStamp getTimeStamp() const = 0;
216 
217  virtual bool toggleSky() = 0;
219 
220  virtual void changeWeather(const std::string& region, const unsigned int id) = 0;
221 
222  virtual int getCurrentWeather() const = 0;
223 
224  virtual int getMasserPhase() const = 0;
225 
226  virtual int getSecundaPhase() const = 0;
227 
228  virtual void setMoonColour (bool red) = 0;
229 
230  virtual void modRegion(const std::string &regionid, const std::vector<char> &chances) = 0;
231 
232  virtual float getTimeScaleFactor() const = 0;
233 
234  virtual void changeToInteriorCell (const std::string& cellName, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
237 
238  virtual void changeToExteriorCell (const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
241 
242  virtual void changeToCell (const ESM::CellId& cellId, const ESM::Position& position, bool adjustPlayerPos, bool changeEvent=true) = 0;
244 
245  virtual const ESM::Cell *getExterior (const std::string& cellName) const = 0;
247 
248  virtual void markCellAsUnchanged() = 0;
249 
250  virtual MWWorld::Ptr getFacedObject() = 0;
252 
253  virtual float getDistanceToFacedObject() = 0;
254 
255  virtual float getMaxActivationDistance() = 0;
256 
260  virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::ConstPtr &ptr, float distance) = 0;
261 
262  virtual void adjustPosition (const MWWorld::Ptr& ptr, bool force) = 0;
265 
266  virtual void fixPosition (const MWWorld::Ptr& actor) = 0;
268 
270  virtual void deleteObject (const MWWorld::Ptr& ptr) = 0;
271  virtual void undeleteObject (const MWWorld::Ptr& ptr) = 0;
272 
273  virtual MWWorld::Ptr moveObject (const MWWorld::Ptr& ptr, float x, float y, float z) = 0;
275 
276  virtual MWWorld::Ptr moveObject(const MWWorld::Ptr &ptr, MWWorld::CellStore* newCell, float x, float y, float z, bool movePhysics=true) = 0;
278 
279  virtual void scaleObject (const MWWorld::Ptr& ptr, float scale) = 0;
280 
281  virtual void rotateObject(const MWWorld::Ptr& ptr,float x,float y,float z, bool adjust = false) = 0;
282 
283  virtual MWWorld::Ptr placeObject(const MWWorld::ConstPtr& ptr, MWWorld::CellStore* cell, ESM::Position pos) = 0;
285 
286  virtual MWWorld::Ptr safePlaceObject (const MWWorld::ConstPtr& ptr, const MWWorld::ConstPtr& referenceObject, MWWorld::CellStore* referenceCell, int direction, float distance) = 0;
289 
290  virtual void indexToPosition (int cellX, int cellY, float &x, float &y, bool centre = false)
291  const = 0;
293 
294  virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0;
296 
297  virtual void queueMovement(const MWWorld::Ptr &ptr, const osg::Vec3f &velocity) = 0;
300 
301  virtual bool castRay (float x1, float y1, float z1, float x2, float y2, float z2) = 0;
303 
304  virtual bool toggleCollisionMode() = 0;
308 
309  virtual bool toggleRenderMode (MWRender::RenderMode mode) = 0;
312 
313  virtual const ESM::Potion *createRecord (const ESM::Potion& record) = 0;
316 
317  virtual const ESM::Spell *createRecord (const ESM::Spell& record) = 0;
320 
321  virtual const ESM::Class *createRecord (const ESM::Class& record) = 0;
324 
325  virtual const ESM::Cell *createRecord (const ESM::Cell& record) = 0;
328 
329  virtual const ESM::NPC *createRecord(const ESM::NPC &record) = 0;
332 
333  virtual const ESM::Armor *createRecord (const ESM::Armor& record) = 0;
336 
337  virtual const ESM::Weapon *createRecord (const ESM::Weapon& record) = 0;
340 
341  virtual const ESM::Clothing *createRecord (const ESM::Clothing& record) = 0;
344 
345  virtual const ESM::Enchantment *createRecord (const ESM::Enchantment& record) = 0;
348 
349  virtual const ESM::Book *createRecord (const ESM::Book& record) = 0;
352 
353  virtual const ESM::CreatureLevList *createOverrideRecord (const ESM::CreatureLevList& record) = 0;
356 
357  virtual const ESM::ItemLevList *createOverrideRecord (const ESM::ItemLevList& record) = 0;
360 
361  virtual void update (float duration, bool paused) = 0;
362 
363  virtual MWWorld::Ptr placeObject (const MWWorld::ConstPtr& object, float cursorX, float cursorY, int amount) = 0;
369 
370  virtual MWWorld::Ptr dropObjectOnGround (const MWWorld::Ptr& actor, const MWWorld::ConstPtr& object, int amount) = 0;
375 
376  virtual bool canPlaceObject (float cursorX, float cursorY) = 0;
378 
379  virtual void processChangedSettings (const std::set< std::pair<std::string, std::string> >& settings) = 0;
380 
381  virtual bool isFlying(const MWWorld::Ptr &ptr) const = 0;
382  virtual bool isSlowFalling(const MWWorld::Ptr &ptr) const = 0;
383  virtual bool isSwimming(const MWWorld::ConstPtr &object) const = 0;
384  virtual bool isWading(const MWWorld::ConstPtr &object) const = 0;
386  virtual bool isSubmerged(const MWWorld::ConstPtr &object) const = 0;
387  virtual bool isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const = 0;
388  virtual bool isWaterWalkingCastableOnTarget(const MWWorld::ConstPtr &target) const = 0;
389  virtual bool isOnGround(const MWWorld::Ptr &ptr) const = 0;
390 
391  virtual osg::Matrixf getActorHeadTransform(const MWWorld::ConstPtr& actor) const = 0;
392 
393  virtual void togglePOV() = 0;
394  virtual bool isFirstPerson() const = 0;
395  virtual void togglePreviewMode(bool enable) = 0;
396  virtual bool toggleVanityMode(bool enable) = 0;
397  virtual void allowVanityMode(bool allow) = 0;
398  virtual void togglePlayerLooking(bool enable) = 0;
399  virtual void changeVanityModeScale(float factor) = 0;
400  virtual bool vanityRotateCamera(float * rot) = 0;
401  virtual void setCameraDistance(float dist, bool adjust = false, bool override = true)=0;
402 
403  virtual void setupPlayer() = 0;
404  virtual void renderPlayer() = 0;
405 
407  virtual void activateDoor(const MWWorld::Ptr& door) = 0;
411  virtual void activateDoor(const MWWorld::Ptr& door, int state) = 0;
412 
413  virtual bool getPlayerStandingOn (const MWWorld::ConstPtr& object) = 0;
414  virtual bool getActorStandingOn (const MWWorld::ConstPtr& object) = 0;
415  virtual bool getPlayerCollidingWith(const MWWorld::ConstPtr& object) = 0;
416  virtual bool getActorCollidingWith (const MWWorld::ConstPtr& object) = 0;
417  virtual void hurtStandingActors (const MWWorld::ConstPtr& object, float dmgPerSecond) = 0;
420  virtual void hurtCollidingActors (const MWWorld::ConstPtr& object, float dmgPerSecond) = 0;
423 
424  virtual float getWindSpeed() = 0;
425 
426  virtual void getContainersOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
428  virtual void getItemsOwnedBy (const MWWorld::ConstPtr& npc, std::vector<MWWorld::Ptr>& out) = 0;
430 
431  virtual bool getLOS(const MWWorld::ConstPtr& actor,const MWWorld::ConstPtr& targetActor) = 0;
433 
434  virtual float getDistToNearestRayHit(const osg::Vec3f& from, const osg::Vec3f& dir, float maxDist, bool includeWater = false) = 0;
435 
436  virtual void enableActorCollision(const MWWorld::Ptr& actor, bool enable) = 0;
437 
438  virtual int canRest() = 0;
444 
446  virtual MWRender::Animation* getAnimation(const MWWorld::Ptr &ptr) = 0;
447  virtual const MWRender::Animation* getAnimation(const MWWorld::ConstPtr &ptr) const = 0;
448  virtual void reattachPlayerCamera() = 0;
449 
451  virtual void screenshot (osg::Image* image, int w, int h) = 0;
452 
455  virtual bool findExteriorPosition(const std::string &name, ESM::Position &pos) = 0;
456 
459  virtual bool findInteriorPosition(const std::string &name, ESM::Position &pos) = 0;
460 
462  virtual void enableTeleporting(bool enable) = 0;
463 
465  virtual bool isTeleportingEnabled() const = 0;
466 
468  virtual void enableLevitation(bool enable) = 0;
469 
471  virtual bool isLevitationEnabled() const = 0;
472 
473  virtual bool getGodModeState() = 0;
474 
475  virtual bool toggleGodMode() = 0;
476 
477  virtual bool toggleScripts() = 0;
478  virtual bool getScriptsEnabled() const = 0;
479 
485  virtual bool startSpellCast (const MWWorld::Ptr& actor) = 0;
486 
487  virtual void castSpell (const MWWorld::Ptr& actor) = 0;
488 
489  virtual void launchMagicBolt (const std::string& spellId, bool stack, const ESM::EffectList& effects,
490  const MWWorld::Ptr& caster, const std::string& sourceName, const osg::Vec3f& fallbackDirection) = 0;
491  virtual void launchProjectile (MWWorld::Ptr actor, MWWorld::ConstPtr projectile,
492  const osg::Vec3f& worldPos, const osg::Quat& orient, MWWorld::Ptr bow, float speed, float attackStrength) = 0;
493 
494  virtual const std::vector<std::string>& getContentFiles() const = 0;
495 
496  virtual void breakInvisibility (const MWWorld::Ptr& actor) = 0;
497 
498  // Are we in an exterior or pseudo-exterior cell and it's night?
499  virtual bool isDark() const = 0;
500 
501  virtual bool findInteriorPositionInWorldSpace(const MWWorld::CellStore* cell, osg::Vec3f& result) = 0;
502 
505  virtual void teleportToClosestMarker (const MWWorld::Ptr& ptr,
506  const std::string& id) = 0;
507 
509  {
513  };
517  virtual void listDetectedReferences (const MWWorld::Ptr& ptr, std::vector<MWWorld::Ptr>& out,
518  DetectionType type) = 0;
519 
522  virtual void updateDialogueGlobals() = 0;
523 
525  virtual void confiscateStolenItems(const MWWorld::Ptr& ptr) = 0;
526 
527  virtual void goToJail () = 0;
528 
530  virtual void spawnRandomCreature(const std::string& creatureList) = 0;
531 
533  virtual void spawnBloodEffect (const MWWorld::Ptr& ptr, const osg::Vec3f& worldPosition) = 0;
534 
535  virtual void spawnEffect (const std::string& model, const std::string& textureOverride, const osg::Vec3f& worldPos) = 0;
536 
537  virtual void explodeSpell(const osg::Vec3f& origin, const ESM::EffectList& effects, const MWWorld::Ptr& caster,
538  const MWWorld::Ptr& ignore, ESM::RangeType rangeType, const std::string& id,
539  const std::string& sourceName, const bool fromProjectile=false) = 0;
540 
541  virtual void activate (const MWWorld::Ptr& object, const MWWorld::Ptr& actor) = 0;
542 
544  virtual bool isInStorm() const = 0;
545 
547  virtual osg::Vec3f getStormDirection() const = 0;
548 
550  virtual void resetActors() = 0;
551 
552  virtual bool isWalkingOnWater (const MWWorld::ConstPtr& actor) const = 0;
553 
556  virtual osg::Vec3f aimToTarget(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
557 
559  virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
560 
561  virtual void removeContainerScripts(const MWWorld::Ptr& reference) = 0;
562 
563  virtual bool isPlayerInJail() const = 0;
564 
566  virtual float getTerrainHeightAt(const osg::Vec3f& worldPos) const = 0;
567 
569  virtual osg::Vec3f getHalfExtents(const MWWorld::ConstPtr& actor, bool rendering=false) const = 0;
570  };
571 }
572 
573 #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 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
virtual void togglePreviewMode(bool enable)=0
Definition: animation.hpp:77
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
virtual void spawnEffect(const std::string &model, const std::string &textureOverride, const osg::Vec3f &worldPos)=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 int canRest()=0
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:30
contains settings imported from the Morrowind INI file.
Definition: fallback.hpp:12
virtual MWWorld::CellStore * getInterior(const std::string &name)=0
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 std::pair< MWWorld::Ptr, osg::Vec3f > getHitContact(const MWWorld::ConstPtr &ptr, float distance)=0
virtual bool canPlaceObject(float cursorX, float cursorY)=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 bool getActorStandingOn(const MWWorld::ConstPtr &object)=0
virtual void launchMagicBolt(const std::string &spellId, bool stack, const ESM::EffectList &effects, const MWWorld::Ptr &caster, const std::string &sourceName, const osg::Vec3f &fallbackDirection)=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 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:512
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 castRay(float x1, float y1, float z1, float x2, float y2, float z2)=0
cast a Ray and return true if there is an object in the ray path.
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 preloadCommonAssets()=0
virtual void hurtCollidingActors(const MWWorld::ConstPtr &object, float dmgPerSecond)=0
virtual void renderPlayer()=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
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:511
virtual int countSavedGameRecords() const =0
virtual void castSpell(const MWWorld::Ptr &actor)=0
virtual char getGlobalVariableType(const std::string &name) const =0
Return ' ', if there is no global variable with this name.
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:53
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 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 int getMonth() const =0
virtual float getWindSpeed()=0
virtual bool isSwimming(const MWWorld::ConstPtr &object) const =0
virtual void launchProjectile(MWWorld::Ptr actor, MWWorld::ConstPtr projectile, const osg::Vec3f &worldPos, const osg::Quat &orient, MWWorld::Ptr bow, float speed, float attackStrength)=0
virtual bool isPlayerInJail() const =0
virtual bool toggleWorld()=0
Definition: defs.hpp:38
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:510
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
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
virtual bool isDark() const =0
DetectionType
Definition: world.hpp:508
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 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
virtual bool toggleCollisionMode()=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 void hurtStandingActors(const MWWorld::ConstPtr &object, float dmgPerSecond)=0
Definition: loadweap.hpp:16
const char * name
Definition: crashcatcher.cpp:59
virtual osg::Vec3f getHalfExtents(const MWWorld::ConstPtr &actor, bool rendering=false) const =0
Return physical or rendering half extents of the given actor.