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
Header
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
- Use the function
Ovis_3D_Area_Point_Array_Set()to modify the array of points that define the area. - Use the function
Ovis_3D_Area_Point_Nth_Set()to modify a single point in the array that defines the area. - Use the function
Ovis_Decoration_Color_Set()to modify the color of the cube. - Use the function
Ovis_Polygon_Fill_Set()to modify the fill status of the area. - Use the function
Ovis_Decoration_Transparency_Set()to modify the transparency of the fill. - Use the function
Ovis_Shape_Pattern_Set()to modify the pattern used to fill the area. - Use the function
Ovis_Decoration_Flashing_Set()to modify the flashing status. - Use the function
Ovis_3D_Area_Texture_Set()to set a texture that is mapped onto the area.