[brlcad-commits] SF.net SVN: brlcad:[34125] brlcad/trunk/src/adrt/librender/cut.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <eri...@us...> - 2009-03-31 19:46:26
|
Revision: 34125 http://brlcad.svn.sourceforge.net/brlcad/?rev=34125&view=rev Author: erikgreenwald Date: 2009-03-31 19:45:56 +0000 (Tue, 31 Mar 2009) Log Message: ----------- pointer wrangling. Modified Paths: -------------- brlcad/trunk/src/adrt/librender/cut.c Modified: brlcad/trunk/src/adrt/librender/cut.c =================================================================== --- brlcad/trunk/src/adrt/librender/cut.c 2009-03-31 18:05:19 UTC (rev 34124) +++ brlcad/trunk/src/adrt/librender/cut.c 2009-03-31 19:45:56 UTC (rev 34125) @@ -49,10 +49,12 @@ void render_cut_init(render_t *render, TIE_3 ray_pos, TIE_3 ray_dir) { + int i; render_cut_t *d; - TIE_3 *list, normal, up; + static TIE_3 list[6]; + TIE_3 **tlist, normal, up; - list = (TIE_3 *)bu_malloc(sizeof(TIE_3) * 6, "cutting plane triangles"); + tlist = (TIE_3 **)bu_malloc(sizeof(TIE_3 *) * 6, "cutting plane triangles"); render->work = render_cut_work; render->free = render_cut_free; @@ -98,9 +100,13 @@ VMOVE(list[5].v, ray_pos.v); list[5].v[2] -= THICKNESS; - tie_push(&d->tie, (TIE_3 **)&list, 2, NULL, 0); + for(i=0;i<6;i++) + tlist[i] = &list[i]; + + tie_push(&d->tie, tlist, 2, NULL, 0); + tie_prep(&d->tie); - bu_free(list, "cutting plane triangles"); + bu_free(tlist, "cutting plane triangles"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |