37#ifndef vtkAbstractCellLocator_h
38#define vtkAbstractCellLocator_h
40#include "vtkCommonDataModelModule.h"
124 double x[3],
double pcoords[3],
int& subId);
133 double x[3],
double pcoords[3],
int& subId,
vtkIdType& cellId);
201 const double x[3],
double closestPoint[3],
vtkIdType& cellId,
int& subId,
double& dist2);
216 vtkIdType& cellId,
int& subId,
double& dist2);
229 vtkIdType& cellId,
int& subId,
double& dist2);
283 const double p1[3],
const double p2[3],
double tolerance,
vtkIdList* cells);
295 const double o[3],
const double n[3],
double tolerance,
vtkIdList* cells);
314 double x[3],
double tol2,
vtkGenericCell* GenCell,
double pcoords[3],
double* weights);
316 double pcoords[3],
double* weights);
365 static bool IsInBounds(
const double bounds[6],
const double x[3],
const double tol = 0.0);
virtual int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds)
Take the passed line segment and intersect it with the data set.
virtual vtkIdType FindCell(double x[3])
Returns the Id of the cell containing the point, returns -1 if no cell found.
void UpdateInternalWeights()
To be called in FindCell(double[3]).
virtual vtkTypeBool GetLazyEvaluation()
Most Locators build their search structures during BuildLocator but some may delay construction until...
virtual void LazyEvaluationOff()
Most Locators build their search structures during BuildLocator but some may delay construction until...
virtual void LazyEvaluationOn()
Most Locators build their search structures during BuildLocator but some may delay construction until...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool CacheCellBounds
virtual void FindCellsAlongPlane(const double o[3], const double n[3], double tolerance, vtkIdList *cells)
Given an unbounded plane defined by an origin o[3] and unit normal n[3], return the list of unique ce...
vtkTimeStamp WeightsTime
This time stamp helps us decide if we want to update internal Weights array size.
vtkTypeBool RetainCellLists
virtual void ShallowCopy(vtkAbstractCellLocator *)
Shallow copy of a vtkAbstractCellLocator.
~vtkAbstractCellLocator() override
vtkNew< vtkGenericCell > GenericCell
virtual vtkIdType FindCell(double x[3], double tol2, vtkGenericCell *GenCell, double pcoords[3], double *weights)
Find the cell containing a given point.
virtual bool StoreCellBounds()
This command is used internally by the locator to copy all cell Bounds into the internal CellBounds a...
static bool IsInBounds(const double bounds[6], const double x[3], const double tol=0.0)
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
Return the closest point within a specified radius and the cell which is closest to the point x.
void GetCellBounds(vtkIdType cellId, double *&cellBoundsPtr)
virtual void FindCellsWithinBounds(double *bbox, vtkIdList *cells)
Return a list of unique cell ids inside of a given bounding box.
virtual void FindClosestPoint(const double x[3], double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
Return the closest point and the cell which is closest to the point x.
virtual void FindCellsAlongLine(const double p1[3], const double p2[3], double tolerance, vtkIdList *cells)
Take the passed line segment and intersect it with the data set.
virtual void FreeCellBounds()
This command is used internally by the locator to copy all cell Bounds into the internal CellBounds a...
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2, int &inside)
Return the closest point within a specified radius and the cell which is closest to the point x.
std::vector< double > Weights
This array is resized so that it can fit points from the cell hosting the most in the input data set.
virtual void SetLazyEvaluation(vtkTypeBool)
Most Locators build their search structures during BuildLocator but some may delay construction until...
virtual vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
Return the closest point within a specified radius and the cell which is closest to the point x.
virtual int IntersectWithLine(const double p1[3], const double p2[3], const double tol, vtkPoints *points, vtkIdList *cellIds, vtkGenericCell *cell)
Take the passed line segment and intersect it with the data set.
void ComputeCellBounds()
This function can be used either internally or externally to compute only the cached cell bounds if C...
std::shared_ptr< std::vector< double > > CellBoundsSharedPtr
virtual bool InsideCellBounds(double x[3], vtkIdType cell_ID)
Quickly test if a point is inside the bounds of a particular cell.
virtual void FindClosestPoint(const double x[3], double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
Return the closest point and the cell which is closest to the point x.
virtual vtkIdType FindCell(double x[3], double tol2, vtkGenericCell *GenCell, int &subId, double pcoords[3], double *weights)
Find the cell containing a given point.
virtual int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId)
Return intersection point (if any) AND the cell which was intersected by the finite line.
virtual int IntersectWithLine(const double p1[3], const double p2[3], const double tol, vtkPoints *points, vtkIdList *cellIds)
Take the passed line segment and intersect it with the data set.
virtual int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
Return intersection point (if any) of finite line with cells contained in cell locator.
virtual int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell)
Return intersection point (if any) AND the cell which was intersected by the finite line.
object to represent cell connectivity
provides thread-safe access to cells
list of point or cell ids
a simple class to control print indentation
Allocate and hold a VTK object.
represent and manipulate 3D points
record modification and/or execution time
#define VTK_DEPRECATED_IN_9_2_0(reason)