Ovis_3D_Area_Point_Array_Get()
摘要
获取定义 3D 区域的点数组的副本。
语法
Ovis_3D_Area_Point_Array_Get (area_dec_ptr, num_points_ptr, point_array_ptr)
| 参数 | 类型 | 说明 |
|---|---|---|
area_dec_ptr |
OvisT_3D_Area * |
目标区域 |
num_points_ptr |
unsigned int * |
用于接收数组中点数量的内存 |
point_array_ptr |
OvisT_3D_Position ** |
用于接收定义该区域的点数组副本的内存 |
返回类型
OvisT_Compcode
若成功获取数组,返回 OvisC_Compcode_Success;否则返回 OvisC_Compcode_Failure。
头文件
ovis_decoration.h
详情
调用方在使用完数组副本后,应使用 prg_mem_free() 释放其占用的内存。
示例
OvisT_3D_Area * area;
OvisT_3D_Position * pt_array[16];
unsigned int num_points;
OvisT_Compcode status;
/* … area created at some point */
status = Ovis_3D_Area_Point_Array_Get (area, &num_points, &pt_array);
错误
- 装饰对象为 NIL。
- 点数量的返回地址为 NIL。
- 点数组的返回地址为 NIL。
- 装饰对象不是 3D 区域。
参考
- 使用函数
Ovis_3D_Area_Point_Array_Set()可定义区域的点。