Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::AdaptiveKDTreeIter Class Reference

Iterate over leaves of an adaptive kD-tree. More...

#include <AdaptiveKDTree.hpp>

+ Collaboration diagram for moab::AdaptiveKDTreeIter:

Classes

struct  StackObj
 

Public Types

enum  Direction { LEFT = 0 , RIGHT = 1 }
 

Public Member Functions

 AdaptiveKDTreeIter ()
 
ErrorCode initialize (AdaptiveKDTree *tool, EntityHandle root, const double box_min[3], const double box_max[3], Direction direction)
 
AdaptiveKDTreetool () const
 
EntityHandle handle () const
 Get handle for current leaf. More...
 
const double * box_min () const
 Get min corner of axis-aligned box for current leaf. More...
 
const double * box_max () const
 Get max corner of axis-aligned box for current leaf. More...
 
double volume () const
 
bool intersects (const AdaptiveKDTree::Plane &plane) const
 test if a plane intersects the leaf box More...
 
unsigned depth () const
 Get depth in tree. root is at depth of 1. More...
 
ErrorCode step (Direction direction)
 Advance the iterator either left or right in the tree Note: stepping past the end of the tree will invalidate the iterator. It will not be work step the other direction. More...
 
ErrorCode step ()
 Advance to next leaf Returns MB_ENTITY_NOT_FOUND if at end. Note: steping past the end of the tree will invalidate the iterator. Calling back() will not work. More...
 
ErrorCode back ()
 Move back to previous leaf Returns MB_ENTITY_NOT_FOUND if at beginning. Note: steping past the start of the tree will invalidate the iterator. Calling step() will not work. More...
 
ErrorCode sibling_side (AdaptiveKDTree::Axis &axis_out, bool &neg_out) const
 Return the side of the box bounding this tree node that is shared with the immediately adjacent sibling (the tree node that shares a common parent node with this node in the binary tree.) More...
 
ErrorCode get_neighbors (AdaptiveKDTree::Axis norm, bool neg, std::vector< AdaptiveKDTreeIter > &results, double epsilon=0.0) const
 Get adjacent leaf nodes on side indicated by norm and neg. More...
 
ErrorCode get_parent_split_plane (AdaptiveKDTree::Plane &plane) const
 Get split plane that separates this node from its immediate sibling. More...
 
bool is_sibling (const AdaptiveKDTreeIter &other_leaf) const
 Return true if thos node and the passed node share the same immediate parent. More...
 
bool is_sibling (EntityHandle other_leaf) const
 Return true if thos node and the passed node share the same immediate parent. More...
 
bool sibling_is_forward () const
 Returns true if calling step() will advance to the immediate sibling of the current node. Returns false if current node is root or back() will move to the immediate sibling. More...
 
bool intersect_ray (const double ray_point[3], const double ray_vect[3], double &t_enter, double &t_exit) const
 Find range of overlap between ray and leaf. More...
 

Private Types

enum  { BMIN = 0 , BMAX = 1 }
 

Private Member Functions

ErrorCode step_to_first_leaf (Direction direction)
 Descend tree to left most leaf from current position No-op if at leaf. More...
 

Private Attributes

CartVect mBox [2]
 min and max corners of bounding box More...
 
AdaptiveKDTreetreeTool
 tool for tree More...
 
std::vector< StackObjmStack
 stack storing path through tree More...
 
std::vector< EntityHandlechildVect
 temporary storage of child handles More...
 

Friends

class AdaptiveKDTree
 

Detailed Description

Iterate over leaves of an adaptive kD-tree.

Definition at line 342 of file AdaptiveKDTree.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
BMIN 
BMAX 

Definition at line 360 of file AdaptiveKDTree.hpp.

361  {
362  BMIN = 0,
363  BMAX = 1
364  }; //!< indices into mBox and child list

◆ Direction

Enumerator
LEFT 
RIGHT 

Definition at line 345 of file AdaptiveKDTree.hpp.

346  {
347  LEFT = 0,
348  RIGHT = 1
349  };

Constructor & Destructor Documentation

◆ AdaptiveKDTreeIter()

moab::AdaptiveKDTreeIter::AdaptiveKDTreeIter ( )
inline

Definition at line 378 of file AdaptiveKDTree.hpp.

378 : treeTool( 0 ), childVect( 2 ) {}

Member Function Documentation

◆ back()

ErrorCode moab::AdaptiveKDTreeIter::back ( )
inline

Move back to previous leaf Returns MB_ENTITY_NOT_FOUND if at beginning. Note: steping past the start of the tree will invalidate the iterator. Calling step() will not work.

Definition at line 446 of file AdaptiveKDTree.hpp.

447  {
448  return step( LEFT );
449  }

References LEFT, and step().

Referenced by get_neighbors().

◆ box_max()

const double* moab::AdaptiveKDTreeIter::box_max ( ) const
inline

Get max corner of axis-aligned box for current leaf.

Definition at line 404 of file AdaptiveKDTree.hpp.

405  {
406  return mBox[BMAX].array();
407  }

References moab::CartVect::array(), BMAX, and mBox.

Referenced by moab::AdaptiveKDTree::best_subdivision_plane(), moab::AdaptiveKDTree::best_vertex_median_plane(), moab::AdaptiveKDTree::best_vertex_sample_plane(), intersect_ray(), and moab::AdaptiveKDTree::print().

◆ box_min()

const double* moab::AdaptiveKDTreeIter::box_min ( ) const
inline

Get min corner of axis-aligned box for current leaf.

Definition at line 398 of file AdaptiveKDTree.hpp.

399  {
400  return mBox[BMIN].array();
401  }

References moab::CartVect::array(), BMIN, and mBox.

Referenced by moab::AdaptiveKDTree::best_subdivision_plane(), moab::AdaptiveKDTree::best_vertex_median_plane(), moab::AdaptiveKDTree::best_vertex_sample_plane(), intersect_ray(), and moab::AdaptiveKDTree::print().

◆ depth()

unsigned moab::AdaptiveKDTreeIter::depth ( ) const
inline

Get depth in tree. root is at depth of 1.

Definition at line 422 of file AdaptiveKDTree.hpp.

423  {
424  return mStack.size();
425  }

References mStack.

Referenced by moab::AdaptiveKDTree::build_tree(), moab::AdaptiveKDTree::compute_depth(), moab::AdaptiveKDTree::merge_leaf(), and moab::AdaptiveKDTree::print().

◆ get_neighbors()

ErrorCode moab::AdaptiveKDTreeIter::get_neighbors ( AdaptiveKDTree::Axis  norm,
bool  neg,
std::vector< AdaptiveKDTreeIter > &  results,
double  epsilon = 0.0 
) const

Get adjacent leaf nodes on side indicated by norm and neg.

E.g. if norm == X and neg == true, then get neighbor(s) adjacent to the side of the box contained in the plane with normal to the X axis and with the x coordinate equal to the minimum x of the bounding box.

E.g. if norm == Y and neg == false, then get neighbor(s) adjacent to the side of the box with y = maximum y of bounding box.

Parameters
normNormal vector for box side (X, Y, or Z)
negWhich of two planes with norm (true->smaller coord, false->larger coord)
resultsList to which to append results. This function does not clear existing values in list.
epsilonTolerance on overlap. A positive value E will result in nodes that are separated by as much as E to be considered touching. A negative value -E will cause leaves that do not overlap by at least E to be considered non-overlapping. Amongst other things, this value can be used to control whether or not leaves adjacent at only their edges or corners are returned.

Definition at line 578 of file AdaptiveKDTree.cpp.

582 {
583  StackObj node, parent;
584  ErrorCode rval;
585  AdaptiveKDTree::Plane plane;
586  int child_idx;
587 
588  // Find tree node at which the specified side of the box
589  // for this node was created.
590  AdaptiveKDTreeIter iter( *this ); // temporary iterator (don't modify *this)
591  node = iter.mStack.back();
592  iter.mStack.pop_back();
593  for( ;; )
594  {
595  // reached the root - original node was on boundary (no neighbors)
596  if( iter.mStack.empty() ) return MB_SUCCESS;
597 
598  // get parent node data
599  parent = iter.mStack.back();
600  iter.childVect.clear();
601  rval = treeTool->moab()->get_child_meshsets( parent.entity, iter.childVect );
602  if( MB_SUCCESS != rval ) return rval;
603  rval = treeTool->get_split_plane( parent.entity, plane );
604  if( MB_SUCCESS != rval ) return rval;
605 
606  child_idx = iter.childVect[0] == node.entity ? 0 : 1;
607  assert( iter.childVect[child_idx] == node.entity );
608 
609  // if we found the split plane for the desired side
610  // push neighbor on stack and stop
611  if( plane.norm == norm && (int)neg == child_idx )
612  {
613  // change from box of previous child to box of parent
614  iter.mBox[1 - child_idx][plane.norm] = node.coord;
615  // push other child of parent onto stack
616  node.entity = iter.childVect[1 - child_idx];
617  node.coord = iter.mBox[child_idx][plane.norm];
618  iter.mStack.push_back( node );
619  // change from parent box to box of new child
620  iter.mBox[child_idx][plane.norm] = plane.coord;
621  break;
622  }
623 
624  // continue up the tree
625  iter.mBox[1 - child_idx][plane.norm] = node.coord;
626  node = parent;
627  iter.mStack.pop_back();
628  }
629 
630  // now move down tree, searching for adjacent boxes
631  std::vector< AdaptiveKDTreeIter > list;
632  // loop over all potential paths to neighbors (until list is empty)
633  for( ;; )
634  {
635  // follow a single path to a leaf, append any other potential
636  // paths to neighbors to 'list'
637  node = iter.mStack.back();
638  for( ;; )
639  {
640  iter.childVect.clear();
641  rval = treeTool->moab()->get_child_meshsets( node.entity, iter.childVect );
642  if( MB_SUCCESS != rval ) return rval;
643 
644  // if leaf
645  if( iter.childVect.empty() )
646  {
647  results.push_back( iter );
648  break;
649  }
650 
651  rval = treeTool->get_split_plane( node.entity, plane );
652  if( MB_SUCCESS != rval ) return rval;
653 
654  // if split parallel to side
655  if( plane.norm == norm )
656  {
657  // continue with whichever child is on the correct side of the split
658  node.entity = iter.childVect[neg];
659  node.coord = iter.mBox[1 - neg][plane.norm];
660  iter.mStack.push_back( node );
661  iter.mBox[1 - neg][plane.norm] = plane.coord;
662  }
663  // if left child is adjacent
664  else if( this->mBox[BMIN][plane.norm] - plane.coord <= epsilon )
665  {
666  // if right child is also adjacent, add to list
667  if( plane.coord - this->mBox[BMAX][plane.norm] <= epsilon )
668  {
669  list.push_back( iter );
670  list.back().mStack.push_back( StackObj( iter.childVect[1], iter.mBox[BMIN][plane.norm] ) );
671  list.back().mBox[BMIN][plane.norm] = plane.coord;
672  }
673  // continue with left child
674  node.entity = iter.childVect[0];
675  node.coord = iter.mBox[BMAX][plane.norm];
676  iter.mStack.push_back( node );
677  iter.mBox[BMAX][plane.norm] = plane.coord;
678  }
679  // right child is adjacent
680  else
681  {
682  // if left child is not adjacent, right must be or something
683  // is really messed up.
684  assert( plane.coord - this->mBox[BMAX][plane.norm] <= epsilon );
685  // continue with left child
686  node.entity = iter.childVect[1];
687  node.coord = iter.mBox[BMIN][plane.norm];
688  iter.mStack.push_back( node );
689  iter.mBox[BMIN][plane.norm] = plane.coord;
690  }
691  }
692 
693  if( list.empty() ) break;
694 
695  iter = list.back();
696  list.pop_back();
697  }
698 
699  return MB_SUCCESS;
700 }

References back(), BMAX, BMIN, childVect, moab::AdaptiveKDTree::Plane::coord, moab::AdaptiveKDTreeIter::StackObj::coord, moab::AdaptiveKDTreeIter::StackObj::entity, ErrorCode, moab::Interface::get_child_meshsets(), moab::AdaptiveKDTree::get_split_plane(), MB_SUCCESS, mBox, moab::Tree::moab(), mStack, moab::AdaptiveKDTree::Plane::norm, and treeTool.

◆ get_parent_split_plane()

ErrorCode moab::AdaptiveKDTreeIter::get_parent_split_plane ( AdaptiveKDTree::Plane plane) const

Get split plane that separates this node from its immediate sibling.

Definition at line 722 of file AdaptiveKDTree.cpp.

723 {
724  if( mStack.size() < 2 ) // at tree root
725  return MB_ENTITY_NOT_FOUND;
726 
727  EntityHandle parent = mStack[mStack.size() - 2].entity;
728  return tool()->get_split_plane( parent, plane );
729 }

References moab::AdaptiveKDTree::get_split_plane(), MB_ENTITY_NOT_FOUND, mStack, and tool().

◆ handle()

◆ initialize()

ErrorCode moab::AdaptiveKDTreeIter::initialize ( AdaptiveKDTree tool,
EntityHandle  root,
const double  box_min[3],
const double  box_max[3],
Direction  direction 
)

Definition at line 475 of file AdaptiveKDTree.cpp.

480 {
481  mStack.clear();
482  treeTool = ttool;
483  mBox[BMIN][0] = bmin[0];
484  mBox[BMIN][1] = bmin[1];
485  mBox[BMIN][2] = bmin[2];
486  mBox[BMAX][0] = bmax[0];
487  mBox[BMAX][1] = bmax[1];
488  mBox[BMAX][2] = bmax[2];
489  mStack.push_back( StackObj( root, 0 ) );
490  return step_to_first_leaf( direction );
491 }

References BMAX, BMIN, mBox, mStack, step_to_first_leaf(), and treeTool.

Referenced by moab::AdaptiveKDTree::build_tree(), moab::AdaptiveKDTree::get_last_iterator(), and moab::AdaptiveKDTree::get_sub_tree_iterator().

◆ intersect_ray()

bool moab::AdaptiveKDTreeIter::intersect_ray ( const double  ray_point[3],
const double  ray_vect[3],
double &  t_enter,
double &  t_exit 
) const

Find range of overlap between ray and leaf.

Parameters
ray_pointCoordinates of start point of ray
ray_vectDirectionion vector for ray such that the ray is defined by r(t) = ray_point + t * ray_vect for t > 0.
t_enterOutput: if return value is true, this value is the parameter location along the ray at which the ray entered the leaf. If return value is false, then this value is undefined.
t_exitOutput: if return value is true, this value is the parameter location along the ray at which the ray exited the leaf. If return value is false, then this value is undefined.
Returns
true if ray intersects leaf, false otherwise.

Definition at line 767 of file AdaptiveKDTree.cpp.

771 {
773  return GeomUtil::ray_box_intersect( CartVect( box_min() ), CartVect( box_max() ), CartVect( ray_point ),
774  CartVect( ray_vect ), t_enter, t_exit );
775 }

References box_max(), box_min(), moab::GeomUtil::ray_box_intersect(), moab::TreeStats::traversalLeafObjectTests, moab::Tree::treeStats, and treeTool.

◆ intersects()

bool moab::AdaptiveKDTreeIter::intersects ( const AdaptiveKDTree::Plane plane) const
inline

test if a plane intersects the leaf box

Definition at line 416 of file AdaptiveKDTree.hpp.

417  {
418  return mBox[BMIN][plane.norm] <= plane.coord && mBox[BMAX][plane.norm] >= plane.coord;
419  }

References BMAX, BMIN, moab::AdaptiveKDTree::Plane::coord, mBox, and moab::AdaptiveKDTree::Plane::norm.

◆ is_sibling() [1/2]

bool moab::AdaptiveKDTreeIter::is_sibling ( const AdaptiveKDTreeIter other_leaf) const

Return true if thos node and the passed node share the same immediate parent.

Definition at line 731 of file AdaptiveKDTree.cpp.

732 {
733  const size_t s = mStack.size();
734  return ( s > 1 ) && ( s == other_leaf.mStack.size() ) &&
735  ( other_leaf.mStack[s - 2].entity == mStack[s - 2].entity ) && other_leaf.handle() != handle();
736 }

References handle(), and mStack.

◆ is_sibling() [2/2]

bool moab::AdaptiveKDTreeIter::is_sibling ( EntityHandle  other_leaf) const

Return true if thos node and the passed node share the same immediate parent.

Definition at line 738 of file AdaptiveKDTree.cpp.

739 {
740  if( mStack.size() < 2 || other_leaf == handle() ) return false;
741  EntityHandle parent = mStack[mStack.size() - 2].entity;
742  childVect.clear();
743  ErrorCode rval = tool()->moab()->get_child_meshsets( parent, childVect );
744  if( MB_SUCCESS != rval || childVect.size() != 2 )
745  {
746  assert( false );
747  return false;
748  }
749  return childVect[0] == other_leaf || childVect[1] == other_leaf;
750 }

References childVect, ErrorCode, moab::Interface::get_child_meshsets(), handle(), MB_SUCCESS, moab::Tree::moab(), mStack, and tool().

◆ sibling_is_forward()

bool moab::AdaptiveKDTreeIter::sibling_is_forward ( ) const

Returns true if calling step() will advance to the immediate sibling of the current node. Returns false if current node is root or back() will move to the immediate sibling.

Definition at line 752 of file AdaptiveKDTree.cpp.

753 {
754  if( mStack.size() < 2 ) // if root
755  return false;
756  EntityHandle parent = mStack[mStack.size() - 2].entity;
757  childVect.clear();
758  ErrorCode rval = tool()->moab()->get_child_meshsets( parent, childVect );
759  if( MB_SUCCESS != rval || childVect.size() != 2 )
760  {
761  assert( false );
762  return false;
763  }
764  return childVect[0] == handle();
765 }

References childVect, ErrorCode, moab::Interface::get_child_meshsets(), handle(), MB_SUCCESS, moab::Tree::moab(), mStack, and tool().

◆ sibling_side()

ErrorCode moab::AdaptiveKDTreeIter::sibling_side ( AdaptiveKDTree::Axis axis_out,
bool &  neg_out 
) const

Return the side of the box bounding this tree node that is shared with the immediately adjacent sibling (the tree node that shares a common parent node with this node in the binary tree.)

Parameters
axis_outThe principal axis orthogonal to the side of the box
neg_outtrue if the side of the box is toward the decreasing direction of the principal axis indicated by axis_out, false if it is toward the increasing direction.
Returns
MB_ENTITY_NOT FOUND if root node. MB_FAILURE if internal error. MB_SUCCESS otherwise.

Definition at line 702 of file AdaptiveKDTree.cpp.

703 {
704  if( mStack.size() < 2 ) // at tree root
705  return MB_ENTITY_NOT_FOUND;
706 
707  EntityHandle parent = mStack[mStack.size() - 2].entity;
708  AdaptiveKDTree::Plane plane;
709  ErrorCode rval = tool()->get_split_plane( parent, plane );
710  if( MB_SUCCESS != rval ) return MB_FAILURE;
711 
712  childVect.clear();
713  rval = tool()->moab()->get_child_meshsets( parent, childVect );
714  if( MB_SUCCESS != rval || childVect.size() != 2 ) return MB_FAILURE;
715 
716  axis_out = static_cast< AdaptiveKDTree::Axis >( plane.norm );
717  neg_out = ( childVect[1] == handle() );
718  assert( childVect[neg_out] == handle() );
719  return MB_SUCCESS;
720 }

References childVect, ErrorCode, moab::Interface::get_child_meshsets(), moab::AdaptiveKDTree::get_split_plane(), handle(), MB_ENTITY_NOT_FOUND, MB_SUCCESS, moab::Tree::moab(), mStack, moab::AdaptiveKDTree::Plane::norm, and tool().

◆ step() [1/2]

ErrorCode moab::AdaptiveKDTreeIter::step ( )
inline

Advance to next leaf Returns MB_ENTITY_NOT_FOUND if at end. Note: steping past the end of the tree will invalidate the iterator. Calling back() will not work.

Definition at line 437 of file AdaptiveKDTree.hpp.

438  {
439  return step( RIGHT );
440  }

References RIGHT.

Referenced by back().

◆ step() [2/2]

ErrorCode moab::AdaptiveKDTreeIter::step ( Direction  direction)

Advance the iterator either left or right in the tree Note: stepping past the end of the tree will invalidate the iterator. It will not be work step the other direction.

Definition at line 520 of file AdaptiveKDTree.cpp.

521 {
522  StackObj node, parent;
523  ErrorCode rval;
524  AdaptiveKDTree::Plane plane;
525  const Direction opposite = static_cast< Direction >( 1 - direction );
526 
527  // If stack is empty, then either this iterator is uninitialized
528  // or we reached the end of the iteration (and return
529  // MB_ENTITY_NOT_FOUND) already.
530  if( mStack.empty() ) return MB_FAILURE;
531 
532  // Pop the current node from the stack.
533  // The stack should then contain the parent of the current node.
534  // If the stack is empty after this pop, then we've reached the end.
535  node = mStack.back();
536  mStack.pop_back();
538  if( mStack.empty() ) treeTool->treeStats.leavesVisited++;
539 
540  while( !mStack.empty() )
541  {
542  // Get data for parent entity
543  parent = mStack.back();
544  childVect.clear();
545  rval = treeTool->moab()->get_child_meshsets( parent.entity, childVect );
546  if( MB_SUCCESS != rval ) return rval;
547  rval = treeTool->get_split_plane( parent.entity, plane );
548  if( MB_SUCCESS != rval ) return rval;
549 
550  // If we're at the left child
551  if( childVect[opposite] == node.entity )
552  {
553  // change from box of left child to box of parent
554  mBox[direction][plane.norm] = node.coord;
555  // push right child on stack
556  node.entity = childVect[direction];
557  treeTool->treeStats.nodesVisited++; // changed node
558  node.coord = mBox[opposite][plane.norm];
559  mStack.push_back( node );
560  // change from box of parent to box of right child
561  mBox[opposite][plane.norm] = plane.coord;
562  // descend to left-most leaf of the right child
563  return step_to_first_leaf( opposite );
564  }
565 
566  // The current node is the right child of the parent,
567  // continue up the tree.
568  assert( childVect[direction] == node.entity );
569  mBox[opposite][plane.norm] = node.coord;
570  node = parent;
572  mStack.pop_back();
573  }
574 
575  return MB_ENTITY_NOT_FOUND;
576 }

References childVect, moab::AdaptiveKDTree::Plane::coord, moab::AdaptiveKDTreeIter::StackObj::coord, moab::AdaptiveKDTreeIter::StackObj::entity, ErrorCode, moab::Interface::get_child_meshsets(), moab::AdaptiveKDTree::get_split_plane(), moab::TreeStats::leavesVisited, MB_ENTITY_NOT_FOUND, MB_SUCCESS, mBox, moab::Tree::moab(), mStack, moab::TreeStats::nodesVisited, moab::AdaptiveKDTree::Plane::norm, step_to_first_leaf(), moab::Tree::treeStats, and treeTool.

Referenced by moab::AdaptiveKDTree::build_tree(), moab::AdaptiveKDTree::compute_depth(), moab::MergeMesh::find_merged_to(), and moab::AdaptiveKDTree::print().

◆ step_to_first_leaf()

ErrorCode moab::AdaptiveKDTreeIter::step_to_first_leaf ( Direction  direction)
private

Descend tree to left most leaf from current position No-op if at leaf.

Definition at line 493 of file AdaptiveKDTree.cpp.

494 {
495  ErrorCode rval;
496  AdaptiveKDTree::Plane plane;
497  const Direction opposite = static_cast< Direction >( 1 - direction );
498 
499  for( ;; )
500  {
501  childVect.clear();
502  treeTool->treeStats.nodesVisited++; // not sure whether this is the visit or the push_back below
503  rval = treeTool->moab()->get_child_meshsets( mStack.back().entity, childVect );
504  if( MB_SUCCESS != rval ) return rval;
505  if( childVect.empty() )
506  { // leaf
508  break;
509  }
510 
511  rval = treeTool->get_split_plane( mStack.back().entity, plane );
512  if( MB_SUCCESS != rval ) return rval;
513 
514  mStack.push_back( StackObj( childVect[direction], mBox[opposite][plane.norm] ) );
515  mBox[opposite][plane.norm] = plane.coord;
516  }
517  return MB_SUCCESS;
518 }

References childVect, moab::AdaptiveKDTree::Plane::coord, ErrorCode, moab::Interface::get_child_meshsets(), moab::AdaptiveKDTree::get_split_plane(), moab::TreeStats::leavesVisited, MB_SUCCESS, mBox, moab::Tree::moab(), mStack, moab::TreeStats::nodesVisited, moab::AdaptiveKDTree::Plane::norm, moab::Tree::treeStats, and treeTool.

Referenced by moab::AdaptiveKDTree::compute_depth(), initialize(), moab::AdaptiveKDTree::split_leaf(), and step().

◆ tool()

◆ volume()

double moab::AdaptiveKDTreeIter::volume ( ) const
inline

Definition at line 409 of file AdaptiveKDTree.hpp.

410  {
411  return ( mBox[BMAX][0] - mBox[BMIN][0] ) * ( mBox[BMAX][1] - mBox[BMIN][1] ) *
412  ( mBox[BMAX][2] - mBox[BMIN][2] );
413  }

References BMAX, BMIN, and mBox.

Friends And Related Function Documentation

◆ AdaptiveKDTree

friend class AdaptiveKDTree
friend

Definition at line 375 of file AdaptiveKDTree.hpp.

Member Data Documentation

◆ childVect

std::vector< EntityHandle > moab::AdaptiveKDTreeIter::childVect
mutableprivate

◆ mBox

CartVect moab::AdaptiveKDTreeIter::mBox[2]
private

◆ mStack

std::vector< StackObj > moab::AdaptiveKDTreeIter::mStack
private

◆ treeTool

AdaptiveKDTree* moab::AdaptiveKDTreeIter::treeTool
private

The documentation for this class was generated from the following files: