Ovis_Decoration_3D_Sphere_Create()

Abstract

Creates a 3D sphere.

Syntax

Ovis_Decoration_3D_Sphere_Create (center, x_scale, y_scale, z_scale, color, filled, layer_ptr, destroy_proc, user_state_ptr)
Argument Type Description
center OvisT_3D_Position Center of the sphere
x_scale double X scale of the sphere
y_scale double Y scale of the sphere
z_scale double Z scale of the sphere
color PrgT_Color Color
filled OvisT_Boolean Indicates fill
layer_ptr OvisT_Layer * Ovis layer
destroy_proc OvisT_Decoration_State_Destroy_Proc Destroys the data associated with the object and deallocates its memory
user_state_ptr void * Optional user-provided state of the decoration

Return Type

OvisT_3D_Sphere *

The 3D sphere

ovis_decoration.h

Details

This function creates an Ovis 3D sphere. It specifies the attributes of the sphere. The sphere has an initial transparency of 0, a solid pattern, and is not flashing.

The x_scale, y_scale, and z_scale factors are used to stretch or shrink a unit sphere along the X, Y, and Z axes of the earth’s geocentric coordinate system. A sphere with scale factors of 1.0 represents a sphere with a diameter of 1 meter.

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

Example

OvisT_3D_Position					  pos;
OvisT_3D_Sphere 					* sphere;
PrgT_Color					  color = prg_color_from_string ("red");

Ovis_3D_Position_Geodetic_Set (&pos, 0, 0, 100);
sphere = Ovis_Decoration_3D_Sphere_Create (pos, 5, 5, 10, color, OvisC_True,
	OPC_NIL, OPC_NIL, OPC_NIL);

Errors

  • 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