Skip to content
Snippets Groups Projects
Commit a7f5cf74 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot
Browse files

Merge topic 'release-vtkProbeFilter-default-CellLocator' into release


45f72b3b Changing default FindCell algorithm.

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarWill Schroeder <will.schroeder@kitware.com>
Merge-request: !5556
parents dd3627bb 45f72b3b
Branches
Tags
No related merge requests found
......@@ -14,6 +14,7 @@
=========================================================================*/
#include "vtkProbeFilter.h"
#include "vtkAbstractCellLocator.h"
#include "vtkBoundingBox.h"
#include "vtkCell.h"
#include "vtkCellData.h"
......@@ -30,7 +31,6 @@
#include "vtkSmartPointer.h"
#include "vtkSMPTools.h"
#include "vtkSMPThreadLocal.h"
#include "vtkStaticCellLocator.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <algorithm>
......@@ -404,13 +404,12 @@ void vtkProbeFilter::ProbeEmptyPoints(vtkDataSet *input,
// vtkPointSet based datasets do not have an implicit structure to their
// points. A cell locator performs better here than using the dataset's
// FindCell function.
// FindCell function. Using its own FindCell method by default.
vtkSmartPointer<vtkAbstractCellLocator> cellLocator;
if (vtkPointSet::SafeDownCast(source) != nullptr)
if ( (vtkPointSet::SafeDownCast(source) != nullptr) &&
(this->CellLocatorPrototype != nullptr) )
{
cellLocator.TakeReference(this->CellLocatorPrototype ?
this->CellLocatorPrototype->NewInstance() :
vtkStaticCellLocator::New());
cellLocator.TakeReference(this->CellLocatorPrototype->NewInstance());
cellLocator->SetDataSet(source);
cellLocator->Update();
}
......
......@@ -175,7 +175,7 @@ public:
//@{
/**
* Set/Get the prototype cell locator to use for probing the source dataset.
* By default, vtkStaticCellLocator will be used.
* By default, vtkDataSet::FindCell is called.
*/
virtual void SetCellLocatorPrototype(vtkAbstractCellLocator*);
vtkGetObjectMacro(CellLocatorPrototype, vtkAbstractCellLocator);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment