Ovis_Entity_Animation_Enable()
摘要
开始在 3D Network Visualizer 中显示该实体。
语法
Ovis_Entity_Animation_Enable (ent_ptr)
| 参数 | 类型 | 说明 |
|---|---|---|
ent_ptr |
OvisT_Entity * |
实体 |
返回类型
OvisT_Compcode
若实体有效则返回 OvisC_Compcode_Success,否则返回 OvisC_Compcode_Failure。
头文件
ovis_entity.h
详情
该函数根据名称、聚合模式、实体类型、部队 ID(force ID)和航位推算(dead reckoning)信息,在场景中添加合适的 3D 对象。
注意: 该函数对因发现其他联邦成员(federate)创建的 RTI 对象而生成的实体没有影响。
示例
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);
错误
- 实体为 NIL。
参考
- 使用函数 Ovis_Entity_Animation_Disable() 可以停止在 3D Network Visualizer 中显示该实体。