Ovis_3D_Position_Decoration_Set()

Abstract

Defines a position based on a decoration.

Syntax

Ovis_3D_Position_Decoration_Set (pos_ptr, deco_ptr, ratio)
Argument Type Description
pos_ptr OvisT_3D_Position * Pointer to the position
deco_ptr OvisT_3D_Decoration * Pointer to the decoration
ratio unsigned char Ratio

Return Type

OvisT_Compcode

OvisC_Compcode_Success if the position could be set. Otherwise, it returns OvisC_Compcode_Failure.

ovis_decoration.h

Details

This function defines a position based on the specified decoration. For "single" location decorations (such as a sphere, cube, or text), the position corresponds to the location of the decoration. For "dual" location decorations (such as a line or cylinder), the position is defined using the "ratio" argument. A ratio of 0 is the "head" of the decoration, whereas a ratio of 100 is the "tail." Values between 0 and 100 define a corresponding location between head and tail. The position is updated as the associated decoration changes location over time.

Example

OvisT_3D_Position               pos;
OvisT_3D_Line                   * line;

/* … line created at some point */

/* Position is a quarter down the line */
Ovis_3D_Position_Decoration_Set (&pos, line, 25);

Errors

  • Position argument is NIL.
  • Decoration is NIL.
  • Invalid ratio value (<value>). Valid values are between 0 and 100.

Reference

  • Use the function Ovis_Entity_Position_Get() to set a 3D position to the current position of an entity, but without having the position value updated when the entity moves.

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