Revision: 42175
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42175&view=rev
Author:   erikgreenwald
Date:     2011-01-12 20:23:16 +0000 (Wed, 12 Jan 2011)

Log Message:
-----------
warning quellage. formatting fixes.

Modified Paths:
--------------
    brlcad/trunk/src/adrt/librender/camera.c
    brlcad/trunk/src/adrt/librender/component.c
    brlcad/trunk/src/adrt/librender/cut.c
    brlcad/trunk/src/adrt/librender/depth.c
    brlcad/trunk/src/adrt/librender/flat.c
    brlcad/trunk/src/adrt/librender/flos.c
    brlcad/trunk/src/adrt/librender/grid.c
    brlcad/trunk/src/adrt/librender/normal.c
    brlcad/trunk/src/adrt/librender/path.c
    brlcad/trunk/src/adrt/librender/phong.c
    brlcad/trunk/src/adrt/librender/render_internal.h
    brlcad/trunk/src/adrt/librender/render_util.c
    brlcad/trunk/src/adrt/librender/spall.c
    brlcad/trunk/src/adrt/librender/surfel.c
    brlcad/trunk/src/adrt/librender/texture_blend.c
    brlcad/trunk/src/adrt/librender/texture_bump.c
    brlcad/trunk/src/adrt/librender/texture_camo.c
    brlcad/trunk/src/adrt/librender/texture_checker.c
    brlcad/trunk/src/adrt/librender/texture_clouds.c
    brlcad/trunk/src/adrt/librender/texture_gradient.c
    brlcad/trunk/src/adrt/librender/texture_image.c
    brlcad/trunk/src/adrt/librender/texture_internal.h
    brlcad/trunk/src/adrt/librender/texture_mix.c
    brlcad/trunk/src/adrt/librender/texture_perlin.c
    brlcad/trunk/src/adrt/librender/texture_stack.c
    brlcad/trunk/src/adrt/libtie/tie.c
    brlcad/trunk/src/adrt/load_g.c

Modified: brlcad/trunk/src/adrt/librender/camera.c
===================================================================
--- brlcad/trunk/src/adrt/librender/camera.c    2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/camera.c    2011-01-12 20:23:16 UTC (rev 
42175)
@@ -414,7 +414,7 @@
     int d, n, res_ind, scanline, v_scanline;
     vect_t pixel, accum, v1, v2;
     struct tie_ray_s ray;
-    tfloat view_inv;
+    fastf_t view_inv;
 
     VSETALL(v1, 0);
 
@@ -655,7 +655,7 @@
        if(s->dlh)
            dlclose(s->dlh);
        bu_free(s, "unload first shader");
-       shaders = t; 
+       shaders = t;
        return 0;
     }
 

Modified: brlcad/trunk/src/adrt/librender/component.c
===================================================================
--- brlcad/trunk/src/adrt/librender/component.c 2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/component.c 2011-01-12 20:23:16 UTC (rev 
42175)
@@ -42,11 +42,11 @@
 }
 
 void
-render_component_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, TIE_3 *pixel)
+render_component_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, vect_t *pixel)
 {
     struct tie_id_s id;
     adrt_mesh_t *mesh;
-    TIE_3 vec;
+    vect_t vec;
 
     if ((mesh = (adrt_mesh_t *)tie_work(tie, ray, &id, component_hit, NULL))) {
        /* Flip normal to face ray origin (via dot product check) */
@@ -54,16 +54,16 @@
            VSCALE(id.norm,  id.norm,  -1.0);
 
        /* shade solid */
-       pixel->v[0] = mesh->flags & ADRT_MESH_HIT ? 0.8 : 0.2;
-       pixel->v[1] = (tfloat)0.2;
-       pixel->v[2] = mesh->flags & ADRT_MESH_SELECT ? 0.8 : 0.2;
-       VSUB2(vec.v,  ray->pos,  id.pos);
-       VUNITIZE(vec.v);
-       VSCALE((*pixel).v, (*pixel).v, VDOT(vec.v, id.norm) * 0.8);
+       *pixel[0] = mesh->flags & ADRT_MESH_HIT ? 0.8 : 0.2;
+       *pixel[1] = (tfloat)0.2;
+       *pixel[2] = mesh->flags & ADRT_MESH_SELECT ? 0.8 : 0.2;
+       VSUB2(vec,  ray->pos,  id.pos);
+       VUNITIZE(vec);
+       VSCALE((*pixel), (*pixel), VDOT(vec, id.norm) * 0.8);
     } else if (ray->depth) {
-       pixel->v[0] += (tfloat)0.2;
-       pixel->v[1] += (tfloat)0.2;
-       pixel->v[2] += (tfloat)0.2;
+       *pixel[0] += (tfloat)0.2;
+       *pixel[1] += (tfloat)0.2;
+       *pixel[2] += (tfloat)0.2;
     }
 }
 

Modified: brlcad/trunk/src/adrt/librender/cut.c
===================================================================
--- brlcad/trunk/src/adrt/librender/cut.c       2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/cut.c       2011-01-12 20:23:16 UTC (rev 
42175)
@@ -92,11 +92,11 @@
 
 
 void
