1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkMergePoints.h,v $
6 Date: $Date: 2002/10/04 20:43:44 $
7 Version: $Revision: 1.43 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkMergePoints - merge exactly coincident points
19 // .SECTION Description
20 // vtkMergePoints is a locator object to quickly locate points in 3D.
21 // The primary difference between vtkMergePoints and its superclass
22 // vtkPointLocator is that vtkMergePoints merges precisely coincident points
23 // and is therefore much faster.
27 #ifndef __vtkMergePoints_h
28 #define __vtkMergePoints_h
30 #include "vtkPointLocator.h"
32 class VTK_FILTERING_EXPORT vtkMergePoints : public vtkPointLocator
35 static vtkMergePoints *New();
36 vtkTypeRevisionMacro(vtkMergePoints,vtkPointLocator);
37 void PrintSelf(ostream& os, vtkIndent indent);
40 // Determine whether point given by x[3] has been inserted into points list.
41 // Return id of previously inserted point if this is true, otherwise return
43 vtkIdType IsInsertedPoint(const float x[3]);
44 vtkIdType IsInsertedPoint(float x, float y, float z)
45 {return this->vtkPointLocator::IsInsertedPoint(x, y, z); };
48 // Determine whether point given by x[3] has been inserted into points list.
49 // Return 0 if point was already in the list, otherwise return 1. If the
50 // point was not in the list, it will be ADDED. In either case, the id of
51 // the point (newly inserted or not) is returned in the ptId argument.
52 // Note this combines the functionality of IsInsertedPoint() followed
53 // by a call to InsertNextPoint().
54 int InsertUniquePoint(const float x[3], vtkIdType &ptId);
61 vtkMergePoints(const vtkMergePoints&); // Not implemented.
62 void operator=(const vtkMergePoints&); // Not implemented.