[vtk-developers] vtkPlane DeepCopy?

David Doria daviddoria+vtk at gmail.com
Sat Dec 5 17:00:07 EST 2009


On Sat, Dec 5, 2009 at 4:38 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> Is there a reason vtkPlane doesn't have a copy function? I.e. if I
> write one can we add it?
>
> Thanks,
>
> David

I see. I was just trying to make it more usable. I am writing a RANSAC
plane class so at every iteration CurrentPlane should be copied into
BestPlane if it is indeed the best plane so far. It seemed awkward to
have to get/set the normal and origin.

For the same reason, it would also be nice to have
double dist = plane->DistanceToPoint(double[3]);

instead of:
  double n[3];
  double o[3];
  plane->GetNormal(n);
  plane->GetOrigin(o);
  double dist = vtkPlane::DistanceToPlane(point, n, o);

Thanks,

David



More information about the vtk-developers mailing list