SheafSystem  0.0.0.0
d_tree_point_locator_path.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef D_TREE_POINT_LOCATOR_PATH_H
22 #define D_TREE_POINT_LOCATOR_PATH_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef D_BIN_COORDINATES_H
29 #include "SheafSystem/d_bin_coordinates.h"
30 #endif
31 
32 #ifndef SHEAF_H
33 #include "SheafSystem/sheaf.h"
34 #endif
35 
36 //#undef DIAGNOSTIC_OUTPUT
37 //#define DIAGNOSTIC_OUTPUT
38 
39 namespace geometry
40 {
41 
42 template <int DC, int DB>
43 class d_bounding_box;
44 template <int DC, int DB>
45 class d_tree_point_locator;
46 
50 template <int DC, int DB>
51 class SHEAF_DLL_SPEC d_tree_point_locator_path
52 {
53 
54  // ===========================================================
56  // ===========================================================
58 
59 public:
60 
65 
69  static const size_type DEGREE = 1<<DC;
70 
75  (const d_tree_point_locator_path<DC, DB>& xother);
76 
80  virtual bool invariant() const;
81 
86 
90  virtual ~d_tree_point_locator_path();
91 
96  const d_tree_point_locator<DC, DB>* xtree);
97 
102 
106  size_type depth() const;
107 
111  size_type height() const;
112 
116  static size_type max_height();
117 
121  static size_type max_depth();
122 
126  d_tree_point_locator<DC, DB>* tree() const;
127 
131  size_type head() const;
132 
136  void ascend();
137 
141  void descend();
142 
146  void put_head(size_type xhead);
147 
151  void reset();
152 
157  bool intersects(const d_bounding_box<DC, DB>* xbox) const;
158 
162  const d_bin_coordinates<DC, DB>& path() const;
163 
167  static size_type degree();
168 
169 private:
170 
175 
179  size_type _height;
180 
181  // Tree is included as feature in this class
182  // only because it is a convenient and efficient
183  // place to put it for use by various clients.
184  // It is not used in this class.
185 
189  const d_tree_point_locator<DC, DB>* _tree;
190 
195 
197 };
198 
199 // ===========================================================
200 // NON-MEMBER FUNCTIONS
201 // ===========================================================
202 
206 template <int DC, int DB>
207 SHEAF_DLL_SPEC
208 std::ostream&
209 operator<<(std::ostream &os, const d_tree_point_locator_path<DC, DB>& xpath);
210 
211 } // namespace geometry
212 
213 #endif // ifndef D_TREE_POINT_LOCATOR_PATH_H
Fixed point relative coordinates for a tree domain.
A point location query in domains with global coordinate dimension dc and local coordinate dimension ...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A bounding box that can be strung together into a list.
A path in an d_tree_point_locator search structure.
sheaf::size_type size_type
An unsigned integral type used to represent sizes and capacities.
Namespace for geometry component of sheaf system.
Definition: field_vd.h:54