Ovis_Entity_Animation_Set()
Abstract
Sets the Ovis entity animation and enables it.
Syntax
Ovis_Entity_Animation_Set (ent_ptr, name, aggregation_mode, type, force, dead_reckoning)
| Argument | Type | Description |
|---|---|---|
ent_ptr |
OvisT_Entity * |
Specifies the entity |
name |
const char * |
specifies name (can be NIL) |
aggregation_mode |
OvisT_Aggregation_Mode |
Specifies aggregation mode |
type |
OvisT_DIS_Type |
Specifies DIS type |
force |
OvisT_DIS_Force |
Specifies DIS force |
dead_reckoning |
OvisT_DIS_Dead_Reckoning |
Specifies DIS dead reckoning |
Return Type
OvisT_Compcode
OvisC_Compcode_Success if the representation could be updated; OvisC_Compcode_Failure otherwise.
Header
ovis_entity.h
Details
This function sets the Ovis entity animation.
An entity created as a result of discovering an RTI object created by another federate cannot have its animation changed; this function will return OvisC_Compcode_Failure if such an entity is specified.
Example
OvisT_Entity * ent_ptr;
/* Associate the entity with a node instance and show it as a friendly Super Cobra */
OvisT_DIS_Type dis = { 1, 2, 225, 20, 2, 10, 0 };
ent_ptr = Ovis_Entity_From_Objid_Create (op_topo_parent (op_id_sefl ()), 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
- Entity is NIL.
Reference
- Use the function Ovis_Entity_Animation_Get() to obtain how the entity appears in 3D Network Visualizer.