}
void
-GlSeqBrowser::link(const vector<int>& path, const vector<bool>& rc, int )
+GlSeqBrowser::link(const vector<int>& path, const vector<bool>& rc, int length)
{
if (path.size() < 2) {
// should i throw an error instead?
y2 += track_container[track_i+1]->height()/2;
bool rcFlag = (prev_rc or *rc_i) and !(prev_rc and *rc_i);
- Segment s(prev_x, y1, *path_i, y2, rcFlag);
+ Segment s(prev_x, y1, *path_i, y2, rcFlag, length);
s.path_ids.insert(pathid);
path_segments[track_i][p] = s;
} else {
//found
found_segment->second.path_ids.insert(pathid);
+ // make each segment the size of the largest of any link between these
+ // two bases
+ if (found_segment->second.length < length) {
+ found_segment->second.length = length;
+ }
}
prev_x = *path_i;
prev_rc = *rc_i;
glLineWidth(1);
glEnable(GL_BLEND);
glDepthMask(GL_FALSE);
+ const float zdepth = -1.0;
// each vector contains path_segment_maps of all the connections
// between this track and the next
path_segment_map_vector::const_iterator psmv_i;
} else {
glColor4f(0.7, 0.7, 1.0, 0.4);
}
- /*
- if (selected_paths.size() == 0 or selected.size() > 0) {
- glColor3f(0.0, 0.0, 1.0);
- } else {
- glColor3f(0.8, 0.8, 1.0);
- }
- */
}
// save the multipart name for our segment
glPushName(path_index); glPushName(key.first); glPushName(key.second);
- glBegin(GL_LINES);
- float seq_start_x = track_container[path_index]->x();
- float seq_end_x = track_container[path_index+1]->x();
- glVertex3f(s.start.x + seq_start_x, s.start.y, -1);
- glVertex3f(s.end.x + seq_end_x , s.end.y, -1);
- glEnd();
+ float seq_start_x = s.start.x
+ + track_container[path_index]->x();
+ float seq_end_x = s.end.x
+ + track_container[path_index+1]->x();
+ // add in length
+ float seq_start_x_length = s.start.x
+ + s.length
+ + track_container[path_index]->x();
+ float seq_end_x_length = s.end.x
+ + s.length
+ + track_container[path_index+1]->x();
+ //glBegin(GL_LINES);
+ // glVertex3f(seq_start_x, s.start.y, -1);
+ // glVertex3f(seq_end_x , s.end.y, -1);
+ //glEnd();
+
+ glBegin(GL_QUADS);
+ glVertex3f(seq_start_x, s.start.y, zdepth);
+ glVertex3f(seq_end_x, s.end.y, zdepth);
+ glVertex3f(seq_end_x_length, s.end.y, zdepth);
+ glVertex3f(seq_start_x_length, s.start.y, zdepth);
+ glEnd();
// clear the names
glPopName(); glPopName(); glPopName();
}