-render_cut_work(render_t *render, struct tie_s *tiep, struct tie_ray_s *ray, 
TIE_3 *pixel)
+render_cut_work(render_t *render, struct tie_s *tiep, struct tie_ray_s *ray, 
vect_t *pixel)
 {
     render_cut_t *rd;
     render_cut_hit_t hit;
-    TIE_3 color;
+    vect_t color;
     struct tie_id_s id;
     tfloat t, dot;
 
@@ -104,7 +104,7 @@
 
     /* Draw Arrow - Blue */
     if (tie_work(&rd->tie, ray, &id, render_arrow_hit, NULL)) {
-       VSET(pixel->v, 0.0, 0.0, 1.0);
+       VSET(*pixel, 0.0, 0.0, 1.0);
        return;
     }
 
@@ -148,16 +148,16 @@
     dot = fabs(VDOT( ray->dir,  hit.id.norm));
 
     if (hit.mesh->flags & (ADRT_MESH_SELECT|ADRT_MESH_HIT)) {
-       VSET(color.v, hit.mesh->flags & ADRT_MESH_HIT ? (tfloat)0.9 : 
(tfloat)0.2, (tfloat)0.2, hit.mesh->flags & ADRT_MESH_SELECT ? (tfloat)0.9 : 
(tfloat)0.2);
+       VSET(color, hit.mesh->flags & ADRT_MESH_HIT ? (tfloat)0.9 : 
(tfloat)0.2, (tfloat)0.2, hit.mesh->flags & ADRT_MESH_SELECT ? (tfloat)0.9 : 
(tfloat)0.2);
     } else {
        /* Mix actual color with white 4:1, shade 50% darker */
 #if 0
-       VSET(color.v, 1.0, 1.0, 1.0);
-       VSCALE(color.v,  color.v,  3.0);
-       VADD2(color.v,  color.v,  hit.mesh->attributes->color.v);
-       VSCALE(color.v,  color.v,  0.125);
+       VSET(color, 1.0, 1.0, 1.0);
+       VSCALE(color,  color,  3.0);
+       VADD2(color,  color,  hit.mesh->attributes->color);
+       VSCALE(color,  color,  0.125);
 #else
-       VSET(color.v, (tfloat)0.8, (tfloat)0.8, (tfloat)0.7);
+       VSET(color, (tfloat)0.8, (tfloat)0.8, (tfloat)0.7);
 #endif
     }
 
@@ -165,22 +165,22 @@
     if (dot < 0) {
 #endif
        /* Shade using inhit */
-       VSCALE((*pixel).v,  color.v,  (dot*0.90));
+       VSCALE((*pixel),  color,  (dot*0.90));
 #if 0
     } else {
        TIE_3 vec;
        fastf_t angle;
        /* shade solid */
-       VSUB2(vec.v,  ray->pos,  hit.id.pos);
-       VUNITIZE(vec.v);
-       angle = vec.v[0]*hit.mod*-hit.plane[0] + vec.v[1]*-hit.mod*hit.plane[1] 
+ vec.v[2]*-hit.mod*hit.plane[2];
-       VSCALE((*pixel).v,  color.v,  (angle*0.90));
+       VSUB2(vec,  ray->pos,  hit.id.pos);
+       VUNITIZE(vec);
+       angle = vec[0]*hit.mod*-hit.plane[0] + vec[1]*-hit.mod*hit.plane[1] + 
vec[2]*-hit.mod*hit.plane[2];
+       VSCALE((*pixel),  color,  (angle*0.90));
     }
 #endif
 
-    pixel->v[0] += (tfloat)0.1;
-    pixel->v[1] += (tfloat)0.1;
-    pixel->v[2] += (tfloat)0.1;
+    *pixel[0] += (tfloat)0.1;
+    *pixel[1] += (tfloat)0.1;
+    *pixel[2] += (tfloat)0.1;
 }
 
 int
@@ -188,19 +188,22 @@
 {
     int i;
     render_cut_t *d;
-    static point_t list[6];
-    point_t **tlist, up, ray_pos, ray_dir;
+    static TIE_3 list[6];
+       TIE_3 **tlist;
+    vect_t up, ray_pos, ray_dir;
     fastf_t shot_len = 100, shot_width = .02;
     struct tie_id_s id;
     struct tie_ray_s ray;
-    double step;
+    double step, f[6];
 
     if(buf == NULL)
            return -1;
 
-    sscanf(buf, "#(%f %f %f) #(%f %f %f)",
-           ray_pos, ray_pos+1, ray_pos+2,
-           ray_dir, ray_dir+1, ray_dir+2);
+    sscanf(buf, "#(%lf %lf %lf) #(%lf %lf %lf)",
+           f, f+1, f+2,
+           f+3, f+3+1, f+3+2);
+       VMOVE(ray_pos, f);
+       VMOVE(ray_dir, f);
     VUNITIZE(ray_dir);
 
     shot_width = 0.01 * render->tie->radius;
@@ -248,18 +251,18 @@
     tie_init(&d->tie, 2, TIE_KDTREE_FAST);
 
     /* Triangle 1 */
-    VSET(list[0], ray_pos[0], ray_pos[1], ray_pos[2] - shot_width);
-    VSET(list[1], ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] - shot_width);
-    VSET(list[2], ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] + shot_width);
+    VSET(list[0].v, ray_pos[0], ray_pos[1], ray_pos[2] - shot_width);
+    VSET(list[1].v, ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] - shot_width);
+    VSET(list[2].v, ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] + shot_width);
 
     /* Triangle 2 */
-    VMOVE(list[3], ray_pos);
-    list[3][2] -= shot_width;
+    VMOVE(list[3].v, ray_pos);
+    list[3].v[2] -= shot_width;
 
-    VSET(list[4], ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] + shot_width);
+    VSET(list[4].v, ray_pos[0] + shot_len*ray_dir[0], ray_pos[1] + 
shot_len*ray_dir[1], ray_pos[2] + shot_len*ray_dir[2] + shot_width);
 
-    VMOVE(list[5], ray_pos);
-    list[5][2] += shot_width;
+    VMOVE(list[5].v, ray_pos);
+    list[5].v[2] += shot_width;
 
     for(i=0;i<6;i++)
        tlist[i] = &list[i];

Modified: brlcad/trunk/src/adrt/librender/depth.c
===================================================================
--- brlcad/trunk/src/adrt/librender/depth.c     2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/depth.c     2011-01-12 20:23:16 UTC (rev 
42175)
@@ -32,14 +32,14 @@
 }
 
 void
-render_depth_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, TIE_3 *pixel)
+render_depth_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, vect_t *pixel)
 {
     struct tie_id_s id;
     adrt_mesh_t *mesh;
 
     /* Visualize ray depth, must put ray->depth++ hack into bsp for this to be 
of any use */
     if ((mesh = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL)))
-       pixel->v[0] = 0.0075 * ray->kdtree_depth;
+       *pixel[0] = 0.0075 * ray->kdtree_depth;
 }
 
 int

Modified: brlcad/trunk/src/adrt/librender/flat.c
===================================================================
--- brlcad/trunk/src/adrt/librender/flat.c      2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/flat.c      2011-01-12 20:23:16 UTC (rev 
42175)
@@ -31,13 +31,13 @@
 }
 
 void
