6 #ifndef __GEOMETRIC_ADT_3D_INT_H__
7 #define __GEOMETRIC_ADT_3D_INT_H__
9 #define processedWithDT
11 #ifndef processedWithDT
12 #define GeomADTTuple3dInt GeomADTTuple3dInt
13 #define GeometricADT3dInt GeometricADT3dInt
14 #define GeometricADTTraversor3dInt __GeometricADTtraversor2
15 #define GeometricADTIterator3dInt __GeometricADTiterator2
18 #define debug_GeometricADT3dInt debug_GeometricADT2
27 #include OV_STD_INCLUDE(iostream)
31 #ifndef OV_USE_OLD_STL_HEADERS
41 #define __ADTType NTreeNode2GeomADTTuple3dInt
70 inline bool isTerminal();
71 inline int getDepth();
111 void setTarget(
const real *target_);
113 inline bool isFinished()
const;
115 inline int getDepth();
123 inline bool isOverlapping(
int depth,
const real *bBox);
124 inline bool isCandidate(
const real *candidate);
128 bool traversalFinished;
130 list<bool> leftSubTreeFinished;
162 void initTree(
int rangeDimension_,
const real *boundingBox_);
164 int addElement(
const real *bBox,
int &data);
173 inline int getSplitAxis(
int depth)
const;
174 inline Real getSplitLocation(
int axis,
const real *box)
const;
209 return depth%ADTDimension;
221 return (box[2*axis+1] + box[2*axis])/2.0;
237 return current->getData();
259 return traversalFinished;
269 return current->getData();
291 int axis = thisADT->getSplitAxis(theDepth);
292 return (a[axis]<=bBox[2*axis+1] && bBox[2*axis]<=b[axis]);
302 for (
int axis=0; axis<thisADT->ADTDimension; axis++)
305 if( a[axis]>candidate[axis] || candidate[axis]>b[axis] )
322 if (current==
NULL)
return true;
324 int splitAxis = thisADT->getSplitAxis(
depth);
325 Real splitLoc = thisADT->getSplitLocation(splitAxis, (current->getData()).
boundingBox);
329 (current->querry(
ADT_LEFT) && target[splitAxis]<=splitLoc) ||
330 (current->querry(
ADT_RIGHT) && target[splitAxis]>splitLoc))
338 #ifndef processedWithDT
342 #undef GeomADTTuple3dInt
343 #undef GeometricADT3dInt
344 #undef GeometricADTTraversor3dInt
345 #undef GeometricADTIterator3dInt
346 #undef GeometricADTError
347 #undef GeometricADTIteratorError
348 #undef GeometricADTTraversorError
349 #undef debug_GeometricADT3dInt