]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/CreatureCreatureCollision.hpp
hooray for könig lookup
[blobs.git] / src / world / CreatureCreatureCollision.hpp
index 1a903ec54428b516eb59efe9224001fde2b8cdb5..0a907952fcc6ed2938243576a96485ac2733972a 100644 (file)
@@ -19,7 +19,7 @@ public:
                const glm::dvec3 &n,
                double depth
        ) : a(&a), b(&b), normal(n), depth(depth) {
-               if (dot(normal, BPos() - APos()) < 0.0) {
+               if (glm::dot(normal, BPos() - APos()) < 0.0) {
                        // make sure normal always is in direction from A to B
                        normal *= -1.0;
                }
@@ -30,10 +30,12 @@ public:
        creature::Creature &A() noexcept { return *a; }
        const creature::Creature &A() const noexcept { return *a; }
        const glm::dvec3 &APos() const noexcept;
+       const glm::dvec3 &AVel() const noexcept;
 
        creature::Creature &B() noexcept { return *b; }
        const creature::Creature &B() const noexcept { return *b; }
        const glm::dvec3 &BPos() const noexcept;
+       const glm::dvec3 &BVel() const noexcept;
 
        const glm::dvec3 &Normal() const noexcept { return normal; }
        double Depth() const noexcept { return depth; }