Ovis_2D_Triangle_Corners_Set()

摘要

设置 2D 三角形的顶点位置。

语法

Ovis_2D_Triangle_Corners_Set (triangle_dec_ptr, a, b, c)
参数 类型 说明
triangle_dec_ptr OvisT_2D_Triangle * 三角形
a OvisT_2D_Corner 指定顶点 a
b OvisT_2D_Corner 指定顶点 b
c OvisT_2D_Corner 指定顶点 c

返回类型

OvisT_Compcode

若提供的对象是有效的 2D 三角形,返回 OvisC_Compcode_Success;否则返回 OvisC_Compcode_Failure。

头文件

ovis_decoration.h

详情

该函数设置 2D 三角形的顶点位置。顶点以三角形"中心"位置为基准定义,取值介于 -1 与 1 之间。当中心位于窗口中央时,顶点 1,1 将处于窗口的右上角。

示例

OvisT_2D_Corner				  a, b, c;
OvisT_2D_Triangle					* triangle;

/* … .triangle created at some point */

/* One corner on the "center", the other two a bit below and to the left and right of the center */
a.x_offset = a.y_offset = 0;
b.x_offset = -0.1b.y_offset = -0.1;
c.x_offset = +0.1; c.y_offset = -0.1;
Ovis_2D_Triangle_Corners_Set (triangle, a, b, c);

错误

  • 装饰对象不是 2D 三角形。
  • 装饰对象为 NIL。

参考

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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