fixed bug in Ray Iterator .. function Init
This commit is contained in:
parent
3e649c465e
commit
26b64e4246
vcg/space/index
|
@ -137,17 +137,20 @@ namespace vcg{
|
||||||
Elems.clear();
|
Elems.clear();
|
||||||
//CoordType ip;
|
//CoordType ip;
|
||||||
//control if intersect the bounding box of the mesh
|
//control if intersect the bounding box of the mesh
|
||||||
if(vcg::Intersection_Ray_Box<ScalarType>(Si.bbox,r,start))
|
if (Si.bbox.IsIn(r.Origin()))
|
||||||
{
|
start=r.Origin();
|
||||||
|
else
|
||||||
|
if (!(vcg::Intersection_Ray_Box<ScalarType>(Si.bbox,r,start))){
|
||||||
|
end=true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
Si.PToIP(start,CurrentCell);
|
Si.PToIP(start,CurrentCell);
|
||||||
_ControlLimits();
|
_ControlLimits();
|
||||||
_FindLinePar();
|
_FindLinePar();
|
||||||
//go to first intersection
|
//go to first intersection
|
||||||
while ((!End())&& Refresh())
|
while ((!End())&& Refresh())
|
||||||
_NextCell();
|
_NextCell();
|
||||||
}
|
|
||||||
else
|
|
||||||
end=true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool End()
|
bool End()
|
||||||
|
|
Loading…
Reference in New Issue