Ovis_3D_Polygon_Scale_Set()

Abstract

Specifies the scale of a 3D polygon.

Syntax

Ovis_3D_Polygon_Scale_Set (poly_ptr, x_scale, y_scale, z_scale)
Argument Type Description
poly_ptr OvisT_Polygon * Polygon scale
x_scale double X scale of the polygon
y_scale double Y scale of the polygon
z_scale double Z scale of the polygon

Return Type

OvisT_Compcode

OvisC_Compcode_Success if the provided object is a valid polygon. Otherwise, it returns OvisC_Compcode_Failure.

ovis_decoration.h

Details

This function specifies the x_scale, y_scale, and z_scale of the 3D polygon. The polygon can be a sphere, cube, or cylinder.

The x_scale, y_scale, and z_scale factors are used to stretch or shrink a unit cube or sphere along the X, Y, and Z axes of the earth's geocentric coordinate system. A cube with scale factors of 1.0 represents 1 cubic meter, with each edge 1 meter (or, if you prefer, a cube with a "radius" of 0.5 meter). A sphere with scale factors of 1.0 has a diameter of 1meter.

In the case of cylinders, the x_scale factor is ignored, while the y_scale and z_scale factors are applied using the local coordinate system of the cylinder. The X axis is the cylinder's axis, the Y axis is to the right, and the Z axis is down towards the center of the earth.

A 0 scale factor is allowed. With one scale factor set to 0, you get a very thin rectangle or disk that is invisible if the viewpoint is in the plane defined by the other two radii.

Note that the pattern is not affected by the scaling. The pattern is always applied over 32 bits vertically after the scaling has been applied.

Note also that scaling takes place before rotation.

Example

OvisT_3D_Sphere                   * sphere;

/* … sphere created previously */

/* Making a disk with 0 thickness along the Z axis */
Ovis_3D_Polygon_Scale_Set (sphere, 2.0, 5.5, 0.0);

Errors

  • Decoration is not a 3D sphere, cube, or cylinder.
  • Decoration is NIL.
  • Invalid X-scale value (<value>). Scale value must be positive.
  • Invalid Y-scale value (<value>). Scale value must be positive.
  • Invalid Z-scale value (<value>). Scale value must be positive.

Reference

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