]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/measure.cpp
Support using a mesh as a background
[r2c2.git] / source / designer / measure.cpp
index 6f1d7bc8d5943bf73a00d4d94efe1bed7a8ef4bf..ee08ba7943276793961ed5cfeba072c025a72752 100644 (file)
@@ -1,9 +1,17 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
 #include <cmath>
 #include <GL/gl.h>
 #include "designer.h"
 #include "3d/layout.h"
 #include "measure.h"
 
+using namespace std;
 using namespace Marklin;
 using namespace Msp;
 
@@ -19,8 +27,8 @@ void Measure::start()
 
 void Measure::snap_to_tracks(Point &pt, float &dir)
 {
-       const TrackSeq &ltracks=designer.get_layout()->get_tracks();
-       for(TrackSeq::const_iterator i=ltracks.begin(); i!=ltracks.end(); ++i)
+       const set<Track *> &ltracks=designer.get_layout()->get_tracks();
+       for(set<Track *>::const_iterator i=ltracks.begin(); i!=ltracks.end(); ++i)
                if((*i)->snap(pt, dir))
                        return;
 }