VTK
Public Member Functions | Protected Attributes | List of all members
vtkIntersectionCounter Class Reference

Fast simple class for dealing with ray intersections. More...

#include <vtkIntersectionCounter.h>

Public Member Functions

 vtkIntersectionCounter ()
 This tolerance must be converted to parametric space. More...
 
 vtkIntersectionCounter (double tol, double length)
 
void SetTolerance (double tol)
 Set/Get the intersection tolerance. More...
 
double GetTolerance ()
 
void AddIntersection (double t)
 Add an intersection given by parametric coordinate t. More...
 
void Reset ()
 Reset the intersection process. More...
 
int CountIntersections ()
 Returns number of intersections (even number of intersections, outside or odd number of intersections, inside). More...
 

Protected Attributes

double Tolerance
 
std::vector< double > IntsArray
 

Detailed Description

Fast simple class for dealing with ray intersections.

vtkIntersectionCounter is used to intersect data and merge coincident points along the intersect ray. It is light-weight and many of the member functions are in-lined so its very fast. It is not derived from vtkObject so it can be allocated on the stack.

This class makes the finite ray intersection process more robust. It merges intersections that are very close to one another (within a tolerance). Such situations are common when intersection rays pass through the edge or vertex of a mesh.

See also
vtkBoundingBox

Definition at line 29 of file vtkIntersectionCounter.h.

Constructor & Destructor Documentation

◆ vtkIntersectionCounter() [1/2]

vtkIntersectionCounter::vtkIntersectionCounter ( )
inline

This tolerance must be converted to parametric space.

Here tol is the tolerance in world coordinates; length is the ray length.

Definition at line 37 of file vtkIntersectionCounter.h.

◆ vtkIntersectionCounter() [2/2]

vtkIntersectionCounter::vtkIntersectionCounter ( double  tol,
double  length 
)
inline

Definition at line 41 of file vtkIntersectionCounter.h.

Member Function Documentation

◆ SetTolerance()

void vtkIntersectionCounter::SetTolerance ( double  tol)
inline

Set/Get the intersection tolerance.

Definition at line 50 of file vtkIntersectionCounter.h.

◆ GetTolerance()

double vtkIntersectionCounter::GetTolerance ( )
inline

Definition at line 51 of file vtkIntersectionCounter.h.

◆ AddIntersection()

void vtkIntersectionCounter::AddIntersection ( double  t)
inline

Add an intersection given by parametric coordinate t.

Definition at line 56 of file vtkIntersectionCounter.h.

◆ Reset()

void vtkIntersectionCounter::Reset ( )
inline

Reset the intersection process.

Definition at line 61 of file vtkIntersectionCounter.h.

◆ CountIntersections()

int vtkIntersectionCounter::CountIntersections ( )
inline

Returns number of intersections (even number of intersections, outside or odd number of intersections, inside).

This is done by considering close intersections (within Tolerance) as being the same point.

Definition at line 68 of file vtkIntersectionCounter.h.

Member Data Documentation

◆ Tolerance

double vtkIntersectionCounter::Tolerance
protected

Definition at line 102 of file vtkIntersectionCounter.h.

◆ IntsArray

std::vector<double> vtkIntersectionCounter::IntsArray
protected

Definition at line 103 of file vtkIntersectionCounter.h.


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