MOAB: Mesh Oriented datABase  (version 5.2.1)
SetIntersectIter< Container > Class Template Reference
+ Inheritance diagram for SetIntersectIter< Container >:
+ Collaboration diagram for SetIntersectIter< Container >:

Public Member Functions

 SetIntersectIter (iBase_EntityType type, iMesh_EntityTopology topology, EntityHandle set, EntityHandle other_set, int array_sz)
virtual ~SetIntersectIter ()
ErrorCode intersect_with_set (Interface *mb, Range &range)
ErrorCode intersect_with_set (Interface *mb, std::vector< EntityHandle > &list)
virtual ErrorCode reset (Interface *mb)

Private Attributes

EntityHandle otherSet

Detailed Description

template<class Container>
class SetIntersectIter< Container >

Definition at line 288 of file iMeshP_MOAB.cpp.


Constructor & Destructor Documentation

template<class Container>
SetIntersectIter< Container >::SetIntersectIter ( iBase_EntityType  type,
iMesh_EntityTopology  topology,
EntityHandle  set,
EntityHandle  other_set,
int  array_sz 
) [inline]

Definition at line 294 of file iMeshP_MOAB.cpp.

        : MBIter< Container >( type, topology, set, array_sz ), otherSet( other_set )
    {
    }
template<class Container>
virtual SetIntersectIter< Container >::~SetIntersectIter ( ) [inline, virtual]

Definition at line 299 of file iMeshP_MOAB.cpp.

{}

Member Function Documentation

template<class Container>
ErrorCode SetIntersectIter< Container >::intersect_with_set ( Interface *  mb,
Range range 
) [inline]

Definition at line 301 of file iMeshP_MOAB.cpp.

References moab::intersect().

    {
        Range tmp;
        ErrorCode result;
        result = mb->get_entities_by_handle( otherSet, tmp );
        range  = intersect( range, tmp );
        return result;
    }
template<class Container>
ErrorCode SetIntersectIter< Container >::intersect_with_set ( Interface *  mb,
std::vector< EntityHandle > &  list 
) [inline]

Definition at line 310 of file iMeshP_MOAB.cpp.

References MB_SUCCESS.

    {
        size_t w = 0;
        for( size_t r = 0; r < list.size(); ++r )
        {
            if( mb->contains_entities( otherSet, &list[r], 1 ) ) list[w++] = list[r];
        }
        list.resize( w );
        return MB_SUCCESS;
    }
template<class Container>
virtual ErrorCode SetIntersectIter< Container >::reset ( Interface *  mb) [inline, virtual]

Reimplemented from MBIter< Container >.

Definition at line 321 of file iMeshP_MOAB.cpp.

References MB_SUCCESS.

Referenced by iMeshP_initEntArrIter().


Member Data Documentation

template<class Container>
EntityHandle SetIntersectIter< Container >::otherSet [private]

Definition at line 291 of file iMeshP_MOAB.cpp.

List of all members.


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