]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/layout.cpp
Code reformatting: add spaces around assignment operators
[r2c2.git] / source / 3d / layout.cpp
index 8093081d82c2a1630f99812f04e702a15eed8e91..f3fe3795fa909a1e3cc4d5d259cbe9c31df61ca0 100644 (file)
@@ -35,7 +35,7 @@ Layout3D::~Layout3D()
 
 void Layout3D::set_quality(unsigned q)
 {
-       quality=q;
+       quality = q;
        for(list<Track3D *>::iterator i=tracks.begin(); i!=tracks.end(); ++i)
                (*i)->set_quality(quality);
 }
@@ -76,26 +76,26 @@ Track3D *Layout3D::pick_track(float x, float y, float size) const
        glLoadIdentity();
 
        double clip[4];
-       clip[0]=1;
-       clip[1]=0;
-       clip[2]=x-size;
-       clip[3]=0;
+       clip[0] = 1;
+       clip[1] = 0;
+       clip[2] = x-size;
+       clip[3] = 0;
        glClipPlane(GL_CLIP_PLANE0, clip);
        glEnable(GL_CLIP_PLANE0);
 
-       clip[0]=-1;
-       clip[2]=-(x+size);
+       clip[0] = -1;
+       clip[2] = -(x+size);
        glClipPlane(GL_CLIP_PLANE1, clip);
        glEnable(GL_CLIP_PLANE1);
 
-       clip[0]=0;
-       clip[1]=1;
-       clip[2]=y-size;
+       clip[0] = 0;
+       clip[1] = 1;
+       clip[2] = y-size;
        glClipPlane(GL_CLIP_PLANE2, clip);
        glEnable(GL_CLIP_PLANE2);
 
-       clip[1]=-1;
-       clip[2]=-(y+size);
+       clip[1] = -1;
+       clip[2] = -(y+size);
        glClipPlane(GL_CLIP_PLANE3, clip);
        glEnable(GL_CLIP_PLANE3);
 
@@ -109,13 +109,13 @@ Track3D *Layout3D::pick_track(float x, float y, float size) const
        glDisable(GL_CLIP_PLANE3);
 
        GL::render_mode(GL::RENDER);
-       Track3D *track=0;
-       unsigned track_depth=numeric_limits<unsigned>::max();
+       Track3D *track = 0;
+       unsigned track_depth = numeric_limits<unsigned>::max();
        for(vector<GL::SelectRecord>::iterator i=select_buf.begin(); i!=select_buf.end(); ++i)
                if(i->min_depth<track_depth)
                {
-                       track=reinterpret_cast<Track3D *>(i->names.back());
-                       track_depth=i->min_depth;
+                       track = reinterpret_cast<Track3D *>(i->names.back());
+                       track_depth = i->min_depth;
                }
 
        return track;