glfw version of sample app

This commit is contained in:
Konstantin Käfer
2014-01-07 12:10:14 +01:00
commit 44b43fe5a6
28 changed files with 1376 additions and 0 deletions

21
src/map/transform.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include <llmr/map/transform.hpp>
using namespace llmr;
transform::transform()
: x(0.0f),
y(0.0f),
scale(1.0f) {
}
void transform::moveBy(double dx, double dy) {
x += dx;
y += dy;
}
void transform::scaleBy(double ds, double cx, double cy) {
scale *= ds;
x = x * ds + cx * (1 - ds);
y = y * ds + cy * (1 - ds);
}