[vtk-developers] Best fit plane function location

Biddiscombe, John A. biddisco at cscs.ch
Mon Jan 25 09:52:18 EST 2010


if (dataset->IsTypeOf(vtkPoints)) {
  BestFit(vtkPoints::SafeDownCast(dataset)->GetPoints())
}
else {
  copy stuff
}

 
> void vtkTextureMapToPlane::ComputeNormal(vtkDataSet *input)
> {
>  vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
>  for(unsigned int i = 0; i < input->GetNumberOfPoints(); i++)
>    {
>    double p[3];
>    input->GetPoint(i, p);
>    points->InsertNextPoint(p);
>    }
> 
> ... BestFit(points)...
> 
> like I had originally?
> 
> Thanks,
> 
> David
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list