/* draw feature matches */ void draw_matches (navlcm_feature_match_set_t *matches, const float color[3], int linewidth, int iwidth, int iheight, double ratio, double *trans1, double *trans2, gboolean select, navlcm_feature_match_t *highlight_m, navlcm_feature_match_t *select_m) { if (!matches) return; glLineWidth (linewidth); if (select) glPushName (NAME_MATCH); for (int i=0;i<matches->num;i++) { navlcm_feature_match_t *m = matches->el + i; double x1 = (m->src.col + iwidth*m->src.sensorid)*ratio+trans1[0]; double y1 = m->src.row * ratio + trans1[1]; double x2 = (m->dst[0].col + iwidth*m->dst[0].sensorid)*ratio + trans2[0]; double y2 = m->dst[0].row * ratio + trans2[1]; if (select) glPushName (i); glLineWidth (linewidth); if (!select && (match_equal (m, highlight_m) || match_equal (m, select_m))) glLineWidth (2*linewidth); if (match_equal (m, select_m)) glColor3f (0,1,0);//green else glColor3f (color[0], color[1], color[2]); glBegin (GL_LINES); glVertex2f (x1, y1); glVertex2f (x2, y2); glEnd (); if (select) glPopName (); } if (select) glPopName (); }
void block_2_callback() { table.expect((match_equal(Find(6), 6))); ; table.Remove(6) table.expect((match_equal(Find(6), 0))); ; }
void block_1_callback() { (table.Find(88)) should equal 0; table.expect((match_equal(Find(6), 6))); ; table.expect((match_equal(Find(55), 55))); ; }