Revision: 37232
http://brlcad.svn.sourceforge.net/brlcad/?rev=37232&view=rev
Author: irpguardian
Date: 2010-01-12 19:00:19 +0000 (Tue, 12 Jan 2010)
Log Message:
-----------
Added very basic calls to impliment the heat-graph. This will be lightmodel 8,
and will
eventually determine how much time was spent calculating each pixel during a
raytrace.
After the initial raytrace is completed, the picture will be replaced with a
graphical
representation of how long each pixel took in regards to the entire picture,
where
short times are charactarized as one color, and transition to another color
representing a longer time.
However, now it just changes the background to white.
Modified Paths:
--------------
brlcad/trunk/src/rt/view.c
Modified: brlcad/trunk/src/rt/view.c
===================================================================
--- brlcad/trunk/src/rt/view.c 2010-01-12 18:38:23 UTC (rev 37231)
+++ brlcad/trunk/src/rt/view.c 2010-01-12 19:00:19 UTC (rev 37232)
@@ -33,6 +33,7 @@
* 5 curvature debugging (principal direction)
* 6 UV Coord
* 7 Photon Mapping
+ * 8 Time-to-render heat graph
*
* Notes -
* The normals on all surfaces point OUT of the solid.
@@ -1129,7 +1130,20 @@
break;
case 8:
{
- bu_log("Entered the awesome heat graph!\n");
+ /*routine taken from 0 case*/
+
+ /* Light from the "eye" (ray source). Note sign change */
+ lp = BU_LIST_FIRST( light_specific, &(LightHead.l) );
+ diffuse0 = 0;
+ if ( (cosI0 = -VDOT(normal, ap->a_ray.r_dir)) >= 0.0 )
+ diffuse0 = cosI0 * ( AmbientIntensity - 1.0);
+ VSCALE( work0, lp->lt_color, diffuse0 );
+
+ /* Add in contribution from ambient light */
+ VSCALE( work1, ambient_color, AmbientIntensity );
+ VADD2( ap->a_color, work0, work1 );
+
+ /*bu_log("Entered the awesome heat graph!\n");*/
break;
}
@@ -1536,9 +1550,14 @@
}
break;
+ /*Now for the new Heat-graph lightmodel that will take all times to
+ *compute the ray trace, normalize times, and then create the trace
+ *according to how long each individual pixel took to render
+ */
case 8:
{
- VSETALL(background, 255);
+ ap->a_hit = colorview;
+ VSETALL(background, 1);
break;
}
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 Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits