moab
|
Functions | |
void | iMesh_initEntArrIter (iMesh_Instance instance, const iBase_EntitySetHandle entity_set_handle, const int requested_entity_type, const int requested_entity_topology, const int requested_array_size, const int resilient, iBase_EntityArrIterator *entArr_iterator, int *err) |
Initialize an array iterator over specified entity type, topology, and size. | |
void | iMesh_getNextEntArrIter (iMesh_Instance instance, iBase_EntityArrIterator entArr_iterator, iBase_EntityHandle **entity_handles, int *entity_handles_allocated, int *entity_handles_size, int *has_data, int *err) |
Get entities contained in array iterator and increment iterator. | |
void | iMesh_resetEntArrIter (iMesh_Instance instance, iBase_EntityArrIterator entArr_iterator, int *err) |
Reset the array iterator. | |
void | iMesh_endEntArrIter (iMesh_Instance instance, iBase_EntityArrIterator entArr_iterator, int *err) |
Destroy the specified array iterator. | |
void | iMesh_initEntIter (iMesh_Instance instance, const iBase_EntitySetHandle entity_set_handle, const int requested_entity_type, const int requested_entity_topology, const int resilient, iBase_EntityIterator *entity_iterator, int *err) |
Initialize an iterator over specified entity type, topology, and size. | |
void | iMesh_getNextEntIter (iMesh_Instance instance, iBase_EntityIterator entity_iterator, iBase_EntityHandle *entity_handle, int *has_data, int *err) |
Get entity corresponding to an iterator and increment iterator. | |
void | iMesh_resetEntIter (iMesh_Instance instance, iBase_EntityIterator entity_iterator, int *err) |
Reset the iterator. | |
void | iMesh_endEntIter (iMesh_Instance instance, iBase_EntityIterator entity_iterator, int *err) |
Destroy the specified iterator. | |
void | iMesh_stepEntIter (iMesh_Instance instance, iBase_EntityIterator ent_iterator, int step_length, int *at_end, int *err) |
Step the iterator a specified number of entities. | |
void | iMesh_initEntArrIterRec (iMesh_Instance instance, const iBase_EntitySetHandle entity_set_handle, const int requested_entity_type, const int requested_entity_topology, const int requested_array_size, const int resilient, const int recursive, iBase_EntityArrIterator *entArr_iterator, int *err) |
Initialize an array iterator over specified entity type, topology, and size, with an optional recursive flag. |
void iMesh_endEntArrIter | ( | iMesh_Instance | instance, |
iBase_EntityArrIterator | entArr_iterator, | ||
int * | err | ||
) |
Destroy the specified array iterator.
[in] | instance | iMesh instance handle |
[in] | entArr_iterator | Iterator which gets destroyed |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 574 of file iMesh_MOAB.cpp.
{ delete entArr_iterator; RETURN(iBase_SUCCESS); }
void iMesh_endEntIter | ( | iMesh_Instance | instance, |
iBase_EntityIterator | entity_iterator, | ||
int * | err | ||
) |
Destroy the specified iterator.
Destroy the specified iterator
[in] | instance | iMesh instance handle |
[in] | entity_iterator | Iterator which gets destroyed |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 2309 of file iMesh_MOAB.cpp.
{ iMesh_endEntArrIter(instance, reinterpret_cast<iBase_EntityArrIterator>(entity_iterator), err); }
void iMesh_getNextEntArrIter | ( | iMesh_Instance | instance, |
iBase_EntityArrIterator | entArr_iterator, | ||
iBase_EntityHandle ** | entity_handles, | ||
int * | entity_handles_allocated, | ||
int * | entity_handles_size, | ||
int * | has_data, | ||
int * | err | ||
) |
Get entities contained in array iterator and increment iterator.
Get the entities corresponding to an array iterator (e.g. dereference the array iterator), and increment the iterator. The dereferenced value(s) are returned in entity_handles. If the iterator is at the end of the iteration, the dereferenced value(s) are undefined and has_data will be returned with a value of zero. Otherwise, has_data will be returned with a non-zero value.
Method: getEntArrNextIter[]
[in] | instance | iMesh instance handle |
[in] | entArr_iterator | Iterator being queried |
[in,out] | entity_handles | Pointer to array of entity handles contained in current value of iterator Array pointer, allocated and occupied sizes argument trio) |
[in,out] | entity_handles_allocated | Pointer to allocated size of entity_handles |
[out] | entity_handles_size | Pointer to occupied size of entity_handles |
[out] | has_data | Pointer to a flag indicating if the value(s) returned in entity_handles are valid. A non-zero value indicates the value(s) are valid. A zero value indicates the value(s) are NOT valid. |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 548 of file iMesh_MOAB.cpp.
{ // check the size of the destination array ALLOC_CHECK_ARRAY_NOFAIL(entity_handles, entArr_iterator->array_size()); entArr_iterator->get_entities( dynamic_cast<Core*>(MOABI), (EntityHandle*)*entity_handles, *entity_handles_size ); *has_data = (*entity_handles_size != 0); RETURN(iBase_SUCCESS); }
void iMesh_getNextEntIter | ( | iMesh_Instance | instance, |
iBase_EntityIterator | entity_iterator, | ||
iBase_EntityHandle * | entity_handle, | ||
int * | has_data, | ||
int * | err | ||
) |
Get entity corresponding to an iterator and increment iterator.
Get the entity corresponding to an iterator (that is, dereference the iterator), and increment the iterator. The dereferenced value is returned in 'entity_handle'. If the iterator is at the end of the iteration, the dereferenced value will be undefined and 'has_data' will have a value of zero. Otherwise, 'has_data' will have a non-zero value.
[in] | instance | iMesh instance handle |
[in] | entity_iterator | Iterator being queried |
[out] | entity_handle | Pointer to an entity handle corresponding to the current value of iterator just prior to the call. |
[out] | has_data | Pointer to a flag indicating if the value returned in entity_handle is valid. A non-zero value indicates the value is valid. A zero value indicates the value is NOT valid. |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 2289 of file iMesh_MOAB.cpp.
{ int eh_size = 1; iMesh_getNextEntArrIter(instance, reinterpret_cast<iBase_EntityArrIterator>(entity_iterator), &entity_handle, &eh_size, &eh_size, is_end, err); }
void iMesh_initEntArrIter | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | entity_set_handle, | ||
const int | requested_entity_type, | ||
const int | requested_entity_topology, | ||
const int | requested_array_size, | ||
const int | resilient, | ||
iBase_EntityArrIterator * | entArr_iterator, | ||
int * | err | ||
) |
Initialize an array iterator over specified entity type, topology, and size.
Initialize an array iterator over specified entity type, topology, and size, for a specified set or instance. Iterator returned can be used as input to functions returning entities for the iterator. If all entities of a specified type and/or topology are to be iterated, specify iBase_ALL_TYPES or iMesh_ALL_TOPOLOGIES, respectively. Specified type or topology must be a value in the iBase_EntityType or iMesh_EntityTopology enumerations, respectively.
Method: initEntArrIter[]
[in] | instance | iMesh instance handle |
[in] | entity_set_handle | Entity set being iterated |
[in] | requested_entity_type | Type of entity to iterate |
[in] | requested_entity_topology | Topology of entity to iterate |
[in] | requested_array_size | Size of chunks of handles returned for each value of the iterator |
[in] | resilient | If zero, return a non-resilient iterator. Otherwise, a resilient iterator (Resilient and Non-Resilient Iterators) |
[out] | entArr_iterator | Pointer to iterator returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 531 of file iMesh_MOAB.cpp.
{ iMesh_initEntArrIterRec(instance, entity_set_handle, requested_entity_type, requested_entity_topology, requested_array_size, resilient, false, entArr_iterator, err); }
void iMesh_initEntArrIterRec | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | entity_set_handle, | ||
const int | requested_entity_type, | ||
const int | requested_entity_topology, | ||
const int | requested_array_size, | ||
const int | resilient, | ||
const int | recursive, | ||
iBase_EntityArrIterator * | entArr_iterator, | ||
int * | err | ||
) |
Initialize an array iterator over specified entity type, topology, and size, with an optional recursive flag.
Initialize an array iterator over specified entity type, topology, and size, for a specified set or instance. Iterator returned can be used as input to functions returning entities for the iterator. If all entities of a specified type and/or topology are to be iterated, specify iBase_ALL_TYPES or iMesh_ALL_TOPOLOGIES, respectively. Specified type or topology must be a value in the iBase_EntityType or iMesh_EntityTopology enumerations, respectively. If recursive is true, entities are retrieved recursively through contained (but not child) sets.
Method: initEntArrIter[]
[in] | instance | iMesh instance handle |
[in] | entity_set_handle | Entity set being iterated |
[in] | requested_entity_type | Type of entity to iterate |
[in] | requested_entity_topology | Topology of entity to iterate |
[in] | requested_array_size | Size of chunks of handles returned for each value of the iterator |
[in] | resilient | If zero, return a non-resilient iterator. Otherwise, a resilient iterator (Resilient and Non-Resilient Iterators) |
[in] | recursive | If non-zero, entities retrieved recursively |
[out] | entArr_iterator | Pointer to iterator returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 3039 of file iMesh_MOAB.cpp.
{ CHKENUM(requested_entity_type, iBase_EntityType, iBase_INVALID_ENTITY_TYPE); CHKENUM(requested_entity_topology, iMesh_EntityTopology, iBase_INVALID_ENTITY_TOPOLOGY); if (resilient) ERROR(iBase_NOT_SUPPORTED, "reslient iterators not supported"); EntityType req_type = mb_topology_table[requested_entity_topology]; if (requested_entity_topology != iMesh_ALL_TOPOLOGIES) { if (requested_entity_type != iBase_ALL_TYPES) { if (requested_entity_topology != iMesh_SEPTAHEDRON && requested_entity_type != CN::Dimension(req_type)) ERROR(iBase_BAD_TYPE_AND_TOPO, "type and topology are inconsistant"); // Special-case handling for septahedra since we don't support them else if (requested_entity_topology == iMesh_SEPTAHEDRON && requested_entity_type != iBase_REGION) ERROR(iBase_BAD_TYPE_AND_TOPO, "type and topology are inconsistant"); } } ErrorCode result; unsigned flags; result = MOABI->get_meshset_options( ENTITY_HANDLE(entity_set_handle), flags ); CHKERR(result,"Invalid entity set handle"); if (flags & MESHSET_ORDERED) *entArr_iterator = new MBListIter( (iBase_EntityType)requested_entity_type, (iMesh_EntityTopology)requested_entity_topology, ENTITY_HANDLE(entity_set_handle), requested_array_size, recursive ); else *entArr_iterator = new MBRangeIter( (iBase_EntityType)requested_entity_type, (iMesh_EntityTopology)requested_entity_topology, ENTITY_HANDLE(entity_set_handle), requested_array_size, recursive ); result = (*entArr_iterator)->reset( MOABI ); if (MB_SUCCESS != result) delete *entArr_iterator; CHKERR(result, "iMesh_initEntArrIter: ERROR getting entities of proper type or topology." ); RETURN(iBase_SUCCESS); }
void iMesh_initEntIter | ( | iMesh_Instance | instance, |
const iBase_EntitySetHandle | entity_set_handle, | ||
const int | requested_entity_type, | ||
const int | requested_entity_topology, | ||
const int | resilient, | ||
iBase_EntityIterator * | entity_iterator, | ||
int * | err | ||
) |
Initialize an iterator over specified entity type, topology, and size.
Initialize an iterator over specified entity type, topology, and size, for a specified set or instance. Iterator returned can be used as input to functions returning the entity for the iterator. If all entities of a specified type and/or topology are to be iterated, specify iBase_ALL_TYPES or iMesh_ALL_TOPOLOGIES, respectively. Specified type or topology must be a value in the iBase_EntityType or iMesh_EntityTopology enumerations, respectively.
Note: This function will fail and return an error if the caller passes a combination of entity_type and entity_topology that are not consistent.
[in] | instance | iMesh instance handle |
[in] | entity_set_handle | Entity set being iterated |
[in] | requested_entity_type | Type of entity to iterate |
[in] | requested_entity_topology | Topology of entity to iterate |
[in] | resilient | If zero, return a non-resilient iterator. Otherwise, a resilient iterator (Resilient and Non-Resilient Iterators) |
[out] | entity_iterator | Pointer to iterator returned from function |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 2275 of file iMesh_MOAB.cpp.
{ iMesh_initEntArrIterRec(instance, entity_set_handle, requested_entity_type, requested_entity_topology, 1, resilient, false, reinterpret_cast<iBase_EntityArrIterator*>(entity_iterator), err); }
void iMesh_resetEntArrIter | ( | iMesh_Instance | instance, |
iBase_EntityArrIterator | entArr_iterator, | ||
int * | err | ||
) |
Reset the array iterator.
Method: resetEntArrIter[]
[in] | instance | iMesh instance handle |
[in] | entArr_iterator | Iterator to reset |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 566 of file iMesh_MOAB.cpp.
void iMesh_resetEntIter | ( | iMesh_Instance | instance, |
iBase_EntityIterator | entity_iterator, | ||
int * | err | ||
) |
Reset the iterator.
Reset the iterator
[in] | instance | iMesh instance handle |
[in] | entity_iterator | Iterator to reset |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 2301 of file iMesh_MOAB.cpp.
{ iMesh_resetEntArrIter(instance, reinterpret_cast<iBase_EntityArrIterator>(entity_iterator), err); }
void iMesh_stepEntIter | ( | iMesh_Instance | instance, |
iBase_EntityIterator | ent_iterator, | ||
int | step_length, | ||
int * | at_end, | ||
int * | err | ||
) |
Step the iterator a specified number of entities.
Step the iterator a specified number of entities. If this number is greater than the number of entities left in the iterator, the iterator is placed at the end and at_end is returned non-zero; otherwise at_end is returned zero.
[in] | instance | iMesh instance handle |
[in] | ent_iterator | Iterator being queried |
[in] | step_length | Number of entities to step the iterator |
[out] | at_end | Non-zero if iterator is at the end of the iteration |
[out] | err | Returned Error status (see iBase_ErrorType) |
Definition at line 2999 of file iMesh_MOAB.cpp.
{ iMesh_stepEntArrIter(instance, reinterpret_cast<iBase_EntityArrIterator>(ent_iterator), step_length, at_end, err); }