diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2015-04-01 14:26:35 -0700 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2015-04-01 16:11:48 -0700 |
commit | fd526ae68ec193574fb69ca22df59134d3ec13ca (patch) | |
tree | daaa7a5d0f2aeabec8465eac562bdf7733b0c587 /src/mbgl/geometry/anchor.hpp | |
parent | dda1b770daa2c009abdaaa48d40917abc1571ca3 (diff) | |
download | qtlocation-mapboxgl-fd526ae68ec193574fb69ca22df59134d3ec13ca.tar.gz |
port the remained of CollisionTile
Diffstat (limited to 'src/mbgl/geometry/anchor.hpp')
-rw-r--r-- | src/mbgl/geometry/anchor.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/geometry/anchor.hpp b/src/mbgl/geometry/anchor.hpp index d30394f0b9..6ebb0e3be6 100644 --- a/src/mbgl/geometry/anchor.hpp +++ b/src/mbgl/geometry/anchor.hpp @@ -16,10 +16,15 @@ struct Anchor { : x(x_), y(y_), angle(angle_), scale(scale_) {} explicit Anchor(float x_, float y_, float angle_, float scale_, int segment_) : x(x_), y(y_), angle(angle_), scale(scale_), segment(segment_) {} + + template <typename M> + inline Anchor matMul(const M &m) const { + return Anchor{m[0] * x + m[1] * y, m[2] * x + m[3] * y, angle, scale, segment}; + } }; typedef std::vector<Anchor> Anchors; } -#endif
\ No newline at end of file +#endif |