]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/Situation.hpp
random walks
[blobs.git] / src / creature / Situation.hpp
index 4205cff449c8e0f1d57cdaedd39c56662c62ddd2..561f106c78b848ce3f4ca6c79a7b44c81c747e99 100644 (file)
@@ -53,10 +53,7 @@ public:
        bool OnPlanet() const noexcept;
        world::Planet &GetPlanet() const noexcept { return *planet; }
        bool OnSurface() const noexcept;
-       int Surface() const noexcept { return surface; }
        const glm::dvec3 &Position() const noexcept { return state.pos; }
-       bool OnTile() const noexcept;
-       glm::ivec2 SurfacePosition() const noexcept;
        world::Tile &GetTile() const noexcept;
        const world::TileType &GetTileType() const noexcept;
 
@@ -64,18 +61,20 @@ public:
        const State &GetState() const noexcept { return state; }
 
        const glm::dvec3 &Velocity() const noexcept { return state.vel; }
-       bool Moving() const noexcept { return glm::length2(state.vel) > 0.0000001; }
+       bool Moving() const noexcept { return glm::length2(state.vel) > 0.000001; }
        void Move(const glm::dvec3 &dp) noexcept;
+       void Accelerate(const glm::dvec3 &dv) noexcept;
+       void EnforceConstraints(State &) noexcept;
+       void CheckWrap() noexcept;
 
        void Heading(const glm::dvec3 &h) noexcept { state.dir = h; }
        const glm::dvec3 &Heading() const noexcept { return state.dir; }
 
-       void SetPlanetSurface(world::Planet &, int srf, const glm::dvec3 &pos) noexcept;
+       void SetPlanetSurface(world::Planet &, const glm::dvec3 &pos) noexcept;
 
 public:
        world::Planet *planet;
        State state;
-       int surface;
        enum {
                LOST,
                PLANET_SURFACE,