Definition at line 224 of file DirImViewer3D.h. References LoadImageIdx(), max, mDoAspectRatio, and mViews. Referenced by InitDisplayFunc(). 00225 { 00226 OGLIMAGE* im = 0; 00227 OGLVIEW3D* oglV3D = mViews[id]; 00228 00229 view3DSys.SetTagsTo(oglV3D, visibleTag, visible); 00230 if (!visible) 00231 view3DSys.SetImage(oglV3D,0); 00232 else if (!(im = oglV3D->im)) 00233 { 00234 im = LoadImageIdx(id); 00235 view3DSys.SetImage(oglV3D, im); 00236 ReleaseOglImage(im); 00237 } 00238 00239 if (!im) return; 00240 00241 if (mDoAspectRatio) 00242 { 00243 float div = 100 * (1 + max(im->w, im->h)/200); 00244 oglV3D->w = im->w/div; 00245 oglV3D->h = im->h/div; 00246 } 00247 00248 // Scale to viewer dims 00249 float tW = im->noTexScaling ? im->texW : im->w; 00250 float tH = im->noTexScaling ? im->texH : im->h; 00251 float zX = (oglV3D->w)*(tW/im->w); 00252 float zY = (oglV3D->h)*(tH/im->h); 00253 view3DSys.SetZoom(oglV3D, zX, zY); 00254 }
Here is the call graph for this function:
|