[vtkusers] vtkStreamer question

Jiann-Liang James Chen chenjj at cs.ucdavis.edu
Mon Sep 18 15:24:36 EDT 2000


In the source file for the streamer class (vtkStreamer.cxx) after the
final position has been computed , instead of the using the computed
position (xNext[]) to update the the srteamer (sNext->x[]), why use the
closestPoint[] when xNext[] is still inside the cell?

vtkStreamer.cxx: 
.... 
.... 

static VTK_THREAD_RETURN_TYPE vtkStreamer_ThreadedIntegrate( void *arg)
{
...
...


 xNext[i] = sPtr->x[i] +
	    dir * (step/2.0) * (sPtr->v[i] + vNext[i]) / sPtr->speed;
...
...



if ( cell->EvaluatePosition(xNext, closestPoint, sNext->subId,
				    sNext->p, dist2, w) == 1)
	  { //integration still in cell
	  for (i=0; i<3; i++)
	    { 
	    sNext->x[i] = closestPoint[i];
	    }

	.....

  }
	else
	  { //integration has passed out of cell

	.....

	 for (i=0; i<3; i++)
	      {
	      sNext->x[i] = xNext[i];
	      }
...

}


Any inofrmation will be helpful.

Thank you.


James





More information about the vtkusers mailing list