Ovis_Entity_Create()
Abstract
Creates an Ovis entity.
Syntax
Ovis_Entity_Create (hname, callback, state_ptr)
| Argument | Type | Description |
|---|---|---|
hname |
const char * |
Hierarchical name of the site to associate with the entity |
callback |
OvisT_Entity_State_Destroy_Proc | Callback function that will destroy the entity’s state when the entity is destroyed |
state_ptr |
void * |
Optional user-provided state |
Return Type
OvisT_Entity *
Returns the entity, or OVISC_NIL if the function failed to return an entity.
Header
ovis_entity.h
Details
This function creates the Ovis entity.
Example
OvisT_Entity * ent_ptr;
OvisT_DIS_Type dis [] { 1, 2, 225, 20, 2, 10, -1 };
ent_ptr = Ovis_Entity_Create ("top.subnet.chopper", OPC_NIL, OPC_NIL);
Ovis_Entity_Animation_Set (ent_ptr, OPC_NIL,
OvisC_Aggregation_Entity, dis, OvisC_DIS_Force_Friendly,
OvisC_DIS_DR_Static);
Ovis_Entity_Animation_Enable (ent_ptr);
Errors
- Invalid hierarchical name argument provided.
Reference
- Use the function Ovis_Entity_Animation_Set() to specify how the entity should appear in 3D Network Visualizer.
- Use the function Ovis_Entity_Animation_Enable() to show the entity in 3D Network Visualizer.