Definition at line 110 of file mainConceptSupport.cpp. References OglGui::ConceptSupportControl::Colors(), OglGui::ViewerPointCloud::DetailImageInterface(), FormatError(), OglGui::WindowView2D::GetOglView(), OglGui::OglWindow::GetOGLWND(), OglGui::OglWindow::H(), OglEventLoop(), ReadTheImages(), OglGui::Window::ScaleChildren(), OglGui::OglWindow::SetBackground(), OglGui::OglWindow::SetBorderType(), OglGui::ViewerPointCloud::SetPtDocXY(), OglGui::WindowView2D::SetScaleToWindow(), OglGui::ViewerPointCloudNavigator::SetTarget(), OglGui::ConceptSupportControl::SetViewerPointCloud(), OglGui::OglWindow::Start(), OglGui::OglWindow::Valid(), and OglGui::OglWindow::W(). 00111 { 00112 FILE* fp; 00113 00114 OglInit(&argc, &argv[0]); 00115 00116 //WriteImageFile("\\Images.txt", 50001, -150, 150, -150, 150, "\\map88x60\\image"); 00117 //exit(1); 00118 if (argc < 2) 00119 { 00120 fprintf(stderr, "Usage %s <images_file>\n", argv[0]); 00121 exit(1); 00122 } 00123 if (!(fp=fopen(argv[1], "r"))) 00124 { 00125 fprintf(stderr, "%s could not open: %s\n", argv[0], argv[1]); 00126 exit(1); 00127 } 00128 int maxNr; 00129 float minX, maxX, minY, maxY; 00130 00131 if (5 != fscanf(fp, "%d\n%f %f %f %f\n", &maxNr, &minX, &maxX, &minY, &maxY)) 00132 { 00133 FormatError("Format error\nFormat:\nMaxNr\nMinX MaxX MinY MaxY\nfilename x y setId\n"); 00134 fprintf(stderr, 00135 "Example:\n10000\n0 400 0 400\nC:\\images\\image1.jpg 0.102 0.63146 0\nC:\\otherims\\otherim.jpg 0.20253 0.53121 4\n"); 00136 } 00137 00138 Window* wnd = new Window(0, 0, 1024, 768); 00139 wnd->SetBackground(oglGUI_BG); 00140 oglSys.SetSleepTime(wnd->GetOGLWND(), 0); 00141 00142 ViewerPointCloud* vpc = new ViewerPointCloud(wnd, 0, 0, 768, 768); 00143 vpc->SetBorderType(BEV_LINE); 00144 00145 new FramesPerSecond(vpc, 0, 0, 60, 20); 00146 00147 WindowView2D* detailWnd = new WindowView2D(wnd, 768, 0, 256, 256, NULL); 00148 detailWnd->GetOglView()->texturing = false; 00149 detailWnd->SetScaleToWindow(false); 00150 vpc->DetailImageInterface(detailWnd); 00151 00152 ViewerPointCloudNavigator* vpcNavigator = 00153 new ViewerPointCloudNavigator(wnd, 768, 512, 256, 256); 00154 vpcNavigator->SetTarget(vpc); 00155 00156 ConceptSupportControl* csControl = 00157 new ConceptSupportControl(wnd, 768, 256, 256, 256); 00158 csControl->SetBorderType(BEV_ETCHED); 00159 csControl->SetViewerPointCloud(vpc); 00160 00161 ReadTheImages(fp, vpc->GetOGLWND(), csControl->Colors(), maxNr, minX, maxX, minY, maxY); 00162 fclose(fp); 00163 vpc->SetPtDocXY(vpc->W()/2 -minX -(maxX-minX)/2, vpc->H()/2 -minY -(maxY-minY)/2); 00164 00165 wnd->ScaleChildren(0,1); 00166 if (!wnd->Valid()) 00167 { 00168 fprintf( stderr, "ConceptSupport failed\n" ); 00169 return 0; 00170 } 00171 00172 wnd->Start(); // start OGL 00173 OglEventLoop(); 00174 return 1; 00175 }
Here is the call graph for this function:
|