VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkCellTreeLocator Class Reference

This class implements the data structures, construction algorithms for fast cell location presented in "Fast, Memory-Efficient Cell location in Unstructured Grids for Visualization" by Christop Garth and Kenneth I. Joy in VisWeek, 2011. More...

#include <vtkCellTreeLocator.h>

Inheritance diagram for vtkCellTreeLocator:
[legend]
Collaboration diagram for vtkCellTreeLocator:
[legend]

Classes

class  vtkCellTree
 
class  vtkCellTreeNode
 

Public Types

typedef vtkAbstractCellLocator Superclass
 
- Public Types inherited from vtkAbstractCellLocator
typedef vtkLocator Superclass
 
- Public Types inherited from vtkLocator
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkCellTreeLocatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void FindCellsWithinBounds (double *bbox, vtkIdList *cells)
 
virtual vtkIdType FindCell (double pos[3], double vtkNotUsed, vtkGenericCell *cell, double pcoords[3], double *weights)
 
virtual int IntersectWithLine (double a0[3], double a1[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId, vtkGenericCell *cell)
 
virtual int IntersectWithLine (double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
 
virtual int IntersectWithLine (double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId, vtkIdType &cellId)
 
virtual int IntersectWithLine (const double p1[3], const double p2[3], vtkPoints *points, vtkIdList *cellIds)
 
virtual vtkIdType FindCell (double x[3])
 
virtual void FreeSearchStructure ()
 
virtual void GenerateRepresentation (int level, vtkPolyData *pd)
 
virtual void BuildLocatorInternal ()
 
virtual void BuildLocatorIfNeeded ()
 
virtual void ForceBuildLocator ()
 
virtual void BuildLocator ()
 
- Public Member Functions inherited from vtkAbstractCellLocator
vtkAbstractCellLocatorNewInstance () const
 
virtual bool InsideCellBounds (double x[3], vtkIdType cell_ID)
 
virtual void SetNumberOfCellsPerNode (int)
 
virtual int GetNumberOfCellsPerNode ()
 
virtual void SetCacheCellBounds (int)
 
virtual int GetCacheCellBounds ()
 
virtual void CacheCellBoundsOn ()
 
virtual void CacheCellBoundsOff ()
 
virtual void SetRetainCellLists (int)
 
virtual int GetRetainCellLists ()
 
virtual void RetainCellListsOn ()
 
virtual void RetainCellListsOff ()
 
virtual void SetLazyEvaluation (int)
 
virtual int GetLazyEvaluation ()
 
virtual void LazyEvaluationOn ()
 
virtual void LazyEvaluationOff ()
 
virtual void SetUseExistingSearchStructure (int)
 
virtual int GetUseExistingSearchStructure ()
 
virtual void UseExistingSearchStructureOn ()
 
virtual void UseExistingSearchStructureOff ()
 
virtual void FindClosestPoint (double x[3], double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
 
virtual void FindClosestPoint (double x[3], double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
 
virtual vtkIdType FindClosestPointWithinRadius (double x[3], double radius, double closestPoint[3], vtkIdType &cellId, int &subId, double &dist2)
 
virtual vtkIdType FindClosestPointWithinRadius (double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2)
 
virtual vtkIdType FindClosestPointWithinRadius (double x[3], double radius, double closestPoint[3], vtkGenericCell *cell, vtkIdType &cellId, int &subId, double &dist2, int &inside)
 
virtual void FindCellsAlongLine (double p1[3], double p2[3], double tolerance, vtkIdList *cells)
 
- Public Member Functions inherited from vtkLocator
vtkLocatorNewInstance () const
 
virtual void Update ()
 
virtual void Initialize ()
 
virtual void SetDataSet (vtkDataSet *)
 
virtual vtkDataSetGetDataSet ()
 
virtual void SetMaxLevel (int)
 
virtual int GetMaxLevel ()
 
virtual int GetLevel ()
 
virtual void SetAutomatic (int)
 
virtual int GetAutomatic ()
 
virtual void AutomaticOn ()
 
virtual void AutomaticOff ()
 
virtual void SetTolerance (double)
 
virtual double GetTolerance ()
 
virtual unsigned long GetBuildTime ()
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkCellTreeLocatorSafeDownCast (vtkObjectBase *o)
 
static vtkCellTreeLocatorNew ()
 
- Static Public Member Functions inherited from vtkAbstractCellLocator
static int IsTypeOf (const char *type)
 
static vtkAbstractCellLocatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkLocator
static int IsTypeOf (const char *type)
 
static vtkLocatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
- Protected Member Functions inherited from vtkAbstractCellLocator
 vtkAbstractCellLocator ()
 
 ~vtkAbstractCellLocator ()
 
virtual bool StoreCellBounds ()
 
virtual void FreeCellBounds ()
 
- Protected Member Functions inherited from vtkLocator
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkLocator ()
 
 ~vtkLocator ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 
int NumberOfBuckets
 
vtkCellTreeTree
 
class vtkCellPointTraversal
 
class vtkCellTreeNode
 
class vtkCellTreeBuilder
 
 vtkCellTreeLocator ()
 
 ~vtkCellTreeLocator ()
 
bool RayMinMaxT (const double origin[3], const double dir[3], double &rTmin, double &rTmax)
 
bool RayMinMaxT (const double bounds[6], const double origin[3], const double dir[3], double &rTmin, double &rTmax)
 
int getDominantAxis (const double dir[3])
 
void Classify (const double origin[3], const double dir[3], double &rDist, vtkCellTreeNode *&near, vtkCellTreeNode *&mid, vtkCellTreeNode *&far, int &mustCheck)
 
virtual int IntersectCellInternal (vtkIdType cell_ID, const double p1[3], const double p2[3], const double tol, double &t, double ipt[3], double pcoords[3], int &subId)
 

Additional Inherited Members

- Protected Attributes inherited from vtkAbstractCellLocator
int NumberOfCellsPerNode
 
int RetainCellLists
 
int CacheCellBounds
 
int LazyEvaluation
 
int UseExistingSearchStructure
 
vtkGenericCellGenericCell
 
double(* CellBounds )[6]
 
- Protected Attributes inherited from vtkLocator
vtkDataSetDataSet
 
int Automatic
 
double Tolerance
 
int MaxLevel
 
int Level
 
vtkTimeStamp BuildTime
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

This class implements the data structures, construction algorithms for fast cell location presented in "Fast, Memory-Efficient Cell location in Unstructured Grids for Visualization" by Christop Garth and Kenneth I. Joy in VisWeek, 2011.

Cell Tree is a bounding interval hierarchy based data structure, where child boxes do not form an exact split of the parent boxes along a dimension. Therefore two axis- aligned bounding planes (left max and right min) are stored for each node along a dimension. This class implements the data structure (Cell Tree Node) and its build and traversal algorithms described in the paper. Some methods in building and traversing the cell tree in this class were derived avtCellLocatorBIH class in the VisIT Visualization Tool

See also
vtkLocator vtkCellLocator vtkModifiedBSPTree
Tests:
vtkCellTreeLocator (Tests)

Definition at line 50 of file vtkCellTreeLocator.h.

Member Typedef Documentation

Definition at line 54 of file vtkCellTreeLocator.h.

Constructor & Destructor Documentation

vtkCellTreeLocator::vtkCellTreeLocator ( )
protected
vtkCellTreeLocator::~vtkCellTreeLocator ( )
protected

Member Function Documentation

static int vtkCellTreeLocator::IsTypeOf ( const char *  type)
static
virtual int vtkCellTreeLocator::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAbstractCellLocator.

static vtkCellTreeLocator* vtkCellTreeLocator::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkCellTreeLocator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkAbstractCellLocator.

vtkCellTreeLocator* vtkCellTreeLocator::NewInstance ( ) const
void vtkCellTreeLocator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAbstractCellLocator.

static vtkCellTreeLocator* vtkCellTreeLocator::New ( )
static

Constructor sets the maximum number of cells in a leaf to 8 and number of buckets to 5. Buckets are used in building the cell tree as described in the paper

virtual vtkIdType vtkCellTreeLocator::FindCell ( double  pos[3],
double  vtkNotUsed,
vtkGenericCell cell,
double  pcoords[3],
double weights 
)
virtual

Test a point to find if it is inside a cell. Returns the cellId if inside or -1 if not.

Reimplemented from vtkAbstractCellLocator.

virtual int vtkCellTreeLocator::IntersectWithLine ( double  a0[3],
double  a1[3],
double  tol,
double t,
double  x[3],
double  pcoords[3],
int subId,
vtkIdType cellId,
vtkGenericCell cell 
)
virtual

Return intersection point (if any) AND the cell which was intersected by the finite line. The cell is returned as a cell id and as a generic cell.

Reimplemented from vtkAbstractCellLocator.

virtual void vtkCellTreeLocator::FindCellsWithinBounds ( double bbox,
vtkIdList cells 
)
virtual

Return a list of unique cell ids inside of a given bounding box. The user must provide the vtkIdList to populate. This method returns data only after the locator has been built.

Reimplemented from vtkAbstractCellLocator.

virtual int vtkCellTreeLocator::IntersectWithLine ( double  p1[3],
double  p2[3],
double  tol,
double t,
double  x[3],
double  pcoords[3],
int subId 
)
inlinevirtual

reimplemented from vtkAbstractCellLocator to support bad compilers

Reimplemented from vtkAbstractCellLocator.

Definition at line 97 of file vtkCellTreeLocator.h.

virtual int vtkCellTreeLocator::IntersectWithLine ( double  p1[3],
double  p2[3],
double  tol,
double t,
double  x[3],
double  pcoords[3],
int subId,
vtkIdType cellId 
)
virtual

Return intersection point (if any) AND the cell which was intersected by the finite line. The cell is returned as a cell id and as a generic cell. This function is a modification from the vtkModifiedBSPTree class using the data structures in the paper to find intersections.

Reimplemented from vtkAbstractCellLocator.

virtual int vtkCellTreeLocator::IntersectWithLine ( const double  p1[3],
const double  p2[3],
vtkPoints points,
vtkIdList cellIds 
)
inlinevirtual

reimplemented from vtkAbstractCellLocator to support bad compilers

Reimplemented from vtkAbstractCellLocator.

Definition at line 118 of file vtkCellTreeLocator.h.

virtual vtkIdType vtkCellTreeLocator::FindCell ( double  x[3])
inlinevirtual

reimplemented from vtkAbstractCellLocator to support bad compilers

Reimplemented from vtkAbstractCellLocator.

Definition at line 128 of file vtkCellTreeLocator.h.

virtual void vtkCellTreeLocator::FreeSearchStructure ( )
virtual

Satisfy vtkLocator abstract interface.

Implements vtkLocator.

virtual void vtkCellTreeLocator::GenerateRepresentation ( int  level,
vtkPolyData pd 
)
virtual

Satisfy vtkLocator abstract interface.

Implements vtkLocator.

virtual void vtkCellTreeLocator::BuildLocatorInternal ( )
virtual

Satisfy vtkLocator abstract interface.

virtual void vtkCellTreeLocator::BuildLocatorIfNeeded ( )
virtual

Satisfy vtkLocator abstract interface.

virtual void vtkCellTreeLocator::ForceBuildLocator ( )
virtual

Satisfy vtkLocator abstract interface.

virtual void vtkCellTreeLocator::BuildLocator ( )
virtual

Satisfy vtkLocator abstract interface.

Implements vtkLocator.

bool vtkCellTreeLocator::RayMinMaxT ( const double  origin[3],
const double  dir[3],
double rTmin,
double rTmax 
)
protected
bool vtkCellTreeLocator::RayMinMaxT ( const double  bounds[6],
const double  origin[3],
const double  dir[3],
double rTmin,
double rTmax 
)
protected
int vtkCellTreeLocator::getDominantAxis ( const double  dir[3])
protected
void vtkCellTreeLocator::Classify ( const double  origin[3],
const double  dir[3],
double rDist,
vtkCellTreeNode *&  near,
vtkCellTreeNode *&  mid,
vtkCellTreeNode *&  far,
int mustCheck 
)
protected
virtual int vtkCellTreeLocator::IntersectCellInternal ( vtkIdType  cell_ID,
const double  p1[3],
const double  p2[3],
const double  tol,
double t,
double  ipt[3],
double  pcoords[3],
int subId 
)
protectedvirtual

Friends And Related Function Documentation

friend class vtkCellPointTraversal
friend

Definition at line 246 of file vtkCellTreeLocator.h.

friend class vtkCellTreeNode
friend

Definition at line 247 of file vtkCellTreeLocator.h.

friend class vtkCellTreeBuilder
friend

Definition at line 248 of file vtkCellTreeLocator.h.

Member Data Documentation

int vtkCellTreeLocator::NumberOfBuckets
protected

Definition at line 242 of file vtkCellTreeLocator.h.

vtkCellTree* vtkCellTreeLocator::Tree
protected

Definition at line 244 of file vtkCellTreeLocator.h.


The documentation for this class was generated from the following file: