I just stumbled across this strange code in CSGMerge::All_Intersections():
-----------------
  ...
  int shadow_flag = ray.IsShadowTestRay();
  for(vector<ObjectPtr>::iterator Sib1 = children.begin(); Sib1 !=
children.end(); Sib1++)
  {
    if ( Test_Ray_Flags_Shadow(ray, (*Sib1)) )
    {
    ...
-----------------
What worries me is this:
- The shadow_flag variable is set but never used.
- The CSGUnion::All_Intersections() code uses Test_Ray_Flags() instead of
Test_Ray_Flags_Shadow()
(The Test_Ray_Flags_Shadow() appears once again further inside the loop of
CSGMerge::All_Intersections().)
This leads me to believe that the code should actually use
Test_Ray_Flags_Shadow() only if shadow_flag is true, but Test_Ray_Flags()
otherwise.
 Post a reply to this message 
 |