[vtkusers] Intersection?
Subramanian, S.
S.Subramanian at tue.nl
Fri Aug 30 17:23:30 EDT 2002
Hi,
I am new to vtk and have the following question.
How do I find the point of intersection of a cube with a line using vtk?
Can I use vtkclippolydata?
I tried the following but it gives an error that vtkline is not part of
ImplicitFunction.
vtkLine *line = vtkLine::New();
line->GetPointIds()->SetId(0,0);
line->GetPointIds()->SetId(1,1);
line->GetPoints()->SetPoint(0,point1);
line->GetPoints()->SetPoint(1,point2);
vtkClipPolyData *clipper = vtkClipPolyData::New();
clipper->SetInput(cube->GetOutput());
clipper->SetClipFunction(line);
clipper->GenerateClippedOutputOn();
clipper->SetValue(0.5);
I tried introducing
vtkImplicitDataSet *dataset;
but line is not compatible with that too.
I am missing something silly here,
Can you help me?
thanks in advance,
Sriram
More information about the vtkusers
mailing list