Lines Matching refs:vol

83     scalarvol *vol;  in newscalarvol()  local
92 vol = (scalarvol *)rt_getmem(sizeof(scalarvol)); in newscalarvol()
93 vol->loaded = 0; in newscalarvol()
94 vol->data = nullptr; in newscalarvol()
97 vol = invol; in newscalarvol()
99 vol->opacity = tex->opacity; in newscalarvol()
100 vol->xres = xs; in newscalarvol()
101 vol->yres = ys; in newscalarvol()
102 vol->zres = zs; in newscalarvol()
103 strcpy(vol->name, fname); in newscalarvol()
121 tx->img = vol; in newscalarvol()
167 scalarvol *vol; in scalar_volume_texture() local
173 vol = (scalarvol *)bx->tex->img; in scalar_volume_texture()
251 tdist = sqrt((flt)(vol->xres * vol->xres + vol->yres * vol->yres + vol->zres * vol->zres)); in scalar_volume_texture()
252 tt = (vol->opacity / tdist); in scalar_volume_texture()
262 if (!vol->loaded) { in scalar_volume_texture()
263 LoadVol(vol); in scalar_volume_texture()
264 vol->loaded = 1; in scalar_volume_texture()
272 x = (int)((vol->xres - 1.5) * pnt.x + 0.5); in scalar_volume_texture()
273 y = (int)((vol->yres - 1.5) * pnt.y + 0.5); in scalar_volume_texture()
274 z = (int)((vol->zres - 1.5) * pnt.z + 0.5); in scalar_volume_texture()
276 ptr = vol->data + ((vol->xres * vol->yres * z) + (vol->xres * y) + x); in scalar_volume_texture()
311 void LoadVol(scalarvol *vol) { in LoadVol() argument
316 dfile = fopen(vol->name, "r"); in LoadVol()
319 sprintf(msgtxt, "Vol: can't open %s for input!!! Aborting\n", vol->name); in LoadVol()
326 msgtxt, "loading %dx%dx%d volume set from %s", vol->xres, vol->yres, vol->zres, vol->name); in LoadVol()
329 vol->data = (unsigned char *)rt_getmem(vol->xres * vol->yres * vol->zres); in LoadVol()
331 status = fread(vol->data, 1, (vol->xres * vol->yres * vol->zres), dfile); in LoadVol()