[MOAB-dev] r1552 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Tue Jan 22 14:44:12 CST 2008
Author: kraftche
Date: 2008-01-22 14:44:12 -0600 (Tue, 22 Jan 2008)
New Revision: 1552
Modified:
MOAB/trunk/MBAdaptiveKDTree.cpp
MOAB/trunk/MBAdaptiveKDTree.hpp
Log:
add method to get split plane of parent of current iterator location
Modified: MOAB/trunk/MBAdaptiveKDTree.cpp
===================================================================
--- MOAB/trunk/MBAdaptiveKDTree.cpp 2008-01-22 19:23:44 UTC (rev 1551)
+++ MOAB/trunk/MBAdaptiveKDTree.cpp 2008-01-22 20:44:12 UTC (rev 1552)
@@ -676,7 +676,16 @@
return MB_SUCCESS;
}
+MBErrorCode MBAdaptiveKDTreeIter::get_parent_split_plane( MBAdaptiveKDTree::Plane& plane ) const
+{
+ if (mStack.size() < 2) // at tree root
+ return MB_ENTITY_NOT_FOUND;
+
+ MBEntityHandle parent = mStack[mStack.size()-2].entity;
+ return tool()->get_split_plane( parent, plane );
+}
+
static MBErrorCode intersect_children_with_elems( MBInterface* moab,
const MBRange& elems,
MBAdaptiveKDTree::Plane plane,
Modified: MOAB/trunk/MBAdaptiveKDTree.hpp
===================================================================
--- MOAB/trunk/MBAdaptiveKDTree.hpp 2008-01-22 19:23:44 UTC (rev 1551)
+++ MOAB/trunk/MBAdaptiveKDTree.hpp 2008-01-22 20:44:12 UTC (rev 1552)
@@ -308,6 +308,9 @@
//! existing values in the 'results' vector.
MBErrorCode get_neighbors( MBAdaptiveKDTree::Axis norm, bool neg,
std::vector<MBAdaptiveKDTreeIter>& results ) const;
+
+ //! Get split plane that separates this node from its immediate sibling.
+ MBErrorCode get_parent_split_plane( MBAdaptiveKDTree::Plane& plane ) const;
};
#endif
More information about the moab-dev
mailing list