Ovis_Decoration_Info_Group_Vector_Element_Value_Set()
摘要
指定 Ovis 组的向量元素。
语法
Ovis_Decoration_Info_Group_Vector_Element_Value_Set (group_ptr, element_name, x, y)
| 参数 | 类型 | 说明 |
|---|---|---|
group_ptr |
OvisT_Info_Group * |
组 |
element_name |
const char * |
元素名称 |
x |
double |
向量的 X 值 |
y |
double |
向量的 Y 值 |
返回类型
OvisT_Compcode
若值能够被赋值,则为 OvisC_Compcode_Success;否则为 OvisC_Compcode_Failure。
头文件
ovis_decoration.h
详情
此函数指定 Ovis 组的向量元素。使用 Ovis_Decoration_Info_Template_Graph_Element_Add() 向组模板添加向量元素。
示例
#define BUSY_FIELD "busy"
OvisT_Info_Template * template;
OvisT_Info_Group * info;
OvisT_3D_Position pos;
template = Ovis_Decoration_Info_Template_Create ("Interference");
Ovis_Decoration_Info_Template_Graph_Element_Add (template, BUSY_FIELD);
Ovis_Position_Geodetic_Set (&pos, 0, 0, 100);
info = Ovis_Decoration_Info_Group_Create (template, pos,
prg_color_from_string ("blue"), OPC_NIL, OPC_NIL, OPC_NIL);
Ovis_Decoration_Info_Group_Vector_Element_Value_Set (info, BUSY_FIELD, 0, 1);
错误
- 装饰物为 NIL。
- 未提供元素名称。
- 元素 "<name>" 不属于该信息组。
参考
- 使用函数
Ovis_Decoration_Info_Template_Graph_Element_Add()设置模板的向量分量。