Definition at line 73 of file VidolviWindow.h. References botshift, FlipDown(), OglGui::View::GetOGLVIEW3D(), OglGui::OglWindow::GetOGLWND(), ILOG_DEBUG, mBackPlane, mNrTeams, mScoreLocation, mStartLocation, and topshift. Referenced by Impala::Application::Videolympics::Vidolvi::Vidolvi(). 00074 { 00075 mNrTeams = nr; 00076 float x, y, z; 00077 x = -(float)nr + 1.0f; //( (float)nr / 2.0f) + 0.5f; 00078 // y = -5.5f; 00079 // z = -16.0f; 8 00080 y = botshift-4.9f; 00081 z = -17.0f; 00082 00083 00084 OGLIMAGE *header = TryReadPNG("icons/header.png"); 00085 if (header != 0) 00086 { 00087 // FillRoundRectExt3D(-10.0f, +4.0f, -15.75f, 20.0f, 2.7f, 0.0f, 0.0f, 0.0f, 0.0f); 00088 OglGui::View *v = new OglGui::View(GetOGLWND(), header, 0.0f, topshift+8.25f, -16.75f, 23.0f, 2.7f, 1.0f); 00089 //view3DSys.SetTags(v->GetOGLVIEW3D(), VisibleTag); 00090 view3DSys.SetObject3D(v->GetOGLVIEW3D(), 1); 00091 view3DSys.SetZoom(v->GetOGLVIEW3D(), 23.0f, 2.7f); 00092 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 0, GL_LINEAR); 00093 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 1, GL_LINEAR); 00094 oglSys.ReleaseOglImage(header); 00095 } 00096 00097 FlipDown(); 00098 OGLIMAGE *bg = TryReadPNG("icons/background.png"); 00099 if (bg != 0) 00100 { 00101 float w = nr * 2.0f; 00102 float h = nr * 2.0f;//13.0f; 00103 mBackPlane = new OglGui::View(GetOGLWND(), bg, 0.0f, 0.0f, z - 0.5f, w, h, 1.0f); 00104 //view3DSys.SetTags(v->GetOGLVIEW3D(), VisibleTag); 00105 view3DSys.SetObject3D(mBackPlane->GetOGLVIEW3D(), 1); 00106 view3DSys.SetZoom(mBackPlane->GetOGLVIEW3D(), w, h); 00107 view3DSys.SetTexFilter(mBackPlane->GetOGLVIEW3D(), 0, GL_LINEAR); 00108 view3DSys.SetTexFilter(mBackPlane->GetOGLVIEW3D(), 1, GL_LINEAR); 00109 oglSys.ReleaseOglImage(bg); 00110 } 00111 00112 OGLIMAGE *pedestal = TryReadPNG("icons/pedestal.png"); 00113 00114 for (int i=1; i<=nr; i++) 00115 { 00116 std::ostringstream f; 00117 f << "icons/team"; 00118 f << i; 00119 f << ".png"; 00120 std::string teamfile = f.str(); 00121 ILOG_DEBUG("Reading team number " << teamfile); 00122 OGLIMAGE *im = TryReadPNG(teamfile.c_str()); 00123 Point *p = new Point(x,y+0.0f,z -0.5f); 00124 mStartLocation[i] = p; 00125 00126 Point *ps = new Point(x,y + 0.1f, z + 0.6f); 00127 mScoreLocation[i] = ps; 00128 00129 if (im != 0) 00130 { 00131 OglGui::View *v = new OglGui::View(GetOGLWND(), im, x, y, z, 2.0f, 1.0f, 1.0f); 00132 //view3DSys.SetTags(v->GetOGLVIEW3D(), VisibleTag); 00133 view3DSys.SetObject3D(v->GetOGLVIEW3D(), 2); 00134 view3DSys.SetZoom(v->GetOGLVIEW3D(), 2.0f, 1.0f); 00135 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 0, GL_LINEAR); 00136 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 1, GL_LINEAR); 00137 oglSys.ReleaseOglImage(im); 00138 } 00139 00140 im = 0; 00141 std::ostringstream g; 00142 g << "icons/icon"; 00143 g << i; 00144 g << ".png"; 00145 teamfile = g.str(); 00146 ILOG_DEBUG("Reading team icon " << teamfile); 00147 im = TryReadPNG(teamfile.c_str()); 00148 00149 if (im != 0) 00150 { 00151 OglGui::View *v = new OglGui::View(GetOGLWND(), im, x, y - 1.0f, z, 2.0f, 1.0f, 1.0f); 00152 //view3DSys.SetTags(v->GetOGLVIEW3D(), VisibleTag); 00153 view3DSys.SetObject3D(v->GetOGLVIEW3D(), 2); 00154 view3DSys.SetZoom(v->GetOGLVIEW3D(), 2.0f, 1.0f); 00155 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 0, GL_LINEAR); 00156 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 1, GL_LINEAR); 00157 oglSys.ReleaseOglImage(im); 00158 } 00159 00160 if (pedestal != 0) 00161 { 00162 OglGui::View *v = new OglGui::View(GetOGLWND(), pedestal, x, y - 2.0f, z, 2.0f, 1.0f, 1.0f); 00163 //view3DSys.SetTags(v->GetOGLVIEW3D(), VisibleTag); 00164 view3DSys.SetObject3D(v->GetOGLVIEW3D(), 2); 00165 view3DSys.SetZoom(v->GetOGLVIEW3D(), 2.0f, 1.0f); 00166 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 0, GL_LINEAR); 00167 view3DSys.SetTexFilter(v->GetOGLVIEW3D(), 1, GL_LINEAR); 00168 } 00169 x = x + 2.0f; 00170 } 00171 00172 if (pedestal) oglSys.ReleaseOglImage(pedestal); 00173 00174 }
Here is the call graph for this function:
|