Ovis_Group_Child_Entity_Nth()
Abstract
Returns the n-th child entity from a group.
Syntax
Ovis_Group_Child_Entity_Nth (group_ptr, index)
| Argument | Type | Description |
|---|---|---|
group_ptr |
OvisT_Group * |
Group of interest |
index |
unsigned int |
Index of child entity to get |
Return Type
OvisT_Entity *
Entity, if index is within the count of children; OPC_NIL otherwise.
Header
ovis_entity.h
Details
This function returns the n-th child entity associated with a group.
Example
OvisT_Group * group_ptr;
unsigned int count, i;
OvisT_Entity * ent_ptr;
/* …group created elsewhere */
count = Ovis_Group_Child_Entity_Count (group_ptr);
for (i = 0; i < count; i++)
{
ent_ptr = Ovis_Group_Child_Entity_Nth (group_ptr, i);
/* … do something with entity */
}
Errors
- Group is NIL.
Reference
- Use the function Ovis_Entity_Parent_Group_Nth() to get the
nth parent group of an entity. - Use the function Ovis_Group_Child_Entity_Count() to retrieve the number of child entities of a group.