5 #error "MB_MeshSet.hpp isn't supposed to be included into an application"
81 return mFlags & MESHSET_ORDERED;
393 MeshSet::MeshSet() : mFlags( 0 ), mParentCount( ZERO ), mChildCount( ZERO ), mContentCount( ZERO ) {}
397 : mFlags( (unsigned char)flg ), mParentCount( ZERO ), mChildCount( ZERO ), mContentCount( ZERO )
417 mFlags = (
unsigned char)flg;
512 entities.resize( count + old_size );
513 std::copy( ptr, ptr + count,
entities.begin() + old_size );
517 assert( count % 2 == 0 );
518 for(
size_t i = 0; i < count; i += 2 )
534 assert( count % 2 == 0 );
536 for(
size_t i = 0; i < count; i += 2 )
537 in =
entities.insert( in, ptr[i], ptr[i + 1] );
553 std::remove_copy_if( ptr, ptr + count, std::back_inserter( entity_list ),
not_type_test( type ) );
557 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_HANDLE( type ) ) - ptr;
563 std::back_inserter( entity_list ) );
566 for( ; idx < count; idx += 2 )
569 std::copy(
hdl_iter( ptr[idx] ),
hdl_iter( ptr[idx + 1] + 1 ), std::back_inserter( entity_list ) );
574 std::back_inserter( entity_list ) );
598 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_HANDLE( type ) ) - ptr;
607 for( ; idx < count; idx += 2 )
610 in = entity_list.
insert( in, ptr[idx], ptr[idx + 1] );
637 result = std::count_if( ptr, ptr + count,
type_test( type ) );
639 std::count_if( ptr, ptr + count,
type_test( type ), result );
645 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_HANDLE( type ) ) - ptr;
653 for( ; idx < count; idx += 2 )
656 result += ptr[idx + 1] - ptr[idx] + 1;
676 std::remove_copy_if( ptr, ptr + count, std::back_inserter( entity_list ),
not_dim_test( dimension ) );
680 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_OF_DIM( dimension ) ) - ptr;
686 std::back_inserter( entity_list ) );
689 for( ; idx < count; idx += 2 )
692 std::copy(
hdl_iter( ptr[idx] ),
hdl_iter( ptr[idx + 1] + 1 ), std::back_inserter( entity_list ) );
697 std::back_inserter( entity_list ) );
717 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_OF_DIM( dimension ) ) - ptr;
726 for( ; idx < count; idx += 2 )
729 in = entity_list.
insert( in, ptr[idx], ptr[idx + 1] );
752 result = std::count_if( ptr, ptr + count,
dim_test( dimension ) );
754 std::count_if( ptr, ptr + count,
dim_test( dimension ), result );
760 size_t idx = std::lower_bound( ptr, ptr + count,
FIRST_OF_DIM( dimension ) ) - ptr;
768 for( ; idx < count; idx += 2 )
771 result += ptr[idx + 1] - ptr[idx] + 1;
796 for(
size_t idx = 0; idx < count; idx += 2 )
799 in = range.
insert( in, ptr[idx], ptr[idx + 1] );
817 size_t found_count = 0;
820 for(
int i = 0; i < num_ents; ++i )
821 if( std::find( ptr, end,
entities[i] ) < end ) ++found_count;
825 assert( 0 == count % 2 );
826 for(
int i = 0; i < num_ents; ++i )
828 const unsigned long idx = std::lower_bound( ptr, end,
entities[i] ) - ptr;
829 if( idx < count && ( idx % 2 != 0 || ptr[idx] ==
entities[i] ) ) ++found_count;
896 for( ; list < end; list += 2 )
897 result += list[1] - list[0] + 1;