]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.h
renamed namespace geometry -> math
[l2e.git] / src / map / Entity.h
index d1746c71a3cd73ff77dc37fb03de899796bdcf6f..be3197d9da4010fa6e9fc2100171c3e3d44a2f62 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "../battle/fwd.h"
 #include "../battle/Monster.h"
-#include "../geometry/Vector.h"
+#include "../math/Vector.h"
 #include "../graphics/fwd.h"
 #include "../graphics/Animation.h"
 
@@ -38,20 +38,20 @@ public:
 
 public:
        /// Pixel resolved position of the entity's top left corner on the map.
-       geometry::Vector<float> &Position() { return position; }
-       const geometry::Vector<float> &Position() const { return position; }
+       math::Vector<float> &Position() { return position; }
+       const math::Vector<float> &Position() const { return position; }
 
        /// Velocity of the entity in pixels per second.
-       geometry::Vector<float> &Velocity() { return velocity; }
-       const geometry::Vector<float> &Velocity() const { return velocity; }
+       math::Vector<float> &Velocity() { return velocity; }
+       const math::Vector<float> &Velocity() const { return velocity; }
 
        /// Offset of the entity's sprite's to left corner relative to Position().
-       geometry::Vector<int> &SpriteOffset() { return spriteOffset; }
-       const geometry::Vector<int> &SpriteOffset() const { return spriteOffset; }
+       math::Vector<int> &SpriteOffset() { return spriteOffset; }
+       const math::Vector<int> &SpriteOffset() const { return spriteOffset; }
 
        /// Reset the entity to the stored tile coordinates (usually set when
        /// loading game data).
-       void ResetPosition(const geometry::Vector<int> &tileSize) { position = tilePosition * tileSize; }
+       void ResetPosition(const math::Vector<int> &tileSize) { position = tilePosition * tileSize; }
 
        /// Set the animation to use for animated entities.
        /// For orientable entities, the animation  should have north, south, east,
@@ -124,12 +124,12 @@ public:
        void RemoveFollower(Entity *);
 
        /// Check if position locks into grid defined by given tileSize.
-       bool TileLock(const geometry::Vector<int> &tileSize) const;
+       bool TileLock(const math::Vector<int> &tileSize) const;
 
        /// Integrate this entity's physical properties over given time interval.
        void Update(float deltaT);
 
-       void Render(SDL_Surface *, const geometry::Vector<int> &offset) const;
+       void Render(SDL_Surface *, const math::Vector<int> &offset) const;
 
        static void CreateTypeDescription();
        static void Construct(void *);
@@ -146,10 +146,10 @@ private:
        battle::Monster **monsters;
        int numMonsters;
        graphics::AnimationRunner runner;
-       geometry::Vector<int> spriteOffset;
-       geometry::Vector<int> tilePosition;
-       geometry::Vector<float> position;
-       geometry::Vector<float> velocity;
+       math::Vector<int> spriteOffset;
+       math::Vector<int> tilePosition;
+       math::Vector<float> position;
+       math::Vector<float> velocity;
        Orientation orientation;
        float speed;
        int flags;