Lines Matching refs:field

83 void rt_heightfield(void *tex, vector ctr, int m, int n, apiflt *field, apiflt wx, apiflt wy) {  in rt_heightfield()  argument
95 v0.y = field[(yy)*m + (xx)] + zoff; in rt_heightfield()
99 v1.y = field[(yy)*m + (xx + 1)] + zoff; in rt_heightfield()
103 v2.y = field[(yy + 1) * m + (xx + 1)] + zoff; in rt_heightfield()
109 v0.y = field[(yy)*m + (xx)] + zoff; in rt_heightfield()
113 v1.y = field[(yy + 1) * m + (xx)] + zoff; in rt_heightfield()
117 v2.y = field[(yy + 1) * m + (xx + 1)] + zoff; in rt_heightfield()
126 rt_sheightfield(void *tex, vector ctr, int m, int n, apiflt *field, apiflt wx, apiflt wy) { in rt_sheightfield() argument
148 rt_vector(x * xinc + offset.x, field[addr] + offset.z, y * yinc + offset.y); in rt_sheightfield()
163 normals[addr] = rt_vector(-(field[addr + 1] - field[addr - 1]) / (2.0 * xinc), in rt_sheightfield()
165 -(field[addr + m] - field[addr - m]) / (2.0 * yinc)); in rt_sheightfield()
254 apiflt *field; in rt_landscape() local
260 field = (apiflt *)malloc(totalsize * sizeof(apiflt)); in rt_landscape()
264 field[x + y * m] = 0.0; in rt_landscape()
268 field[0 + 0] = 1.0 + (rand() % 100) / 100.0; in rt_landscape()
269 field[m - 1] = 1.0 + (rand() % 100) / 100.0; in rt_landscape()
270 field[0 + m * (n - 1)] = 1.0 + (rand() % 100) / 100.0; in rt_landscape()
271 field[m - 1 + m * (n - 1)] = 1.0 + (rand() % 100) / 100.0; in rt_landscape()
273 subdivide(field, m, n, wx, wy, 0, 0, m - 1, n - 1); in rt_landscape()
275 rt_sheightfield(tex, ctr, m, n, field, wx, wy); in rt_landscape()
277 free(field); in rt_landscape()