xmsgrid  1.0
GmPtSearch.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
7 //------------------------------------------------------------------------------
8 
9 //----- Included files ---------------------------------------------------------
10 #include <boost/dynamic_bitset.hpp>
13 #include <xmscore/points/ptsfwd.h>
14 #include <xmscore/stl/vector.h>
15 
16 //----- Forward declarations ---------------------------------------------------
17 
18 //----- Namespace declaration --------------------------------------------------
19 namespace xms
20 {
21 //----- Constants / Enumerations -----------------------------------------------
22 
23 //----- Structs / Classes ------------------------------------------------------
27 {
28 public:
29  static BSHP<GmPtSearch> New(bool a_2dSearch);
30  virtual ~GmPtSearch();
31 
33  virtual void PtsToSearch(BSHP<VecPt3d> a_pts) = 0;
34 
35  virtual void VectorThatGrowsToSearch(BSHP<VecPt3d> a) = 0;
36  virtual bool AddPtToVectorIfUnique(const Pt3d& a_, double a_tol, int& a_ptIdx) = 0;
37 
38  virtual void NearestPtsToPt(const Pt3d& a_pt,
39  int a_numPtsToFind,
40  bool a_quad_oct_Search,
41  VecInt& a_nearest) const = 0;
42 
43  virtual void NearestPtsToPtInRtree(int a_ptIdx,
44  const Pt3d& a_pt,
45  int a_numPtsToFind,
46  bool a_quad_oct_Search,
47  VecInt& a_nearest) const = 0;
48 
49  virtual bool PtInRTree(const Pt3d& a_pt, const double a_tol) = 0;
50 
51  virtual void PtsWithinDistanceToPtInRtree(int a_ptIdx,
52  const Pt3d& a_pt,
53  double a_dist,
54  VecInt& a_nearest) const = 0;
55 
56  virtual void SetActivity(boost::dynamic_bitset<size_t>& a_activity) = 0;
57  virtual boost::dynamic_bitset<size_t> GetActivity() = 0;
58 
59  virtual const BSHP<VecPt3d> GetPointsPtr() const = 0;
60  virtual bool Is2D() const = 0;
61  virtual std::string ToString() const = 0;
62 
63 private:
66 protected:
67  GmPtSearch();
68 };
69 //----- Function prototypes ----------------------------------------------------
70 }
Spatial index for searching points.
Definition: GmPtSearch.h:26
std::vector< int > VecInt
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
XMS Namespace.
Definition: geoms.cpp:34
static BSHP< GmPtSearch > New(bool a_2dSearch)
Creates an PtSearch class.
Definition: GmPtSearch.cpp:235