40#ifndef vtkStaticCellLocator_h
41#define vtkStaticCellLocator_h
44#include "vtkCommonDataModelModule.h"
48struct vtkCellProcessor;
52 friend struct vtkCellBinner;
53 friend struct vtkCellProcessor;
72 vtkSetVector3Macro(Divisions,
int);
73 vtkGetVectorMacro(Divisions,
int, 3);
84 double pcoords[3],
double* weights)
override;
106 const double p1[3],
const double p2[3],
double tolerance,
vtkIdList* cells)
override;
117 const double o[3],
const double n[3],
double tolerance,
vtkIdList* cells);
132 vtkIdType& cellId,
int& subId,
double& dist2)
override;
157 int IntersectWithLine(
const double a0[3],
const double a1[3],
double tol,
double& t,
double x[3],
163 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
164 double pcoords[3],
int& subId)
override
166 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId);
172 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
173 double pcoords[3],
int& subId,
vtkIdType& cellId)
override
175 return this->Superclass::IntersectWithLine(p1, p2, tol, t, x, pcoords, subId, cellId);
182 const double p1[3],
const double p2[3],
vtkPoints* points,
vtkIdList* cellIds)
override
184 return this->Superclass::IntersectWithLine(p1, p2, points, cellIds);
230 vtkSetMacro(UseDiagonalLengthTolerance,
bool);
231 vtkGetMacro(UseDiagonalLengthTolerance,
bool);
232 vtkBooleanMacro(UseDiagonalLengthTolerance,
bool);
245 bool UseDiagonalLengthTolerance =
false;
an abstract base class for locators which find cells
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 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.
provides thread-safe access to cells
list of point or cell ids
a simple class to control print indentation
represent and manipulate 3D points
concrete dataset represents vertices, lines, polygons, and triangle strips
perform fast cell location operations
int IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds) override
Reimplemented from vtkAbstractCellLocator to support bad compilers.
static vtkStaticCellLocator * New()
Standard methods to instantiate, print and obtain type-related information.
vtkIdType MaxNumberOfBuckets
vtkIdType FindClosestPointWithinRadius(double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2, int &inside) override
Return the closest point within a specified radius and the cell which is closest to the point x.
vtkIdType FindCell(double x[3]) override
Reimplemented from vtkAbstractCellLocator to support bad compilers.
vtkIdType FindCell(double pos[3], double vtkNotUsed(tol2), vtkGenericCell *cell, double pcoords[3], double *weights) override
Test a point to find if it is inside a cell.
void FindClosestPoint(const double x[3], double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2) override
Return the closest point and the cell which is closest to the point x.
void FindCellsWithinBounds(double *bbox, vtkIdList *cells) override
Return a list of unique cell ids inside of a given bounding box.
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
Reimplemented from vtkAbstractCellLocator to support bad compilers.
void BuildLocator() override
Satisfy vtkLocator abstract interface.
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...
~vtkStaticCellLocator() override
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId) override
Reimplemented from vtkAbstractCellLocator to support bad compilers.
vtkCellProcessor * Processor
bool GetLargeIds()
Inform the user as to whether large ids are being used.
unsigned char * CellHasBeenVisited
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods to instantiate, print and obtain type-related information.
void GenerateRepresentation(int level, vtkPolyData *pd) override
Satisfy vtkLocator abstract interface.
void FreeSearchStructure() override
Satisfy vtkLocator abstract interface.
unsigned char QueryNumber
int IntersectWithLine(const double a0[3], const double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell) override
Return intersection point (if any) AND the cell which was intersected by the finite line.
void FindCellsAlongLine(const double p1[3], const double p2[3], double tolerance, vtkIdList *cells) override
Given a finite line defined by the two points (p1,p2), return the list of unique cell ids in the buck...