Ovis_Entity_Parent_Group_Nth()
Abstract
Returns the nth parent group of an Ovis entity.
Syntax
Ovis_Entity_Parent_Group_Nth (ent_ptr, parent_index)
| Argument | Type | Description |
|---|---|---|
ent_ptr |
OvisT_Entity * |
Ovis entity |
parent_index |
unsigned int |
Index of parent to get |
Return Type
OvisT_Group *
Pointer to nth parent group
Header
ovis_entity.h
Details
This function returns the nth parent group of an Ovis entity.
Example
OvisT_Group * group_ptr;
unsigned int count, i;
OvisT_Entity * ent_ptr;
/* …groups created elsewhere */
count = Ovis_Entity_Parent_Group_Count (ent_ptr);
for (i = 0; i < count; i++)
{
group_ptr = Ovis_Entity_Parent_Group_Nth (ent_ptr, i);
/* … do something with group */
}
Errors
- Entity is NIL.
Reference
- Use the function
Ovis_Entity_Parent_Group_Count()to get the number of parent groups of an entity.