noticed RE_rayobject_raycast will often divide by zero, perhaps this
is ok but seems like it could lead to problems,
is this intentional?

---- rayobject.cpp:383
isec->idot_axis[i]              = 1.0f / isec->vec[i];
----

int RE_rayobject_raycast(RayObject *r, Isect *isec)
{
        int i;
        RE_RC_COUNT(isec->raycounter->raycast.test);

        /* Setup vars used on raycast */
        isec->dist = len_v3(isec->vec);
        
        for(i=0; i<3; i++)
        {
                isec->idot_axis[i]              = 1.0f / isec->vec[i];
                
                isec->bv_index[2*i]             = isec->idot_axis[i] < 0.0 ? 1 
: 0;
                isec->bv_index[2*i+1]   = 1 - isec->bv_index[2*i];
                
                isec->bv_index[2*i]             = i+3*isec->bv_index[2*i];
                isec->bv_index[2*i+1]   = i+3*isec->bv_index[2*i+1];
        }

-- 
- Campbell
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to