-render_flat_work(render_t *UNUSED(render), struct tie_s *tie, struct tie_ray_s 
*ray, TIE_3 *pixel)
+render_flat_work(render_t *UNUSED(render), struct tie_s *tie, struct tie_ray_s 
*ray, vect_t *pixel)
 {
     struct tie_id_s id;
     adrt_mesh_t *mesh;
 
     if ((mesh = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
-       *pixel = mesh->attributes->color;
+       VMOVE(*pixel, mesh->attributes->color.v);
        if (mesh->texture)
            mesh->texture->work(mesh->texture, mesh, ray, &id, pixel);
     }

Modified: brlcad/trunk/src/adrt/librender/flos.c
===================================================================
--- brlcad/trunk/src/adrt/librender/flos.c      2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/flos.c      2011-01-12 20:23:16 UTC (rev 
42175)
@@ -32,63 +32,62 @@
 
 #include "bu.h"
 
-typedef struct render_flos_s {
+struct render_flos_s {
     point_t frag_pos;
-} render_flos_t;
+};
 
 
-void render_flos_free(render_t *UNUSED(render)) {
+void
+render_flos_free(render_t *UNUSED(render)) {
 }
 
-void render_flos_work(render_t *render, struct tie_s *tie, struct tie_ray_s 
*ray, TIE_3 *pixel) {
+void
+render_flos_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
vect_t *pixel) {
     struct tie_id_s id, tid;
     adrt_mesh_t *mesh;
-    TIE_3 vec;
-    tfloat angle;
-    render_flos_t *rd;
+    vect_t vec;
+    fastf_t angle;
+    struct render_flos_s *rd;
 
-    rd = (render_flos_t *)render->data;
+    rd = (struct render_flos_s *)render->data;
 
     if ((mesh = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
-       VSET((*pixel).v, 0.0, 0.5, 0.0);
+       VSET(*pixel, 0.0, 0.5, 0.0);
     } else {
        return;
     }
 
-    VSUB2(vec.v,  ray->pos,  id.pos);
-    VUNITIZE(vec.v);
-    angle = VDOT( vec.v,  id.norm);
+    VSUB2(vec,  ray->pos,  id.pos);
+    VUNITIZE(vec);
+    angle = VDOT( vec,  id.norm);
 
     /* Determine if direct line of sight to fragment */
     VMOVE(ray->pos, rd->frag_pos);
     VSUB2(ray->dir,  id.pos,  rd->frag_pos);
     VUNITIZE(ray->dir);
 
-    if (tie_work(tie, ray, &tid, render_hit, NULL)) {
+    if (tie_work(tie, ray, &tid, render_hit, NULL))
        if (fabs (id.pos[0] - tid.pos[0]) < TIE_PREC &&
-           fabs (id.pos[1] - tid.pos[1]) < TIE_PREC &&
-           fabs (id.pos[2] - tid.pos[2]) < TIE_PREC)
-       {
-           VSET((*pixel).v, 1.0, 0.0, 0.0);
-       }
-    }
+               fabs (id.pos[1] - tid.pos[1]) < TIE_PREC &&
+               fabs (id.pos[2] - tid.pos[2]) < TIE_PREC)
+           VSET(*pixel, 1.0, 0.0, 0.0);
 
-    VSCALE((*pixel).v,  (*pixel).v,  (0.5+angle*0.5));
+    VSCALE(*pixel, *pixel, (0.5+angle*0.5));
 }
 
 int
 render_flos_init(render_t *render, const char *frag_pos)
 {
-    render_flos_t *d;
+    struct render_flos_s *d;
 
     if(frag_pos == NULL)
-           return -1;
+       return -1;
 
     render->work = render_flos_work;
     render->free = render_flos_free;
-    render->data = (render_flos_t *)bu_malloc(sizeof(render_flos_t), 
"render_flos_init");
-    d = (render_flos_t *)render->data;
-    sscanf(frag_pos, "#(%f %f %f)", &d->frag_pos[0], &d->frag_pos[1],  
&d->frag_pos[2]);
+    render->data = (struct render_flos_s *)bu_malloc(sizeof(struct 
render_flos_s), "render_flos_init");
+    d = (struct render_flos_s *)render->data;
+    sscanf(frag_pos, "#(%lf %lf %lf)", &d->frag_pos[0], &d->frag_pos[1],  
&d->frag_pos[2]);
     return 0;
 }
 

Modified: brlcad/trunk/src/adrt/librender/grid.c
===================================================================
--- brlcad/trunk/src/adrt/librender/grid.c      2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/grid.c      2011-01-12 20:23:16 UTC (rev 
42175)
@@ -34,37 +34,37 @@
 }
 
 void
-render_grid_work(render_t *UNUSED(render), struct tie_s *tie, struct tie_ray_s 
*ray, TIE_3 *pixel)
+render_grid_work(render_t *UNUSED(render), struct tie_s *tie, struct tie_ray_s 
*ray, vect_t *pixel)
 {
-    struct tie_id_s id;
-    adrt_mesh_t *m;
-    TIE_3 vec;
-    tfloat angle;
+       struct tie_id_s id;
+       adrt_mesh_t *m;
+       vect_t vec;
+       tfloat angle;
 
 
-    if ((m = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
-       /* if X or Y lie in the grid paint it white else make it gray */
-       if (fabs(GRID*id.pos[0] - (int)(GRID*id.pos[0])) < 0.2*LINE || 
fabs(GRID*id.pos[1] - (int)(GRID*id.pos[1])) < 0.2*LINE) {
-           pixel->v[0] = (tfloat)0.9;
-           pixel->v[1] = (tfloat)0.9;
-           pixel->v[2] = (tfloat)0.9;
+       if ((m = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
+               /* if X or Y lie in the grid paint it white else make it gray */
+               if (fabs(GRID*id.pos[0] - (int)(GRID*id.pos[0])) < 0.2*LINE || 
fabs(GRID*id.pos[1] - (int)(GRID*id.pos[1])) < 0.2*LINE) {
+                       *pixel[0] = (tfloat)0.9;
+                       *pixel[1] = (tfloat)0.9;
+                       *pixel[2] = (tfloat)0.9;
+               } else {
+                       *pixel[0] = (tfloat)0.1;
+                       *pixel[1] = (tfloat)0.1;
+                       *pixel[2] = (tfloat)0.1;
+               }
        } else {
-           pixel->v[0] = (tfloat)0.1;
-           pixel->v[1] = (tfloat)0.1;
-           pixel->v[2] = (tfloat)0.1;
+               return;
        }
-    } else {
-       return;
-    }
 
-    VSUB2(vec.v,  ray->pos,  id.pos);
-    VUNITIZE(vec.v);
-    angle = VDOT( vec.v,  id.norm);
-    VSCALE((*pixel).v,  (*pixel).v,  (angle*0.9));
+       VSUB2(vec,  ray->pos,  id.pos);
+       VUNITIZE(vec);
+       angle = VDOT(vec,  id.norm);
+       VSCALE(*pixel, *pixel, (angle*0.9));
 
-    pixel->v[0] += (tfloat)0.1;
-    pixel->v[1] += (tfloat)0.1;
-    pixel->v[2] += (tfloat)0.1;
+       *pixel[0] += (tfloat)0.1;
+       *pixel[1] += (tfloat)0.1;
+       *pixel[2] += (tfloat)0.1;
 }
 
 int

Modified: brlcad/trunk/src/adrt/librender/normal.c
===================================================================
--- brlcad/trunk/src/adrt/librender/normal.c    2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/normal.c    2011-01-12 20:23:16 UTC (rev 
42175)
@@ -35,12 +35,12 @@
 }
 
 void
-render_normal_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, TIE_3 *pixel) {
+render_normal_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, vect_t *pixel) {
     struct tie_id_s    id;
     float      one[3] = { 1, 1, 1 };
 
     if (tie_work(tie, ray, &id, normal_hit, NULL))
-       VADD2SCALE(pixel->v, id.norm, one, 0.5);
+       VADD2SCALE(*pixel, id.norm, one, 0.5);
     return;
 }
 

Modified: brlcad/trunk/src/adrt/librender/path.c
===================================================================
--- brlcad/trunk/src/adrt/librender/path.c      2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/path.c      2011-01-12 20:23:16 UTC (rev 
42175)
@@ -58,7 +58,7 @@
 
 
 void
-render_path_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
TIE_3 *pixel)
+render_path_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
vect_t *pixel)
 {
     struct tie_ray_s new_ray;
     struct tie_id_s new_id;
@@ -119,7 +119,7 @@
                VUNITIZE(T);
 
                /* Form Basis X */
-               bax[0] = T[0] || T[1] ? -T[1] : 1.0;
+               bax[0] = NEAR_ZERO(T[0],SMALL_FASTF) || 
NEAR_ZERO(T[1],SMALL_FASTF) ? -T[1] : 1.0;
                bax[1] = T[0];
                bax[2] = 0;
                VUNITIZE(bax);
@@ -155,7 +155,7 @@
        VADD2(accum,  accum,  new_pix);
     }
 
-    VSCALE((*pixel).v,  accum,  rd->inv_samples);
+    VSCALE(*pixel,  accum,  rd->inv_samples);
 }
 
 int

