Revision: 33190
          http://brlcad.svn.sourceforge.net/brlcad/?rev=33190&view=rev
Author:   erikgreenwald
Date:     2008-11-14 14:21:05 +0000 (Fri, 14 Nov 2008)

Log Message:
-----------
stack save the thoughts in progress, have other stuff to do first

Modified Paths:
--------------
    brlcad/trunk/src/proc-db/metaball.c

Modified: brlcad/trunk/src/proc-db/metaball.c
===================================================================
--- brlcad/trunk/src/proc-db/metaball.c 2008-11-14 14:12:32 UTC (rev 33189)
+++ brlcad/trunk/src/proc-db/metaball.c 2008-11-14 14:21:05 UTC (rev 33190)
@@ -60,22 +60,45 @@
 }
 
 int
-bitronic(struct rt_wdb *outfp, int method, int nframes)
+bitronic(struct rt_wdb *outfp, int method, fastf_t threshold, int nframes)
 {
     char buf[BUFSIZ], fmt[FMTSIZ];
-    double step = 2.0 / (double) nframes;
+    fastf_t step;
+    struct rt_metaball_internal *mb;
 
+    BU_GETSTRUCT( mb, rt_metaball_internal );
+    mb->magic = RT_METABALL_INTERNAL_MAGIC;
+    mb->threshold = threshold > 0 ? threshold : 1.0;
+    mb->method = method >= 0 ? method : 0;     /* default to Blinn blob */
+
+    step = 2.0 / (double) nframes;
+
     mkfmt(fmt, "mball", ".s", nframes);
 
+#if 0
+    bleh[0].l->next = &bleh[1];
+    bleh[1].l->next = NULL;
+
     while(nframes--) {
+       struct wdb_metaballpt *mbpt;
        snprintf(buf, BUFSIZ, fmt, nframes);
+#define PT(B, X,Y,Z,FLDSTR,GOO)        B.type = WDB_METABALLPT_TYPE_POINT; 
B.fldstr = FLDSTR; B.sweat = GOO; VSET(B.coord, X, Y, Z);
+       BU_GETSTRUCT( mbpt, wdb_metaballpt );
+       PT(bleh[0], - ((double)nframes) * step, 0, 0, 1, 1);
+       PT(bleh[1], ((double)nframes) * step, 0, 0, 1, 1);
+#undef PT
+       BU_LIST_INSERT( &mb->metaball_ctrl_head, &mbpt->l );
+       /*
+       mk_metaball(outfp, buf, 2, method, threshold, bleh);
+       */
        printf("%s\t%f %f\n", buf, - ((double)nframes) * step, 
((double)nframes) * step);
     }
+#endif
     return EXIT_FAILURE;
 }
 
 int
-gravotronic(struct rt_wdb *outfp, int method, int nframes, int count)
+gravotronic(struct rt_wdb *outfp, int method, fastf_t threshold, int nframes, 
int count)
 {
     char buf[BUFSIZ], fmt[FMTSIZ];
 
@@ -147,9 +170,9 @@
     /* here we go! */
 
     if(gravotron)
-       retval = gravotronic(outfp, method, nframes, count);
+       retval = gravotronic(outfp, method, 1.0, nframes, count);
     else
-       retval = bitronic(outfp, method, nframes);
+       retval = bitronic(outfp, method, 1.0, nframes);
 
     /* and clean up  */
 


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to