X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Flayout.cpp;h=f3fe3795fa909a1e3cc4d5d259cbe9c31df61ca0;hb=6dc18b0e518407bd2a86602bae1e9bbae05da7c8;hp=8093081d82c2a1630f99812f04e702a15eed8e91;hpb=540e931ec79129c8776f48434ff5b230b53337f1;p=r2c2.git diff --git a/source/3d/layout.cpp b/source/3d/layout.cpp index 8093081..f3fe379 100644 --- a/source/3d/layout.cpp +++ b/source/3d/layout.cpp @@ -35,7 +35,7 @@ Layout3D::~Layout3D() void Layout3D::set_quality(unsigned q) { - quality=q; + quality = q; for(list::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::max(); + Track3D *track = 0; + unsigned track_depth = numeric_limits::max(); for(vector::iterator i=select_buf.begin(); i!=select_buf.end(); ++i) if(i->min_depth(i->names.back()); - track_depth=i->min_depth; + track = reinterpret_cast(i->names.back()); + track_depth = i->min_depth; } return track;