Revision: 47435
          http://brlcad.svn.sourceforge.net/brlcad/?rev=47435&view=rev
Author:   abhi2011
Date:     2011-11-04 20:19:15 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Circular bunch of rays are being generated correctly, time to shoot 'em.

Modified Paths:
--------------
    brlcad/trunk/src/libged/simulate/simrt.c

Modified: brlcad/trunk/src/libged/simulate/simrt.c
===================================================================
--- brlcad/trunk/src/libged/simulate/simrt.c    2011-11-04 19:40:34 UTC (rev 
47434)
+++ brlcad/trunk/src/libged/simulate/simrt.c    2011-11-04 20:19:15 UTC (rev 
47435)
@@ -1068,7 +1068,7 @@
        vect_t diff, up_vec, ref_axis;
        point_t overlap_center;
        fastf_t d, r;
-       struct xrays *xrayp ;
+       struct xrays *xrayp, *entry ;
        struct xray center_ray;
 
        /* Setup center ray */
@@ -1099,6 +1099,9 @@
                VCROSS(up_vec, rt_result.resultant_normal_B, ref_axis);
        }
 
+       bu_log("shoot_normal_rays: center_ray pt(%f,%f,%f) dir(%f,%f,%f), 
up_vec(%f,%f,%f), r=%f",
+                       V3ARGS(center_ray.r_pt), V3ARGS(center_ray.r_dir), 
V3ARGS(up_vec), r);
+
        /* Initialize the BU_LIST in preparation for rt_gen_circular_grid() */
        BU_GETSTRUCT(xrayp, xrays);
        BU_LIST_INIT(&(xrayp->l));
@@ -1107,11 +1110,19 @@
        xrayp->ray.index = 0;
        xrayp->ray.magic = RT_RAY_MAGIC;
 
-       rt_gen_circular_grid(xrayp, &center_ray, r, up_vec,r*2);
+       rt_gen_circular_grid(xrayp, &center_ray, r, up_vec, 0.1);
 
-       bu_free(xrayp, "free struct xrays list head");
+       /* Lets check the rays */
+       while (BU_LIST_WHILE(entry, xrays, &(xrayp->l))) {
+          bu_log("shoot_normal_rays: center_ray pt(%f,%f,%f) dir(%f,%f,%f)",
+                               V3ARGS(entry->ray.r_pt), 
V3ARGS(entry->ray.r_dir));
+          BU_LIST_DEQUEUE(&(entry->l));
+          bu_free(entry, "free xrays entry");
+       }
 
 
+       bu_free(xrayp, "free xrays list head");
+
        return GED_OK;
 }
 

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


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to