Modified: brlcad/trunk/src/adrt/librender/phong.c
===================================================================
--- brlcad/trunk/src/adrt/librender/phong.c     2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/phong.c     2011-01-12 20:23:16 UTC (rev 
42175)
@@ -34,22 +34,22 @@
 }
 
 void
-render_phong_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, TIE_3 *pixel)
+render_phong_work(render_t *UNUSED(render), struct tie_s *tie, struct 
tie_ray_s *ray, vect_t *pixel)
 {
     struct tie_id_s            id;
     adrt_mesh_t                *mesh;
 
     if ((mesh = (adrt_mesh_t*)tie_work(tie, ray, &id, render_hit, NULL)) != 
NULL) {
-       TIE_3           vec;
+       vect_t          vec;
 
-       *pixel = mesh->attributes->color;
+       VMOVE(*pixel, mesh->attributes->color.v);
 
        if (mesh->texture)
            mesh->texture->work(mesh->texture, mesh, ray, &id, pixel);
 
-       VSUB2(vec.v,  ray->pos,  id.pos);
-       VUNITIZE(vec.v);
-       VSCALE((*pixel).v, (*pixel).v, VDOT( vec.v,  id.norm));
+       VSUB2(vec,  ray->pos,  id.pos);
+       VUNITIZE(vec);
+       VSCALE(*pixel, *pixel, VDOT(vec,  id.norm));
     }
     return;
 }

Modified: brlcad/trunk/src/adrt/librender/render_internal.h
===================================================================
--- brlcad/trunk/src/adrt/librender/render_internal.h   2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/render_internal.h   2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -47,7 +47,7 @@
 #define RENDER_SHADER(name) BU_EXTERN(int render_##name##_init, (render_t *, 
const char *))
 
 struct render_s;
-typedef void render_work_t(struct render_s *render, struct tie_s *tie, struct 
tie_ray_s *ray, TIE_3 *pixel);
+typedef void render_work_t(struct render_s *render, struct tie_s *tie, struct 
tie_ray_s *ray, vect_t *pixel);
 typedef void render_free_t(struct render_s *render);
 
 typedef struct render_s {

Modified: brlcad/trunk/src/adrt/librender/render_util.c
===================================================================
--- brlcad/trunk/src/adrt/librender/render_util.c       2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/render_util.c       2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,23 +30,23 @@
 
 #include "bu.h"
 
-typedef struct render_segment_s {
+struct render_segment_s {
     adrt_mesh_t *mesh;
     uint8_t complete;
     tfloat thickness;
-} render_segment_t;
+};
 
-
-typedef struct render_shotline_s {
-    render_segment_t *seglist;
+struct render_shotline_s {
+    struct render_segment_s *seglist;
     point_t in_hit;
     uint32_t segnum;
     uint32_t segind;
-} render_shotline_t;
+};
 
 
 /* Generate vector list for a spall cone given a reference angle */
-void render_util_spall_vec(vect_t UNUSED(dir), fastf_t UNUSED(angle), int 
UNUSED(vec_num), vect_t *UNUSED(vec_list)) {
+void
+render_util_spall_vec(vect_t UNUSED(dir), fastf_t UNUSED(angle), int 
UNUSED(vec_num), vect_t *UNUSED(vec_list)) {
 #if 0
     TIE_3 vec;
     tfloat radius, t;
@@ -78,10 +78,9 @@
 #endif
 }
 
-
 static void* shot_hit(struct tie_ray_s *ray, struct tie_id_s *id, struct 
tie_tri_s *tri, void *ptr) {
     adrt_mesh_t *mesh = (adrt_mesh_t *)(tri->ptr);
-    render_shotline_t *shotline = (render_shotline_t *)ptr;
+    struct render_shotline_s *shotline = (struct render_shotline_s *)ptr;
     uint32_t i;
     uint8_t found;
 
@@ -102,7 +101,7 @@
 
     if (!found) {
        /* Grow the shotline */
-       shotline->seglist = (render_segment_t *)bu_realloc(shotline->seglist, 
(shotline->segnum + 1) * sizeof(render_segment_t), "Growing shotline in 
shot_hit");
+       shotline->seglist = (struct render_segment_s 
*)bu_realloc(shotline->seglist, (shotline->segnum + 1) * sizeof(struct 
render_segment_s), "Growing shotline in shot_hit");
 
        /* Assign */
        shotline->seglist[shotline->segnum].mesh = mesh;
@@ -123,10 +122,10 @@
     return NULL;
 }
 
-
-void render_util_shotline_list(struct tie_s *tie, struct tie_ray_s *ray, void 
**data, int *dlen) {
+void
+render_util_shotline_list(struct tie_s *tie, struct tie_ray_s *ray, void 
**data, int *dlen) {
     struct tie_id_s id;
-    render_shotline_t shotline;
+    struct render_shotline_s shotline;
     uint32_t i;
     uint8_t c;
 
@@ -173,8 +172,8 @@
     bu_free(shotline.seglist, "render_util_shotline_list: shotline data");
 }
 
-
-void render_util_spall_list(struct tie_s *UNUSED(tie), struct tie_ray_s 
*UNUSED(ray), tfloat UNUSED(angle), void **UNUSED(data), int *UNUSED(dlen)) {
+void
+render_util_spall_list(struct tie_s *UNUSED(tie), struct tie_ray_s 
*UNUSED(ray), tfloat UNUSED(angle), void **UNUSED(data), int *UNUSED(dlen)) {
 #if 0
     shotline_t shotline;
     struct tie_ray_s sray;

Modified: brlcad/trunk/src/adrt/librender/spall.c
===================================================================
--- brlcad/trunk/src/adrt/librender/spall.c     2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/spall.c     2011-01-12 20:23:16 UTC (rev 
42175)
@@ -61,14 +61,12 @@
     bu_free(render->data, "render data");
 }
 
-
 static void *
 render_arrow_hit(struct tie_ray_s *UNUSED(ray), struct tie_id_s *UNUSED(id), 
struct tie_tri_s *tri, void *UNUSED(ptr))
 {
     return tri;
 }
 
-
 void *
 render_spall_hit(struct tie_ray_s *UNUSED(ray), struct tie_id_s *id, struct 
tie_tri_s *tri, void *ptr)
 {
@@ -79,9 +77,8 @@
     return hit;
 }
 
-
 void
-render_spall_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
TIE_3 *pixel)
+render_spall_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
vect_t *pixel)
 {
     struct render_spall_s *rd;
     struct render_spall_hit_s hit;
@@ -94,9 +91,9 @@
 
     /* Draw spall Cone */
     if (tie_work(&rd->tie, ray, &id, render_arrow_hit, NULL)) {
-       pixel->v[0] = (tfloat)0.4;
-       pixel->v[1] = (tfloat)0.4;
-       pixel->v[2] = (tfloat)0.4;
+       *pixel[0] = (tfloat)0.4;
+       *pixel[1] = (tfloat)0.4;
+       *pixel[2] = (tfloat)0.4;
     }
 
     /*
@@ -162,7 +159,7 @@
 #endif
        /* Shade using inhit */
        VSCALE(color,  color,  (dot*0.50));
-       VADD2((*pixel).v,  (*pixel).v,  color);
+       VADD2(*pixel,  *pixel,  color);
 #if 0
     } else {
        /* shade solid */
@@ -173,9 +170,9 @@
     }
 #endif
 
-    pixel->v[0] += (tfloat)0.1;
-    pixel->v[1] += (tfloat)0.1;
-    pixel->v[2] += (tfloat)0.1;
+    *pixel[0] += (tfloat)0.1;
+    *pixel[1] += (tfloat)0.1;
+    *pixel[2] += (tfloat)0.1;
 }
 
 int
@@ -183,7 +180,7 @@
 {
     struct render_spall_s *d;
     vect_t *tri_list, *vec_list, normal, up, ray_pos, ray_dir;
-    tfloat plane[4], angle;
+    fastf_t plane[4], angle;
     int i;
 
     if(buf == NULL)
@@ -192,7 +189,7 @@
     render->work = render_spall_work;
     render->free = render_spall_free;
 
-    sscanf(buf, "(%g %g %g) (%g %g %g) %g",
+    sscanf(buf, "(%lg %lg %lg) (%lg %lg %lg) %lg",
                    &ray_pos[0], &ray_pos[1], &ray_pos[2],
                    &ray_dir[0], &ray_dir[1], &ray_dir[2],
                    &angle);
@@ -227,8 +224,8 @@
     /******************/
     /* The spall Cone */
     /******************/
-    vec_list = (TIE_3 *)bu_malloc(sizeof(TIE_3) * TESSELATION, "vec_list");
-    tri_list = (TIE_3 *)bu_malloc(sizeof(TIE_3) * TESSELATION * 3, "tri_list");
+    vec_list = (vect_t *)bu_malloc(sizeof(vect_t) * TESSELATION, "vec_list");
+    tri_list = (vect_t *)bu_malloc(sizeof(vect_t) * TESSELATION * 3, 
"tri_list");
 
     render_util_spall_vec(ray_dir, angle, TESSELATION, vec_list);
 

Modified: brlcad/trunk/src/adrt/librender/surfel.c
===================================================================
--- brlcad/trunk/src/adrt/librender/surfel.c    2011-01-12 20:06:03 UTC (rev 
42174)
+++ brlcad/trunk/src/adrt/librender/surfel.c    2011-01-12 20:23:16 UTC (rev 
42175)
@@ -33,7 +33,7 @@
 
 typedef struct render_surfel_pt_s {
     point_t pos;
-    tfloat radius;
+    fastf_t radius;
     vect_t color;
 } render_surfel_pt_t;
 
@@ -55,29 +55,29 @@
 
 
 void
-render_surfel_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
TIE_3 *pixel)
+render_surfel_work(render_t *render, struct tie_s *tie, struct tie_ray_s *ray, 
vect_t *pixel)
 {
     render_surfel_t *d;
     struct tie_id_s id;
     adrt_mesh_t *mesh;
     uint32_t i;
-    tfloat dist_sq;
+    fastf_t dist_sq;
 
     d = (render_surfel_t *)render->data;
 
     if ((mesh = (adrt_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) {
        for (i = 0; i < d->num; i++) {
            dist_sq = (d->list[i].pos[0]-id.pos[0]) * 
(d->list[i].pos[0]-id.pos[0]) +
-                (d->list[i].pos[1]-id.pos[1]) * (d->list[i].pos[1]-id.pos[1]) +
-                (d->list[i].pos[2]-id.pos[2]) * (d->list[i].pos[2]-id.pos[2]);
+               (d->list[i].pos[1]-id.pos[1]) * (d->list[i].pos[1]-id.pos[1]) +
+               (d->list[i].pos[2]-id.pos[2]) * (d->list[i].pos[2]-id.pos[2]);
 
            if (dist_sq < d->list[i].radius*d->list[i].radius) {
-               VMOVE((*pixel).v, d->list[i].color);
+               VMOVE(*pixel, d->list[i].color);
                break;
            }
        }
 
-       VSET((*pixel).v, (tfloat)0.8, (tfloat)0.8, (tfloat)0.8);
+       VSET(*pixel, 0.8, 0.8, 0.8);
     }
 }
 
@@ -87,7 +87,7 @@
     render_surfel_t *d;
 
     if(buf == NULL)
-           return -1;
+       return -1;
 
     render->work = render_surfel_work;
     render->free = render_surfel_free;
@@ -95,10 +95,10 @@
     d = (render_surfel_t *)render->data;
     d->num = 0;
     d->list = NULL;
-/*
-    d->list = (render_surfel_pt_t *)bu_malloc(d->num * 
sizeof(render_surfel_pt_t), "data list");
-*/
-/* do something to extract num and list from buf */
+    /*
+       d->list = (render_surfel_pt_t *)bu_malloc(d->num * 
sizeof(render_surfel_pt_t), "data list");
+       */
+    /* do something to extract num and list from buf */
     return 0;
 }
 

Modified: brlcad/trunk/src/adrt/librender/texture_blend.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_blend.c     2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_blend.c     2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -29,25 +29,26 @@
 
 #include "bu.h"
 
-void texture_blend_init(struct texture_s *texture, vect_t color1, vect_t 
color2) {
+void
+texture_blend_init(struct texture_s *texture, vect_t color1, vect_t color2) {
     struct texture_blend_s *sd;
 
     texture->data = bu_malloc(sizeof(struct texture_blend_s), "texture data");
     texture->free = texture_blend_free;
-    texture->work = (struct texture_work_s *)texture_blend_work;
+    texture->work = (texture_work_t *)texture_blend_work;
 
     sd = (struct texture_blend_s *)texture->data;
     VMOVE(sd->color1, color1);
     VMOVE(sd->color2, color2);
 }
 
-
-void texture_blend_free(struct texture_s *texture) {
+void
+texture_blend_free(struct texture_s *texture) {
     bu_free(texture->data, "texture data");
 }
 
-
-void texture_blend_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_blend_work(struct texture_s *texture, void *UNUSED(mesh), struct 
tie_ray_s *UNUSED(ray), struct tie_id_s *UNUSED(id), vect_t *pixel) {
     struct texture_blend_s *sd;
     fastf_t coef;
 

Modified: brlcad/trunk/src/adrt/librender/texture_bump.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_bump.c      2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_bump.c      2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -29,32 +29,31 @@
 
 #include "bu.h"
 
-void texture_bump_init(struct texture_s *texture, vect_t coef) {
+void
+texture_bump_init(struct texture_s *texture, vect_t coef) {
     struct texture_bump_s *sd;
 
     texture->data = bu_malloc(sizeof(struct texture_bump_s), "texture data");
     texture->free = texture_bump_free;
-    texture->work = (struct texture_work_s *)texture_bump_work;
+    texture->work = (texture_work_t *)texture_bump_work;
 
     sd = (struct texture_bump_s *)texture->data;
     VMOVE(sd->coef, coef);
 }
 
-
-void texture_bump_free(struct texture_s *texture) {
+void
+texture_bump_free(struct texture_s *texture) {
     bu_free(texture->data, "texture data");
 }
 
-
-void texture_bump_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_bump_work(struct texture_s *texture, void *UNUSED(mesh), struct 
tie_ray_s *UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
     struct texture_bump_s *sd;
     vect_t n;
-    tfloat d;
+    fastf_t d;
 
-
     sd = (struct texture_bump_s *)texture->data;
 
-
     n[0] = id->norm[0] + sd->coef[0]*(2* *pixel[0]-1.0);
     n[1] = id->norm[1] + sd->coef[1]*(2* *pixel[1]-1.0);
     n[2] = id->norm[2] + sd->coef[2]*(2* *pixel[2]-1.0);

Modified: brlcad/trunk/src/adrt/librender/texture_camo.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_camo.c      2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_camo.c      2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,12 +30,13 @@
 
 #include "bu.h"
 
-void texture_camo_init(struct texture_s *texture, fastf_t size, int octaves, 
int absolute, vect_t color1, vect_t color2, vect_t color3) {
+void
+texture_camo_init(struct texture_s *texture, fastf_t size, int octaves, int 
absolute, vect_t color1, vect_t color2, vect_t color3) {
     struct texture_camo_s   *sd;
 
     texture->data = bu_malloc(sizeof(struct texture_camo_s), "camo data");
     texture->free = texture_camo_free;
-    texture->work = (struct texture_work_s *)texture_camo_work;
+    texture->work = (texture_work_t *)texture_camo_work;
 
     sd = (struct texture_camo_s *)texture->data;
     sd->size = size;
@@ -48,8 +49,8 @@
     texture_perlin_init(&sd->perlin);
 }
 
-
-void texture_camo_free(struct texture_s *texture) {
+void
+texture_camo_free(struct texture_s *texture) {
     struct texture_camo_s *td;
 
     td = (struct texture_camo_s *)texture->data;
@@ -57,36 +58,36 @@
     bu_free(texture->data, "camo data");
 }
 
+void
+texture_camo_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
+    struct texture_camo_s *td;
+    vect_t p, pt;
+    tfloat sum1, sum2;
 
-void texture_camo_work(__TEXTURE_WORK_PROTOTYPE__) {
-       struct texture_camo_s *td;
-       vect_t p, pt;
-       tfloat sum1, sum2;
 
+    td = (struct texture_camo_s *)texture->data;
 
-       td = (struct texture_camo_s *)texture->data;
+    /* Transform the Point */
+    MATH_VEC_TRANSFORM(pt, id->pos, ADRT_MESH(mesh)->matinv);
+    if (td->absolute) {
+       VMOVE(p, id->pos);
+    } else {
+       p[0] = ADRT_MESH(mesh)->max[0] - ADRT_MESH(mesh)->min[0] > TIE_PREC ? 
(pt[0] - ADRT_MESH(mesh)->min[0]) / (ADRT_MESH(mesh)->max[0] - 
ADRT_MESH(mesh)->min[0]) : 0.0;
+       p[1] = ADRT_MESH(mesh)->max[1] - ADRT_MESH(mesh)->min[1] > TIE_PREC ? 
(pt[1] - ADRT_MESH(mesh)->min[1]) / (ADRT_MESH(mesh)->max[1] - 
ADRT_MESH(mesh)->min[1]) : 0.0;
+       p[2] = ADRT_MESH(mesh)->max[2] - ADRT_MESH(mesh)->min[2] > TIE_PREC ? 
(pt[2] - ADRT_MESH(mesh)->min[2]) / (ADRT_MESH(mesh)->max[2] - 
ADRT_MESH(mesh)->min[2]) : 0.0;
+    }
 
-       /* Transform the Point */
-       MATH_VEC_TRANSFORM(pt, id->pos, ADRT_MESH(mesh)->matinv);
-       if (td->absolute) {
-               VMOVE(p, id->pos);
-       } else {
-               p[0] = ADRT_MESH(mesh)->max[0] - ADRT_MESH(mesh)->min[0] > 
TIE_PREC ? (pt[0] - ADRT_MESH(mesh)->min[0]) / (ADRT_MESH(mesh)->max[0] - 
ADRT_MESH(mesh)->min[0]) : 0.0;
-               p[1] = ADRT_MESH(mesh)->max[1] - ADRT_MESH(mesh)->min[1] > 
TIE_PREC ? (pt[1] - ADRT_MESH(mesh)->min[1]) / (ADRT_MESH(mesh)->max[1] - 
ADRT_MESH(mesh)->min[1]) : 0.0;
-               p[2] = ADRT_MESH(mesh)->max[2] - ADRT_MESH(mesh)->min[2] > 
TIE_PREC ? (pt[2] - ADRT_MESH(mesh)->min[2]) / (ADRT_MESH(mesh)->max[2] - 
ADRT_MESH(mesh)->min[2]) : 0.0;
-       }
+    sum1 = fabs(texture_perlin_noise3(&td->perlin, p, td->size*1.0, 
td->octaves));
+    sum2 = fabs(texture_perlin_noise3(&td->perlin, p, td->size*0.8, 
td->octaves+1));
 
-       sum1 = fabs(texture_perlin_noise3(&td->perlin, p, td->size*1.0, 
td->octaves));
-       sum2 = fabs(texture_perlin_noise3(&td->perlin, p, td->size*0.8, 
td->octaves+1));
+    if (sum1 < 0.3) {
+       VMOVE(*pixel, td->color1);
+    } else {
+       VMOVE(*pixel, td->color2);
+    }
 
-       if (sum1 < 0.3) {
-               VMOVE(*pixel, td->color1);
-       } else {
-               VMOVE(*pixel, td->color2);
-       }
-
-       if (sum2 < 0.3)
-               VMOVE(*pixel, td->color3);
+    if (sum2 < 0.3)
+       VMOVE(*pixel, td->color3);
 }
 
 /*

Modified: brlcad/trunk/src/adrt/librender/texture_checker.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_checker.c   2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_checker.c   2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,24 +30,25 @@
 
 #include "bu.h"
 
-void texture_checker_init(struct texture_s *texture, int tile) {
+void
+texture_checker_init(struct texture_s *texture, int tile) {
     struct texture_checker_s   *td;
 
     texture->data = bu_malloc(sizeof(struct texture_checker_s), "checker 
data");
     texture->free = texture_checker_free;
-    texture->work = (struct texture_work_s *)texture_checker_work;
+    texture->work = (texture_work_t *)texture_checker_work;
 
     td = (struct texture_checker_s *)texture->data;
     td->tile = tile;
 }
 
-
-void texture_checker_free(struct texture_s *texture) {
+void
+texture_checker_free(struct texture_s *texture) {
     bu_free(texture->data, "checker data");
 }
 
-
-void texture_checker_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_checker_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
     struct texture_checker_s   *td;
     vect_t                     pt;
     int                        u, v;

Modified: brlcad/trunk/src/adrt/librender/texture_clouds.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_clouds.c    2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_clouds.c    2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,12 +30,13 @@
 
 #include "bu.h"
 
-void texture_clouds_init(struct texture_s *texture, tfloat size, int octaves, 
int absolute, vect_t scale, vect_t translate) {
+void
+texture_clouds_init(struct texture_s *texture, tfloat size, int octaves, int 
absolute, vect_t scale, vect_t translate) {
     struct texture_clouds_s *td;
 
     texture->data = bu_malloc(sizeof(struct texture_clouds_s), "cloud data");
     texture->free = texture_clouds_free;
-    texture->work = (struct texture_work_s *)texture_clouds_work;
+    texture->work = (texture_work_t *)texture_clouds_work;
 
     td = (struct texture_clouds_s*)texture->data;
     td->size = size;
@@ -47,8 +48,8 @@
     texture_perlin_init(&td->perlin);
 }
 
-
-void texture_clouds_free(struct texture_s *texture) {
+void
+texture_clouds_free(struct texture_s *texture) {
     struct texture_clouds_s *td;
 
     td = (struct texture_clouds_s*)texture->data;
@@ -56,8 +57,8 @@
     bu_free(texture->data, "cloud data");
 }
 
-
-void texture_clouds_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_clouds_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
     struct texture_clouds_s *td;
     vect_t p, pt;
 

Modified: brlcad/trunk/src/adrt/librender/texture_gradient.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_gradient.c  2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_gradient.c  2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,28 +30,28 @@
 
 #include "bu.h"
 
-void texture_gradient_init(struct texture_s *texture, int axis) {
+void
+texture_gradient_init(struct texture_s *texture, int axis) {
     struct texture_gradient_s *td;
 
     texture->data = bu_malloc(sizeof(struct texture_gradient_s), "gradient 
data");
     texture->free = texture_gradient_free;
-    texture->work = (struct texture_work_s *)texture_gradient_work;
+    texture->work = (texture_work_t *)texture_gradient_work;
 
     td = (struct texture_gradient_s *)texture->data;
     td->axis = axis;
 }
 
-
-void texture_gradient_free(struct texture_s *texture) {
+void
+texture_gradient_free(struct texture_s *texture) {
     bu_free(texture->data, "gradient data");
 }
 
-
-void texture_gradient_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_gradient_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
     struct texture_gradient_s *td;
     vect_t pt;
 
-
     td = (struct texture_gradient_s *)texture->data;
 
     /* Transform the Point */

Modified: brlcad/trunk/src/adrt/librender/texture_image.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_image.c     2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_image.c     2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -33,12 +33,13 @@
 
 #include "bu.h"
 
-void texture_image_init(struct texture_s *texture, short w, short h, unsigned 
char *image) {
+void
+texture_image_init(struct texture_s *texture, short w, short h, unsigned char 
*image) {
     struct texture_image_s *td;
 
     texture->data = bu_malloc(sizeof(struct texture_image_s), "texture data");
     texture->free = texture_image_free;
-    texture->work = (struct texture_work_s *)texture_image_work;
+    texture->work = (texture_work_t *)texture_image_work;
 
     td = (struct texture_image_s *)texture->data;
     td->w = w;
@@ -47,8 +48,8 @@
     memcpy(td->image, image, 3*w*h);
 }
 
-
-void texture_image_free(struct texture_s *texture) {
+void
+texture_image_free(struct texture_s *texture) {
     struct texture_image_s *td;
 
     td = (struct texture_image_s *)texture->data;
@@ -56,8 +57,8 @@
     bu_free(texture->data, "texture data");
 }
 
-
-void texture_image_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_image_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*UNUSED(ray), struct tie_id_s *id, vect_t *pixel) {
     struct texture_image_s *td;
     vect_t pt;
     fastf_t u, v;

Modified: brlcad/trunk/src/adrt/librender/texture_internal.h
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_internal.h  2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_internal.h  2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -52,7 +52,7 @@
        _a[1] = (_b[0] * _c[1]) + (_b[1] * _c[5]) + (_b[2] * _c[9]) + _c[13]; \
        _a[2] = (_b[0] * _c[2]) + (_b[1] * _c[6]) + (_b[2] * _c[10]) + _c[14]; \
        w = (_b[0] * _c[3]) + (_b[1] * _c[7]) + (_b[2] * _c[11]) + _c[15]; \
-       w = w ? 1/w : 1.0; \
+       w = NEAR_ZERO(w,SMALL_FASTF)?1.0:1.0/w; \
        _a[0] *= w; _a[1] *= w; _a[2] *= w; }
 
 #endif

Modified: brlcad/trunk/src/adrt/librender/texture_mix.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_mix.c       2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_mix.c       2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,12 +30,13 @@
 
 #include "bu.h"
 
-void texture_mix_init(struct texture_s *texture, struct texture_s *texture1, 
struct texture_s *texture2, fastf_t coef) {
+void
+texture_mix_init(struct texture_s *texture, struct texture_s *texture1, struct 
texture_s *texture2, fastf_t coef) {
     struct texture_mix_s *td;
 
     texture->data = bu_malloc(sizeof(struct texture_mix_s), "texture data");
     texture->free = texture_mix_free;
-    texture->work = (struct texture_work_s *)texture_mix_work;
+    texture->work = (texture_work_t *)texture_mix_work;
 
     td = (struct texture_mix_s *)texture->data;
     td->texture1 = texture1;
@@ -43,13 +44,13 @@
     td->coef = coef;
 }
 
-
-void texture_mix_free(struct texture_s *texture) {
+void
+texture_mix_free(struct texture_s *texture) {
     bu_free(texture->data, "texture data");
 }
 
-
-void texture_mix_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_mix_work(struct texture_s *texture, void *mesh, struct tie_ray_s *ray, 
struct tie_id_s *id, vect_t *pixel) {
     struct texture_mix_s *td;
     vect_t t;
 

Modified: brlcad/trunk/src/adrt/librender/texture_perlin.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_perlin.c    2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_perlin.c    2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -47,8 +47,8 @@
 fastf_t        texture_perlin_noise3(struct texture_perlin_s *P, vect_t V, 
fastf_t Size, int Depth);
 fastf_t        texture_perlin_omega(struct texture_perlin_s *P, vect_t V);
 
-
-void texture_perlin_init(struct texture_perlin_s *P) {
+void
+texture_perlin_init(struct texture_perlin_s *P) {
     int i, j, k;
 
     P->PV = (int *)bu_malloc(sizeof(int)*(2*B+2), "PV");
@@ -76,14 +76,14 @@
     }
 }
 
-
-void texture_perlin_free(struct texture_perlin_s *P) {
+void
+texture_perlin_free(struct texture_perlin_s *P) {
     bu_free(P->PV, "PV");
     bu_free(P->RV, "RV");
 }
 
-
-fastf_t texture_perlin_noise3(struct texture_perlin_s *P, vect_t V, fastf_t 
Size, int Depth) {
+fastf_t
+texture_perlin_noise3(struct texture_perlin_s *P, vect_t V, fastf_t Size, int 
Depth) {
     int i;
     fastf_t sum;
 
@@ -96,8 +96,8 @@
     return sum;
 }
 
-
-fastf_t texture_perlin_omega(struct texture_perlin_s *P, vect_t V) {
+fastf_t
+texture_perlin_omega(struct texture_perlin_s *P, vect_t V) {
     vect_t             q;
     fastf_t    r0[3], r1[3], sy, sz, a, b, c, d, t, u, v;
     int                b0[3], b1[3], b00, b10, b01, b11;

Modified: brlcad/trunk/src/adrt/librender/texture_stack.c
===================================================================
--- brlcad/trunk/src/adrt/librender/texture_stack.c     2011-01-12 20:06:03 UTC 
(rev 42174)
+++ brlcad/trunk/src/adrt/librender/texture_stack.c     2011-01-12 20:23:16 UTC 
(rev 42175)
@@ -30,20 +30,21 @@
 #include "bu.h"
 
 
-void texture_stack_init(struct texture_s *texture) {
+void
+texture_stack_init(struct texture_s *texture) {
     struct texture_stack_s *td;
 
     texture->data = bu_malloc(sizeof(struct texture_stack_s), "texture data");
     texture->free = texture_stack_free;
-    texture->work = (struct texture_work_s *)texture_stack_work;
+    texture->work = (texture_work_t *)texture_stack_work;
 
     td = (struct texture_stack_s *)texture->data;
     td->num = 0;
     td->list = NULL;
 }
 
-
-void texture_stack_free(struct texture_s *texture) {
+void
+texture_stack_free(struct texture_s *texture) {
     struct texture_stack_s *td;
 
     td = (struct texture_stack_s *)texture->data;
@@ -51,8 +52,8 @@
     bu_free(texture->data, "texture data");
 }
 
-
-void texture_stack_work(__TEXTURE_WORK_PROTOTYPE__) {
+void
+texture_stack_work(struct texture_s *texture, void *mesh, struct tie_ray_s 
*ray, struct tie_id_s *id, vect_t *pixel) {
     struct texture_stack_s *td;
     int i;
 
@@ -62,8 +63,8 @@
        td->list[i]->work(td->list[i], mesh, ray, id, pixel);
 }
 
-
-void texture_stack_push(struct texture_s *texture, struct texture_s 
*texture_new) {
+void
+texture_stack_push(struct texture_s *texture, struct texture_s *texture_new) {
     struct texture_stack_s *td;
 
     td = (struct texture_stack_s *)texture->data;

Modified: brlcad/trunk/src/adrt/libtie/tie.c
===================================================================
--- brlcad/trunk/src/adrt/libtie/tie.c  2011-01-12 20:06:03 UTC (rev 42174)
+++ brlcad/trunk/src/adrt/libtie/tie.c  2011-01-12 20:23:16 UTC (rev 42175)
@@ -428,7 +428,7 @@
            VCROSS(w.v,  u.v,  v.v);
 
            if (MAGNITUDE(w.v) < 0.0001 * 0.0001) {
-               bu_log("WARNING: degenerate triangle found: %f %f %f | %f %f %f 
| %f %f %f\n", 
+               bu_log("WARNING: degenerate triangle found: %f %f %f | %f %f %f 
| %f %f %f\n",
                        V3ARGS((*tlist[i*3+0]).v),  V3ARGS((*tlist[i*3+1]).v), 
V3ARGS((*tlist[i*3+2]).v));
                continue;
            }

Modified: brlcad/trunk/src/adrt/load_g.c
===================================================================
--- brlcad/trunk/src/adrt/load_g.c      2011-01-12 20:06:03 UTC (rev 42174)
+++ brlcad/trunk/src/adrt/load_g.c      2011-01-12 20:23:16 UTC (rev 42175)
@@ -168,7 +168,7 @@
        printf("Failed to load\n");
        return 0;
     }
-    
+
     if(dir->d_minor_type == ID_NMG)
        return 0;
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to