]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/designer.cpp
Rename Point to Vector
[r2c2.git] / source / designer / designer.cpp
index 2002bd987910a7d28893ba32b1efd15db0671e39..3b43efd11ff5226b64cfa0cc9478a72adca90fde 100644 (file)
@@ -335,14 +335,14 @@ void Designer::add_selection_to_zone()
        show_zone(*cur_zone);
 }
 
-Point Designer::map_pointer_to_ground(int x, int y)
+Vector Designer::map_pointer_to_ground(int x, int y)
 {
        float xf = x*2.0/window.get_width()-1.0;
        float yf = y*2.0/window.get_height()-1.0;
        GL::Vector4 vec = camera.unproject(GL::Vector4(xf, yf, 0, 0));
        const GL::Vector3 &pos = camera.get_position();
 
-       return Point(pos.x-vec.x*pos.z/vec.z, pos.y-vec.y*pos.z/vec.z);
+       return Vector(pos.x-vec.x*pos.z/vec.z, pos.y-vec.y*pos.z/vec.z);
 }
 
 void Designer::tick()
@@ -462,7 +462,7 @@ void Designer::button_press(int x, int y, unsigned btn, unsigned mod)
        y = window.get_height()-y-1;
        mod = Input::mod_from_sys(mod);
 
-       Point ground = map_pointer_to_ground(x, y);
+       Vector ground = map_pointer_to_ground(x, y);
 
        if(mode==CATALOGUE)
        {
@@ -506,7 +506,7 @@ void Designer::pointer_motion(int x, int y)
 
        if(!root.get_child_at(x, y))
        {
-               Point ground = map_pointer_to_ground(x, y);
+               Vector ground = map_pointer_to_ground(x, y);
                measure.pointer_motion(x, y, ground.x, ground.y);
        }
 }