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()
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)
{
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);
}
}