MOAB: Mesh Oriented datABase  (version 5.2.1)
moab::GeomQueryTool::RayHistory Class Reference

#include <GeomQueryTool.hpp>

Public Member Functions

void reset ()
void reset_to_last_intersection ()
void rollback_last_intersection ()
ErrorCode get_last_intersection (EntityHandle &last_facet_hit) const
int size () const
bool in_history (EntityHandle ent) const
void add_entity (EntityHandle ent)

Private Attributes

std::vector< EntityHandleprev_facets


class GeomQueryTool

Detailed Description

Definition at line 57 of file GeomQueryTool.hpp.

Member Function Documentation

Add entity to the RayHistory

Definition at line 687 of file GeomQueryTool.cpp.

    prev_facets.push_back( ent );

Get the last intersection in the RayHistory. This will return a null EntityHandle (0) if the history is empty.

Definition at line 669 of file GeomQueryTool.cpp.


    if( prev_facets.size() > 0 )
        last_facet_hit = prev_facets.back();
        return MB_SUCCESS;
        return MB_ENTITY_NOT_FOUND;
Boolean indicating if this entity is in the RayHistory

Definition at line 682 of file GeomQueryTool.cpp.

    return std::find( prev_facets.begin(), prev_facets.end(), ent ) != prev_facets.end();

Clear this entire history-- logically equivalent to creating a new history, but probably more efficient.

Definition at line 649 of file GeomQueryTool.cpp.

References prev_facets.

Referenced by gqt_outside_face_rayfire_history(), and gqt_outside_face_rayfire_history_fail().


Clear the history up to the most recent intersection. This should be called when a ray changes direction at the site of a surface crossing, a situation that most commonly occurs at a reflecting boundary.

Definition at line 654 of file GeomQueryTool.cpp.


    if( prev_facets.size() > 1 )
        prev_facets[0] = prev_facets.back();
        prev_facets.resize( 1 );

Remove the most recent intersection. This allows a subsequent call along the same ray to return the same intersection.

Definition at line 664 of file GeomQueryTool.cpp.

    if( prev_facets.size() ) prev_facets.pop_back();
int moab::GeomQueryTool::RayHistory::size ( ) const [inline]
the number of surface crossings currently represented by this ray history

Definition at line 89 of file GeomQueryTool.hpp.

References prev_facets.

Referenced by gqt_outside_face_rayfire_history().

            return prev_facets.size();

Friends And Related Function Documentation

friend class GeomQueryTool [friend]

Definition at line 107 of file GeomQueryTool.hpp.

Member Data Documentation

List of all members.

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