[brlcad-commits] SF.net SVN: brlcad:[40436] brlcad/branches/bottie/src/librt/primitives/bot/ bot.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <eri...@us...> - 2010-09-02 19:48:15
|
Revision: 40436 http://brlcad.svn.sourceforge.net/brlcad/?rev=40436&view=rev Author: erikgreenwald Date: 2010-09-02 19:48:09 +0000 (Thu, 02 Sep 2010) Log Message: ----------- wire up vertex data and call bottie push Modified Paths: -------------- brlcad/branches/bottie/src/librt/primitives/bot/bot.c Modified: brlcad/branches/bottie/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/branches/bottie/src/librt/primitives/bot/bot.c 2010-09-02 19:47:12 UTC (rev 40435) +++ brlcad/branches/bottie/src/librt/primitives/bot/bot.c 2010-09-02 19:48:09 UTC (rev 40436) @@ -990,10 +990,21 @@ /* without known winding or normals, we cannot use tie. */ if ( bip->face_normals == NULL && bip->orientation == RT_BOT_UNORIENTED ) return 0; - bip->tie = bottie_allocn_double(bip->num_faces); - /* tie_init1((struct tie_s *)bip->tie, bip->num_faces, TIE_KDTREE_FAST); */ - /* bunches of tie_push1((struct tie_s *)bip->tie, tlist, tnum, plist, - * pstride); (steal from load_g.c?) */ + { + int i; + + bip->tie = bottie_allocn_double(bip->num_faces); + + for(i=0;i< bip->num_faces; i++) { + fastf_t *v[3]; + + v[0] = &bip->vertices[bip->faces[i*3+0]*3]; + v[1] = &bip->vertices[bip->faces[i*3+1]*3]; + v[2] = &bip->vertices[bip->faces[i*3+2]*3]; + bottie_push_double((struct tie_s *)bip->tie, v, 1, i, 0); + } + bottie_prep_double((struct tie_s *)bip->tie); + } /* prep will wire the engine to bot_specific */ return 0; /* OK */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |