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

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...
 
 vtkIntersectionCounter ()
 This tolerance must be converted to parametric space. More...
 
 vtkIntersectionCounter (double tol, double length)
 This tolerance must be converted to parametric space. More...
 

Protected Attributes

double Tolerance
 
std::vector< doubleIntsArray
 

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::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::vtkIntersectionCounter ( double  tol,
double  length 
)
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 38 of file vtkIntersectionCounter.h.

Member Function Documentation

void vtkIntersectionCounter::SetTolerance ( double  tol)
inline

Set/Get the intersection tolerance.

Definition at line 47 of file vtkIntersectionCounter.h.

double vtkIntersectionCounter::GetTolerance ( )
inline

Definition at line 49 of file vtkIntersectionCounter.h.

void vtkIntersectionCounter::AddIntersection ( double  t)
inline

Add an intersection given by parametric coordinate t.

Definition at line 54 of file vtkIntersectionCounter.h.

void vtkIntersectionCounter::Reset ( )
inline

Reset the intersection process.

Definition at line 59 of file vtkIntersectionCounter.h.

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 66 of file vtkIntersectionCounter.h.

Member Data Documentation

double vtkIntersectionCounter::Tolerance
protected

Definition at line 100 of file vtkIntersectionCounter.h.

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

Definition at line 101 of file vtkIntersectionCounter.h.


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