[vtk-developers] Best fit plane function location
Biddiscombe, John A.
biddisco at cscs.ch
Mon Jan 25 09:56:26 EST 2010
erratum : Should have read something like
if (vtkPointSet::SafeDownCast(dataset)) {
BestFit(vtkPointSet::SafeDownCast(dataset)->GetPoints())
}
else {
copy stuff
}
> -----Original Message-----
> From: vtk-developers-bounces at vtk.org [mailto:vtk-developers-bounces at vtk.org]
> On Behalf Of Biddiscombe, John A.
> Sent: 25 January 2010 15:52
> To: David Doria
> Cc: VTK Developers
> Subject: Re: [vtk-developers] Best fit plane function location
>
> 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
>
> _______________________________________________
> 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