Revision: 56299
          http://sourceforge.net/p/brlcad/code/56299
Author:   brlcad
Date:     2013-07-29 00:13:08 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
eliminate undocumented dead code

Modified Paths:
--------------
    brlcad/trunk/src/libged/polyclip.cpp
    brlcad/trunk/src/libged/view_obj.c
    brlcad/trunk/src/liboptical/liboslrend.cpp
    brlcad/trunk/src/liboptical/liboslrend.h
    brlcad/trunk/src/liboptical/render_svc.h
    brlcad/trunk/src/liboptical/sh_osl.cpp

Modified: brlcad/trunk/src/libged/polyclip.cpp
===================================================================
--- brlcad/trunk/src/libged/polyclip.cpp        2013-07-29 00:08:29 UTC (rev 
56298)
+++ brlcad/trunk/src/libged/polyclip.cpp        2013-07-29 00:13:08 UTC (rev 
56299)
@@ -449,14 +449,6 @@
            ++k;
        }
 
-#if 0
-       if (curr_lsg) {
-           VJOIN2(gpp->gp_contour[j].gpc_point[k], sketch_ip->V,
-                  sketch_ip->verts[curr_lsg->end][0], sketch_ip->u_vec,
-                  sketch_ip->verts[curr_lsg->end][1], sketch_ip->v_vec);
-       }
-#endif
-
        /* free contour node */
        bu_free((genptr_t)curr_cnode, "curr_cnode");
 

Modified: brlcad/trunk/src/libged/view_obj.c
===================================================================
--- brlcad/trunk/src/libged/view_obj.c  2013-07-29 00:08:29 UTC (rev 56298)
+++ brlcad/trunk/src/libged/view_obj.c  2013-07-29 00:13:08 UTC (rev 56299)
@@ -2914,13 +2914,6 @@
        {"viewDir",             vo_viewDir_tcl},
        {"vrot",                vo_vrot_tcl},
        {"zoom",                vo_zoom_tcl},
-#if 0
-       {"knob",                vo_knob_tcl},
-       {"qorot",               vo_qorot_tcl},
-       {"qvrot",               vo_qvrot_tcl},
-       {"status",              vo_status_tcl},
-       {"",                    vo__tcl},
-#endif
        {(char *)0,             (int (*)())0}
     };
 

Modified: brlcad/trunk/src/liboptical/liboslrend.cpp
===================================================================
--- brlcad/trunk/src/liboptical/liboslrend.cpp  2013-07-29 00:08:29 UTC (rev 
56298)
+++ brlcad/trunk/src/liboptical/liboslrend.cpp  2013-07-29 00:13:08 UTC (rev 
56299)
@@ -86,8 +86,10 @@
     return sh_ref;
 }
 
-Color3 OSLRenderer::QueryColor(RenderInfo *info) const {
 
+Color3
+OSLRenderer::QueryColor(RenderInfo *info) const
+{
     if(info->depth >= 5){
        return Color3(0.0f);
     }
@@ -108,33 +110,7 @@
     const ClosurePrimitive *prim = SamplePrimitive(weight, closure, 0.5);
 
 // Ray-tracing (local illumination)
-#if 0
 
-    if(prim){
-       if(prim->category() == OSL::ClosurePrimitive::BSDF) {
-           // evaluate bsdf closure
-           BSDFClosure *bsdf = (BSDFClosure*)prim;
-
-           // Eval the reflection weight from each light source
-           size_t nlights = info->light_dirs.size();
-           float pdf = 0.0;
-           for(size_t li = 0; li < nlights; li++){
-               info->reflect_weight += bsdf->eval_reflect(globals.I, 
info->light_dirs[li], pdf);
-           }
-           info->reflect_weight *= weight/nlights;
-       }
-       else if(prim->category() == OSL::ClosurePrimitive::Emissive) {
-           // evaluate emissive closure
-           EmissiveClosure *emissive = (EmissiveClosure*)prim;
-           Color3 l = weight*emissive->eval(globals.Ng, globals.I);
-           return l;
-       }
-    }
-    return Color3(0.0);
-
-// Path-tracing (global illumination)
-#else
-
     if(prim) {
        if(prim->category() == OSL::ClosurePrimitive::BSDF) {
            // sample BSDF closure
@@ -172,12 +148,13 @@
        }
     }
     return Color3(0.0f);
+}
 
-#endif
 
-}
 /* Return thread specific information */
-void* OSLRenderer::CreateThreadInfo(){
+void*
+OSLRenderer::CreateThreadInfo()
+{
     return ssi->create_thread_info();
 }
 
@@ -187,8 +164,8 @@
  * ----------------------------------------------- */
 
 const ClosureColor * OSLRenderer::
-ExecuteShaders(ShaderGlobals &globals, RenderInfo *info) const {
-
+ExecuteShaders(ShaderGlobals &globals, RenderInfo *info) const
+{
     memset(&globals, 0, sizeof(globals));
 
     VMOVE(globals.P, info->P);

Modified: brlcad/trunk/src/liboptical/liboslrend.h
===================================================================
--- brlcad/trunk/src/liboptical/liboslrend.h    2013-07-29 00:08:29 UTC (rev 
56298)
+++ brlcad/trunk/src/liboptical/liboslrend.h    2013-07-29 00:13:08 UTC (rev 
56299)
@@ -125,15 +125,6 @@
     SimpleRenderer rend;
     void *handle;
 
-    /* Information about each shader of the renderer */
-#if 0
-    struct OSLShader{
-       std::string name;
-       ShadingAttribStateRef state;
-    };
-    std::vector<OSLShader> shaders;
-#endif
-
     const ClosureColor
        *ExecuteShaders(ShaderGlobals &globals, RenderInfo *info) const;
 

Modified: brlcad/trunk/src/liboptical/render_svc.h
===================================================================
--- brlcad/trunk/src/liboptical/render_svc.h    2013-07-29 00:08:29 UTC (rev 
56298)
+++ brlcad/trunk/src/liboptical/render_svc.h    2013-07-29 00:13:08 UTC (rev 
56299)
@@ -75,34 +75,6 @@
 private:
     typedef std::map <ustring, shared_ptr<Transformation> > TransformMap;
     TransformMap m_named_xforms;
-
-#if 0
-    // Example cached data for pointcloud implementation with Partio
-
-    // OSL gets pointers to this but its definition is private.
-    // Right now it only caches the types already converted to
-    // Partio constants. This is what get_pointcloud_attr_query
-    // returns
-    struct AttrQuery
-    {
-       // Names of the attributes to query
-       std::vector<ustring> attr_names;
-       // Types as (enum Partio::ParticleAttributeType) of the
-       // attributes in the query
-       std::vector<int>     attr_partio_types;
-       // For sanity checks, capacity of the output arrays
-       int                  capacity;
-    };
-
-    // We will left this function as an exercise. It is only responsible
-    // for loading the point cloud if it is not already in memory and so
-    // on. You might or might not use Partio cache system
-    Partio::ParticleData *get_pointcloud (ustring filename);
-
-    // Keep a list so adding elements doesn't invalidate pointers.
-    // Careful, don't use a vector here!
-    std::list<AttrQuery> m_attr_queries;
-#endif
 };
 
 

Modified: brlcad/trunk/src/liboptical/sh_osl.cpp
===================================================================
--- brlcad/trunk/src/liboptical/sh_osl.cpp      2013-07-29 00:08:29 UTC (rev 
56298)
+++ brlcad/trunk/src/liboptical/sh_osl.cpp      2013-07-29 00:13:08 UTC (rev 
56299)
@@ -434,15 +434,6 @@
     register struct osl_specific *osl_sp =
        (struct osl_specific *)cp;
     BU_PUT(cp, struct osl_specific);
-
-#if 0
-    bu_semaphore_acquire(BU_SEM_SYSCALL);
-    if(oslr != NULL){
-       delete oslr;
-       oslr = NULL;
-    }
-    bu_semaphore_release(BU_SEM_SYSCALL);
-#endif
 }
 
 /*
@@ -606,68 +597,7 @@
 
 
 // Ray-tracing (local illumination)
-#if 0
 
-    /* -----------------------------------
-     * Get a list of all visible lights from this point
-     * -----------------------------------
-     */
-    light_obs(ap, swp, MFI_NORMAL|MFI_HIT|MFI_UV);
-
-    for (int i = ap->a_rt_i->rti_nlights-1; i >= 0; i--) {
-
-       struct light_specific *lp;
-
-       /* Light is not visible */
-       if ((lp = (struct light_specific *)swp->sw_visible[i]) == LIGHT_NULL)
-           continue;
-       /* Get the direction of this light */
-       Vec3 to_light;
-       VMOVE(to_light, swp->sw_tolight+3*i);
-       info.light_dirs.push_back(to_light);
-    }
-
-    info.reflect_weight = Color3(0.0);
-    info.transmit_weight = Color3(0.0);
-    Color3 weight = oslr->QueryColor(&info);
-
-    /* If the weight of reflection is greater than zero, we shoot another ray 
*/
-    fastf_t reflect_W = 0;
-    for(size_t i = 0; i < 3; i++)
-       reflect_W += info.reflect_weight[i];
-
-    // Do reflection
-    if(reflect_W > 0.0f){
-
-       /* Find the direction of the reflected ray */
-       Vec3 I, N;
-       VMOVE(I, info.I); // incidence ray
-       VMOVE(N, info.N); // normal
-
-       float proj = N.dot(I);
-       Vec3 R = (2 * proj) * N - I;
-
-       struct application new_ap;
-       RT_APPLICATION_INIT(&new_ap);
-
-       new_ap = *ap;                     /* struct copy */
-       new_ap.a_onehit = 1;
-       new_ap.a_hit = default_a_hit;
-       new_ap.a_level = info.depth + 1;
-       new_ap.a_flag = 0;
-
-       VMOVE(new_ap.a_ray.r_dir, R);
-       VMOVE(new_ap.a_ray.r_pt, info.P);
-       VMOVE(swp->sw_color, info.reflect_weight);
-    }
-    else {
-       VMOVE(swp->sw_color, weight);
-    }
-
-
-// Path-tracing (global illumination)
-#else
-
     /* We only perform reflection if application decides to */
     info.doreflection = 0;
     info.out_ray_type = 0;
@@ -717,7 +647,6 @@
        /* Final color */
        VMOVE(swp->sw_color, weight);
     }
-#endif
 
     return 1;
 }

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

Reply via email to