[brlcad-commits] CVS: brlcad/src/adrt/librender component.c, 1.14, 1.15 grid.c, 1.10, 1.11 hit.c, 1
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Sean M. <br...@us...> - 2007-09-04 21:23:05
|
Update of /cvsroot/brlcad/brlcad/src/adrt/librender In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30452/librender Modified Files: component.c grid.c hit.c path.c path.h phong.c plane.c plane.h render_util.c render_util.h spall.c spall.h Log Message: TFLOAT changed to tfloat. also quell a few warnings/bugs related to passing the wrong TIE_3 pointer type. Index: component.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/component.c,v retrieving revision 1.14 retrieving revision 1.15 diff -w -u -r1.14 -r1.15 --- component.c 8 Feb 2007 06:49:18 -0000 1.14 +++ component.c 30 Aug 2007 19:11:29 -0000 1.15 @@ -55,7 +55,7 @@ tie_id_t id; common_mesh_t *m; TIE_3 vec; - TFLOAT angle; + tfloat angle; if((m = (common_mesh_t *)tie_work(tie, ray, &id, component_hit, NULL))) { Index: grid.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/grid.c,v retrieving revision 1.10 retrieving revision 1.11 diff -w -u -r1.10 -r1.11 --- grid.c 8 Feb 2007 06:49:18 -0000 1.10 +++ grid.c 30 Aug 2007 19:11:29 -0000 1.11 @@ -44,7 +44,7 @@ tie_id_t id; common_mesh_t *m; TIE_3 vec; - TFLOAT angle; + tfloat angle; if((m = (common_mesh_t *)tie_work(tie, ray, &id, render_hit, NULL))) { Index: hit.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/hit.c,v retrieving revision 1.9 retrieving revision 1.10 diff -w -u -r1.9 -r1.10 --- hit.c 8 Feb 2007 06:49:18 -0000 1.9 +++ hit.c 30 Aug 2007 19:11:29 -0000 1.10 @@ -38,7 +38,7 @@ MATH_VEC_MUL_SCALAR(id->norm, id->norm, -1.0); if(t->normals) { - TFLOAT dot; + tfloat dot; TIE_3 norm; norm.v[0] = (1.0 - (id->alpha + id->beta)) * t->normals[0] + id->alpha * t->normals[3] + id->beta * t->normals[6]; Index: path.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/path.c,v retrieving revision 1.13 retrieving revision 1.14 diff -w -u -r1.13 -r1.14 --- path.c 31 May 2007 20:16:08 -0000 1.13 +++ path.c 30 Aug 2007 19:11:29 -0000 1.14 @@ -58,7 +58,7 @@ tie_id_t new_id; TIE_3 new_pix, accum, T, ref, bax, bay; common_mesh_t *new_mesh; - TFLOAT sin_theta, cos_theta, sin_phi, cos_phi; + tfloat sin_theta, cos_theta, sin_phi, cos_phi; int i, n, propogate; render_path_t *rd; Index: path.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/path.h,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- path.h 8 Feb 2007 06:49:18 -0000 1.7 +++ path.h 30 Aug 2007 19:11:29 -0000 1.8 @@ -32,7 +32,7 @@ typedef struct render_path_s { int samples; - TFLOAT inv_samples; + tfloat inv_samples; } render_path_t; Index: phong.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/phong.c,v retrieving revision 1.11 retrieving revision 1.12 diff -w -u -r1.11 -r1.12 --- phong.c 31 May 2007 20:16:08 -0000 1.11 +++ phong.c 30 Aug 2007 19:11:29 -0000 1.12 @@ -44,7 +44,7 @@ tie_id_t id; common_mesh_t *m; TIE_3 vec; - TFLOAT angle; + tfloat angle; if((m = (common_mesh_t*)tie_work(tie, ray, &id, render_hit, NULL))) { *pixel = m->prop->color; Index: plane.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/plane.c,v retrieving revision 1.22 retrieving revision 1.23 diff -w -u -r1.22 -r1.23 --- plane.c 20 Mar 2007 20:05:07 -0000 1.22 +++ plane.c 30 Aug 2007 19:11:29 -0000 1.23 @@ -40,15 +40,15 @@ typedef struct render_plane_hit_s { tie_id_t id; common_mesh_t *mesh; - TFLOAT plane[4]; - TFLOAT mod; + tfloat plane[4]; + tfloat mod; } render_plane_hit_t; void render_plane_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir) { render_plane_t *d; TIE_3 list[6], normal, up; - TFLOAT plane[4]; + tfloat plane[4]; render->work = render_plane_work; render->free = render_plane_free; @@ -140,7 +140,7 @@ render_plane_hit_t hit; TIE_3 vec, color; tie_id_t id; - TFLOAT t, angle, dot; + tfloat t, angle, dot; rd = (render_plane_t *)render->data; Index: plane.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/plane.h,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- plane.h 8 Feb 2007 06:49:18 -0000 1.7 +++ plane.h 30 Aug 2007 19:11:29 -0000 1.8 @@ -32,7 +32,7 @@ typedef struct render_plane_s { TIE_3 ray_pos; TIE_3 ray_dir; - TFLOAT plane[4]; + tfloat plane[4]; tie_t tie; } render_plane_t; Index: render_util.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/render_util.c,v retrieving revision 1.14 retrieving revision 1.15 diff -w -u -r1.14 -r1.15 --- render_util.c 20 Mar 2007 20:05:07 -0000 1.14 +++ render_util.c 30 Aug 2007 19:11:29 -0000 1.15 @@ -41,9 +41,9 @@ /* Generate vector list for a spall cone given a reference angle */ -void render_util_spall_vec(TIE_3 dir, TFLOAT angle, int vec_num, TIE_3 *vec_list) { +void render_util_spall_vec(TIE_3 dir, tfloat angle, int vec_num, TIE_3 *vec_list) { TIE_3 vec; - TFLOAT radius, t; + tfloat radius, t; int i; @@ -119,23 +119,23 @@ ind = 0; - *data = (void *)realloc(*data, 6*sizeof(TFLOAT) + sizeof(int)); + *data = (void *)realloc(*data, 6*sizeof(tfloat) + sizeof(int)); /* pack in hit */ - memcpy(&((char *)*data)[ind], &shotline.in.v[0], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); - memcpy(&((char *)*data)[ind], &shotline.in.v[1], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); - memcpy(&((char *)*data)[ind], &shotline.in.v[2], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); + memcpy(&((char *)*data)[ind], &shotline.in.v[0], sizeof(tfloat)); + ind += sizeof(tfloat); + memcpy(&((char *)*data)[ind], &shotline.in.v[1], sizeof(tfloat)); + ind += sizeof(tfloat); + memcpy(&((char *)*data)[ind], &shotline.in.v[2], sizeof(tfloat)); + ind += sizeof(tfloat); /* pack out hit */ - memcpy(&((char *)*data)[ind], &shotline.out.v[0], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); - memcpy(&((char *)*data)[ind], &shotline.out.v[1], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); - memcpy(&((char *)*data)[ind], &shotline.out.v[2], sizeof(TFLOAT)); - ind += sizeof(TFLOAT); + memcpy(&((char *)*data)[ind], &shotline.out.v[0], sizeof(tfloat)); + ind += sizeof(tfloat); + memcpy(&((char *)*data)[ind], &shotline.out.v[1], sizeof(tfloat)); + ind += sizeof(tfloat); + memcpy(&((char *)*data)[ind], &shotline.out.v[2], sizeof(tfloat)); + ind += sizeof(tfloat); memcpy(&((char *)*data)[ind], &shotline.mesh_num, sizeof(int)); ind += sizeof(int); @@ -160,7 +160,7 @@ } -void render_util_spall_list(tie_t *tie, tie_ray_t *ray, TFLOAT angle, void **data, int *dlen) { +void render_util_spall_list(tie_t *tie, tie_ray_t *ray, tfloat angle, void **data, int *dlen) { shotline_t shotline; tie_ray_t sray; tie_id_t id; @@ -217,7 +217,7 @@ ind = 0; - *data = (void *)realloc(*data, 6*sizeof(TFLOAT) + sizeof(int)); + *data = (void *)realloc(*data, 6*sizeof(tfloat) + sizeof(int)); /* pack in hit */ memcpy(&((char *)*data)[ind], &shotline.in, sizeof(TIE_3)); Index: render_util.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/render_util.h,v retrieving revision 1.8 retrieving revision 1.9 diff -w -u -r1.8 -r1.9 --- render_util.h 8 Feb 2007 06:49:18 -0000 1.8 +++ render_util.h 30 Aug 2007 19:11:29 -0000 1.9 @@ -29,9 +29,9 @@ #include "render_internal.h" -void render_util_spall_vec(TIE_3 dir, TFLOAT angle, int vec_num, TIE_3 *vec_list); +void render_util_spall_vec(TIE_3 dir, tfloat angle, int vec_num, TIE_3 *vec_list); void render_util_shotline_list(tie_t *tie, tie_ray_t *ray, void **data, int *dlen); -void render_util_spall_list(tie_t *tie, tie_ray_t *ray, TFLOAT angle, void **data, int *dlen); +void render_util_spall_list(tie_t *tie, tie_ray_t *ray, tfloat angle, void **data, int *dlen); #endif Index: spall.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/spall.c,v retrieving revision 1.17 retrieving revision 1.18 diff -w -u -r1.17 -r1.18 --- spall.c 20 Mar 2007 20:05:07 -0000 1.17 +++ spall.c 30 Aug 2007 19:11:29 -0000 1.18 @@ -43,15 +43,15 @@ typedef struct render_spall_hit_s { tie_id_t id; common_mesh_t *mesh; - TFLOAT plane[4]; - TFLOAT mod; + tfloat plane[4]; + tfloat mod; } render_spall_hit_t; -void render_spall_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir, TFLOAT angle) { +void render_spall_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir, tfloat angle) { render_spall_t *d; TIE_3 *tri_list, *vec_list, normal, up, vec; - TFLOAT plane[4], radius, t; + tfloat plane[4], radius, t; int i; render->work = render_spall_work; @@ -116,7 +116,7 @@ } } - tie_push(&d->tie, tri_list, TESSELATION, NULL, 0); + tie_push(&d->tie, &tri_list, TESSELATION, NULL, 0); tie_prep(&d->tie); free(vec_list); @@ -148,7 +148,7 @@ render_spall_hit_t hit; TIE_3 vec, color; tie_id_t id; - TFLOAT t, angle, dot; + tfloat t, angle, dot; rd = (render_spall_t *)render->data; Index: spall.h =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/adrt/librender/spall.h,v retrieving revision 1.7 retrieving revision 1.8 diff -w -u -r1.7 -r1.8 --- spall.h 8 Feb 2007 06:49:18 -0000 1.7 +++ spall.h 30 Aug 2007 19:11:29 -0000 1.8 @@ -32,12 +32,12 @@ typedef struct render_spall_s { TIE_3 ray_pos; TIE_3 ray_dir; - TFLOAT plane[4]; - TFLOAT angle; + tfloat plane[4]; + tfloat angle; tie_t tie; } render_spall_t; -void render_spall_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir, TFLOAT angle); +void render_spall_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir, tfloat angle); void render_spall_free(render_t *render); void render_spall_work(render_t *render, tie_t *tie, tie_ray_t *ray, TIE_3 *pixel); |