diff --git a/main.cu b/main.cu index 5a58e81..6771b82 100644 --- a/main.cu +++ b/main.cu @@ -122,30 +122,11 @@ void glut_render_modelview(){ //draws the network(s) void glut_render(void) { - if(ind == 0){ - if(num_nets == 1){ //if a single network is loaded - glut_render_single_projection(); //fill the entire viewport - glut_render_modelview(); //set up the modelview matrix with camera details - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear the screen - GT.glCenterline0(); //render the GT network (the only one loaded) - } - - if(num_nets == 2){ //if two networks are loaded - - glut_render_left_projection(); //set up a projection for the left half of the window - glut_render_modelview(); //set up the modelview matrix using camera details - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear the screen - - glEnable(GL_TEXTURE_1D); //enable texture mapping - glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //texture map will be used as the network color - glBindTexture(GL_TEXTURE_1D, cmap_tex); //bind the Brewer texture map - - GT.glCenterline(GT.nmags() - 1); //render the GT network - - glut_render_right_projection(); //set up a projection for the right half of the window - glut_render_modelview(); //set up the modelview matrix using camera details - T.glCenterline(T.nmags() - 1); //render the T network - } + if(num_nets == 1){ //if a single network is loaded + glut_render_single_projection(); //fill the entire viewport + glut_render_modelview(); //set up the modelview matrix with camera details + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear the screen + GT.glCenterline(); //render the GT network (the only one loaded) } else{ if(num_nets == 1){ //if a single network is loaded @@ -162,19 +143,17 @@ void glut_render(void) { glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //texture map will be used as the network color glBindTexture(GL_TEXTURE_1D, cmap_tex); //bind the Brewer texture map - _GT.glCenterline(_GT.nmags() - 1); //render the GT network + _GT.glCenterline(); //render the GT network glut_render_right_projection(); //set up a projection for the right half of the window glut_render_modelview(); //set up the modelview matrix using camera details - _T.glCenterline(_T.nmags() - 1); //render the T network + _T.glCenterline(); //render the T network - } - else{ - glut_render_left_projection(); //set up a projection for the left half of the window - glut_render_modelview(); //set up the modelview matrix using camera details - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //clear the screen + GT.glCenterline(); //render the GT network - _GT.glRandColorCenterlineGT(dlist1, _gt_t, colormap); + glut_render_right_projection(); //set up a projection for the right half of the window + glut_render_modelview(); //set up the modelview matrix using camera details + T.glCenterline(); //render the T network glut_render_right_projection(); //set up a projection for the right half of the window glut_render_modelview(); //set up the modelview matrix using camera details @@ -375,8 +354,8 @@ void compare(float sigma, int device){ T = T.compare(GT, sigma, device); //compare the test case to the ground truth - store errors in T //calculate the metrics - float FPR = GT.average(0); //calculate the metrics - float FNR = T.average(0); + float FPR = GT.average(); //calculate the metrics + float FNR = T.average(); std::cout << "FNR: " << FPR << std::endl; //print false alarms and misses std::cout << "FPR: " << FNR << std::endl; -- libgit2 0.21.4