OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkMergePoints.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkMergePoints.h,v $
5   Language:  C++
6   Date:      $Date: 2002/10/04 20:43:44 $
7   Version:   $Revision: 1.43 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
24 // .SECTION See Also
25 // vtkCleanPolyData
26
27 #ifndef __vtkMergePoints_h
28 #define __vtkMergePoints_h
29
30 #include "vtkPointLocator.h"
31
32 class VTK_FILTERING_EXPORT vtkMergePoints : public vtkPointLocator
33 {
34 public:
35   static vtkMergePoints *New();
36   vtkTypeRevisionMacro(vtkMergePoints,vtkPointLocator);
37   void PrintSelf(ostream& os, vtkIndent indent);
38
39   // Description:
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
42   // -1.
43   vtkIdType IsInsertedPoint(const float x[3]);
44   vtkIdType IsInsertedPoint(float x, float  y, float z)
45     {return this->vtkPointLocator::IsInsertedPoint(x, y, z); };
46
47   // Description:
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);
55   
56 protected:
57   vtkMergePoints() {};
58   ~vtkMergePoints() {};
59   
60 private:
61   vtkMergePoints(const vtkMergePoints&);  // Not implemented.
62   void operator=(const vtkMergePoints&);  // Not implemented.
63 };
64
65 #endif
66
67