Ovis_Decoration_3D_Area_Create()

摘要

创建 3D 区域。

语法

Ovis_Decoration_3D_Area_Create (num_points, point_array, color, filled, layer_ptr, destroy_proc, user_state_ptr)
参数 类型 说明
num_points unsigned int 定义区域的点数
point_array OvisT_3D_Position * 定义区域的点数组
color PrgT_Color 绘制区域所使用的颜色
filled OvisT_Boolean 若区域应被填充则为 OvisC_True,否则为 OvisC_False
layer_ptr OvisT_Layer * 放置该区域的 Ovis 图层
destroy_proc OvisT_Decoration_State_Destroy_Proc 销毁与该对象关联的数据并释放其内存时所调用的过程
user_state_ptr void * 可选的用户提供的装饰状态

返回类型

OvisT_3D_Area *

该 3D 区域

头文件

ovis_decoration.h

详情

该函数创建 Ovis 3D 区域。3D 区域是由最多 16 个点定义的凸多边形,这些点代表多边形的顶点。定义区域的点必须采用大地(geodetic)或地心(geocentric)坐标系,并且必须按其在区域周边上出现的顺序依次在 point_array 中定义。初始时,区域具有实心填充图案、透明度 0、无纹理,且不闪烁。

示例

unsigned int          num_points = 6;
OvisT_3D_Position   * pt_array[num_points];
OvisT_3D_Area      * area;
PrgT_Color           color = prg_color_from_string ("blue");

/* Define an elongated hexagon centered on HQ */
Ovis_3D_Position_Geodetic_Set (&pt_array[0], 38.99042, -77.10058, 123);
Ovis_3D_Position_Geodetic_Set (&pt_array[1], 38.99042, -77.09058, 123);
Ovis_3D_Position_Geodetic_Set (&pt_array[2], 38.98176, -77.08558, 123);
Ovis_3D_Position_Geodetic_Set (&pt_array[3], 38.97310, -77.09058, 123);
Ovis_3D_Position_Geodetic_Set (&pt_array[4], 38.97310, -77.10058, 123);
Ovis_3D_Position_Geodetic_Set (&pt_array[5], 38.98176, -77.10558, 123);

area = Ovis_Decoration_3D_Area_Create (num_points, pt_array, color, OvisC_True,
	OPC_NIL, OPC_NIL, OPC_NIL);

错误

  • 区域必须定义若干点。
  • 区域最多只能定义 16 个点。
  • 区域的第 #<index> 个点必须是地心或大地位置。

参考

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com