Revision: 56257
http://sourceforge.net/p/brlcad/code/56257
Author: brlcad
Date: 2013-07-27 17:05:05 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
eliminate dead code, #if 0'd
Modified Paths:
--------------
brlcad/trunk/src/adrt/librender/cut.c
brlcad/trunk/src/adrt/slave/slave.c
Modified: brlcad/trunk/src/adrt/librender/cut.c
===================================================================
--- brlcad/trunk/src/adrt/librender/cut.c 2013-07-27 17:00:12 UTC (rev
56256)
+++ brlcad/trunk/src/adrt/librender/cut.c 2013-07-27 17:05:05 UTC (rev
56257)
@@ -152,33 +152,11 @@
if (hit.mesh->flags & (ADRT_MESH_SELECT|ADRT_MESH_HIT)) {
VSET(color, hit.mesh->flags & ADRT_MESH_HIT ? (tfloat)0.9 :
(tfloat)0.2, (tfloat)0.2, hit.mesh->flags & ADRT_MESH_SELECT ? (tfloat)0.9 :
(tfloat)0.2);
} else {
- /* Mix actual color with white 4:1, shade 50% darker */
-#if 0
- VSET(color, 1.0, 1.0, 1.0);
- VSCALE(color, color, 3.0);
- VADD2(color, color, hit.mesh->attributes->color);
- VSCALE(color, color, 0.125);
-#else
VSET(color, (tfloat)0.8, (tfloat)0.8, (tfloat)0.7);
-#endif
}
-#if 0
- if (dot < 0) {
-#endif
- /* Shade using inhit */
- VSCALE((*pixel), color, (dot*0.90));
-#if 0
- } else {
- TIE_3 vec;
- fastf_t angle;
- /* shade solid */
- VSUB2(vec, ray->pos, hit.id.pos);
- VUNITIZE(vec);
- angle = vec[0]*hit.mod*-hit.plane[0] + vec[1]*-hit.mod*hit.plane[1] +
vec[2]*-hit.mod*hit.plane[2];
- VSCALE((*pixel), color, (angle*0.90));
- }
-#endif
+ /* Shade using inhit */
+ VSCALE((*pixel), color, (dot*0.90));
*pixel[0] += (tfloat)0.1;
*pixel[1] += (tfloat)0.1;
Modified: brlcad/trunk/src/adrt/slave/slave.c
===================================================================
--- brlcad/trunk/src/adrt/slave/slave.c 2013-07-27 17:00:12 UTC (rev 56256)
+++ brlcad/trunk/src/adrt/slave/slave.c 2013-07-27 17:05:05 UTC (rev 56257)
@@ -100,7 +100,7 @@
case ADRT_WORK_INIT:
{
render_camera_init (&adrt_workspace_list[wid].camera,
adrt_slave_threads);
- if( slave_load (&adrt_workspace_list[wid].tie, (void *)work->data,
wlen-ind) != 0 )
+ if ( slave_load (&adrt_workspace_list[wid].tie, (void *)work->data,
wlen-ind) != 0 )
bu_exit (1, "Failed to load geometry. Going into a flaming
tailspin\n");
tie_prep (&adrt_workspace_list[wid].tie);
render_camera_prep (&adrt_workspace_list[wid].camera);
@@ -175,9 +175,7 @@
ind += sizeof (TIE_3);
TCOPY(TIE_3, work->data, ind, ray.dir.v, 0);
ind += sizeof (TIE_3);
-#if 0
- printf ("pos: %.3f %.3f %.3f ... dir %.3f %.3f %.3f\n",
ray.pos.v[0], ray.pos.v[1], ray.pos.v[2], ray.dir.v[0], ray.dir.v[1],
ray.dir.v[2]);
-#endif
+
/* Fire the shot */
ray.depth = 0;
render_util_shotline_list (&adrt_workspace_list[wid].tie, &ray,
&mesg, &dlen);
@@ -325,23 +323,8 @@
break;
case RENDER_METHOD_CUT:
-#if 0
- {
- TIE_3 shot_pos, shot_dir;
-
- /* Extract shot position and direction */
- TCOPY(TIE_3, work->data, ind, &shot_pos, 0);
- ind += sizeof (TIE_3);
-
- TCOPY(TIE_3, work->data, ind, &shot_dir, 0);
- ind += sizeof (TIE_3);
-
-
render_cut_init(&adrt_workspace_list[wid].camera.render, shot_pos, shot_dir);
- }
-#else
render_cut_init(&adrt_workspace_list[wid].camera.render, (char *)work->data +
ind);
-#endif
- break;
+ break;
case RENDER_METHOD_SPALL:
{
@@ -411,7 +394,8 @@
static int adrt_slave_completed = 0;
static time_t adrt_slave_startsec = 0;
- if(adrt_slave_startsec == 0) adrt_slave_startsec = time(NULL);
+ if (adrt_slave_startsec == 0)
+ adrt_slave_startsec = time(NULL);
gettimeofday(&tv, NULL);
printf("\t[Work Units Completed: %.6d Rays: %.5d k/sec %lld]\n",
@@ -439,75 +423,7 @@
/* slave_last_frame = 0; */
}
-#if 0
-void adrt_slave_mesg(void *mesg, unsigned int mesg_len)
-{
- short op;
- TIE_3 foo;
- memcpy(&op, mesg, sizeof(short));
-
- switch (op) {
- case ADRT_WORK_SHOTLINE:
- {
- int i, n, num, ind;
- char name[256];
- unsigned char c;
-
- /* Reset all meshes hit flag */
- for (i = 0; i < db.mesh_num; i++)
- db.mesh_list[i]->flags &= MESH_SELECT;
-
- /* Read the data */
- ind = sizeof(short);
- memcpy(&num, &((unsigned char *)mesg)[ind], sizeof(int));
-
- ind += sizeof(int);
-
- for (i = 0; i < num; i++) {
- memcpy(&c, &((unsigned char *)mesg)[ind], 1);
- ind += 1;
-
- memcpy(name, &((unsigned char *)mesg)[ind], c);
- ind += c;
-
- /* set hit flag */
- for (n = 0; n < db.mesh_num; n++) {
- if (BU_STR_EQUAL(db.mesh_list[n]->name, name)) {
- db.mesh_list[n]->flags |= MESH_HIT;
- continue;
- }
- }
- }
- }
- break;
-
-#if 0 /* this isn't in the new version */
- case ISST_OP_SELECT:
- {
- uint8_t c, t;
- char string[256];
- uint32_t n;
-
- /* select or deslect */
- memcpy(&t, &((uint8_t *)mesg)[2], 1);
- /* string */
- memcpy(&c, &((uint8_t *)mesg)[3], 1);
- memcpy(string, &((uint8_t *)mesg)[4], c);
-
- /* set select flag */
- for (n = 0; n < db.mesh_num; n++)
- if (strstr(db.mesh_list[n]->name, string) || c == 1)
- db.mesh_list[n]->flags = (db.mesh_list[n]->flags &
MESH_SELECT) | t<<1;
- }
- break;
-#endif ISST_OP_SELECT
- default:
- break;
- }
-}
-#endif
-
#ifdef HAVE_GETOPT_LONG
static struct option longopts[] =
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits