moab
moab::RayIntersector Class Reference
Inheritance diagram for moab::RayIntersector:
moab::OrientedBoxTreeTool::Op

List of all members.

Public Member Functions

 RayIntersector (OrientedBoxTreeTool *tool_ptr, const double *ray_point, const double *unit_ray_dir, const double *ray_length, double tolerance, Range &leaf_boxes)
virtual ErrorCode visit (EntityHandle node, int depth, bool &descend)
 Visit a node in the tree during a traversal.
virtual ErrorCode leaf (EntityHandle node)
 Process a leaf node during tree traversal.

Private Attributes

OrientedBoxTreeTooltool
const CartVect b
const CartVect m
const double * len
const double tol
Rangeboxes

Detailed Description

Definition at line 809 of file OrientedBoxTreeTool.cpp.


Constructor & Destructor Documentation

moab::RayIntersector::RayIntersector ( OrientedBoxTreeTool tool_ptr,
const double *  ray_point,
const double *  unit_ray_dir,
const double *  ray_length,
double  tolerance,
Range leaf_boxes 
) [inline]

Definition at line 820 of file OrientedBoxTreeTool.cpp.

      : tool(tool_ptr),
        b(ray_point), m(unit_ray_dir),
        len(ray_length), tol(tolerance),
        boxes(leaf_boxes) 
      { }

Member Function Documentation

Process a leaf node during tree traversal.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 970 of file OrientedBoxTreeTool.cpp.

{
  boxes.insert(node);
  return MB_SUCCESS;
}
ErrorCode moab::RayIntersector::visit ( EntityHandle  node,
int  depth,
bool &  descend 
) [virtual]

Visit a node in the tree during a traversal.

This method is called for each node in the tree visited during a pre-order traversal.

Parameters:
nodeThe EntityHandle for the entity set for the tree node.
depthThe current depth in the tree.
descendOutput: if false, traversal will skip children of the current node, or if the current node is a leaf, the 'leaf' method will not be called.

Implements moab::OrientedBoxTreeTool::Op.

Definition at line 956 of file OrientedBoxTreeTool.cpp.

{
  OrientedBox box;
  ErrorCode rval = tool->box( node, box );
  if (MB_SUCCESS != rval)
    return rval;
  
  descend = box.intersect_ray( b, m, tol, len);
  return MB_SUCCESS;
}

Member Data Documentation

Definition at line 813 of file OrientedBoxTreeTool.cpp.

Definition at line 816 of file OrientedBoxTreeTool.cpp.

const double* moab::RayIntersector::len [private]

Definition at line 814 of file OrientedBoxTreeTool.cpp.

Definition at line 813 of file OrientedBoxTreeTool.cpp.

const double moab::RayIntersector::tol [private]

Definition at line 815 of file OrientedBoxTreeTool.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines