bool Lathe::test_hit(const BasicRay &ray, IStack& Depth_Stack, DBL d, DBL w, int n, TraceThreadData *Thread) { Vector3d IPoint; if ((d > DEPTH_TOLERANCE) && (d < MAX_DISTANCE)) { IPoint = ray.Evaluate(d); if (Clip.empty() || Point_In_Clip(IPoint, Clip, Thread)) { Depth_Stack->push(Intersection(d, IPoint, this, n, w)); return(true); } } return(false); }
bool Superellipsoid::insert_hit(const BasicRay &ray, DBL Depth, IStack& Depth_Stack, TraceThreadData *Thread) { Vector3d IPoint; if ((Depth > DEPTH_TOLERANCE) && (Depth < MAX_DISTANCE)) { IPoint = ray.Evaluate(Depth); if (Clip.empty() || Point_In_Clip(IPoint, Clip, Thread)) { Depth_Stack->push(Intersection(Depth, IPoint, this)); return(true); } } return(false); }
bool Sor::test_hit(const BasicRay &ray, IStack& Depth_Stack, DBL d, DBL k, int t, int n, TraceThreadData *Thread) { Vector3d IPoint; if ((d > DEPTH_TOLERANCE) && (d < MAX_DISTANCE)) { IPoint = ray.Evaluate(d); if (Clip.empty() || Point_In_Clip(IPoint, Clip, Thread)) { /* is the extra copy of d redundant? */ Depth_Stack->push(Intersection(d, IPoint, this, t, n, k)); return(true); } } return(false); }