Ovis_Decoration_3D_Area_Create()

Abstract

Creates a 3D area.

Syntax

Ovis_Decoration_3D_Area_Create (num_points, point_array, color, filled, layer_ptr, destroy_proc, user_state_ptr)
Argument Type Description
num_points unsigned int Number of points that define the area
point_array OvisT_3D_Position * Array of points that define the area
color PrgT_Color Color with which to draw the area
filled OvisT_Boolean OvisC_True if the area should be filled; OvisC_False otherwise
layer_ptr OvisT_Layer * Ovis layer in which to place the area
destroy_proc OvisT_Decoration_State_Destroy_Proc Procedure to be called to destroy the data associated with the object and deallocate its memory
user_state_ptr void * Optional user-provided state of the decoration

Return Type

OvisT_3D_Area *

The 3D area

ovis_decoration.h

Details

This function creates an Ovis 3D area. A 3D Area is a convex polygon defined by up to 16 points representing the vertices of the polygon. The points that define the area must be in either the geodetic or geocentric coordinate system and must be defined in point_array sequentially as they occur around the perimeter of the area. Initially, the area has a solid fill pattern, a transparency of 0, no texture, and is not flashing.

Example

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);

Errors

  • Area must have some points defined.
  • Area can only have up to 16 points defined.
  • Area's point #<index> must be a geocentric or geodetic position.

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