Ovis_Decoration_3D_Cylinder_Create()
Abstract
Creates the 3D cylinder.
Syntax
Ovis_Decoration_3D_Cylinder_Create (from, to, radius, color, filled, layer_ptr, destroy_proc, user_state_ptr)
| Argument | Type | Description |
|---|---|---|
from |
OvisT_3D_Position |
Start of the cylinder |
to |
OvisT_3D_Position |
End of the cylinder |
radius |
double |
Radius of the cylinder in meters |
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_Cylinder *
The 3D cylinder
Header
ovis_decoration.h
Details
This function creates the Ovis 3D cylinder. It specifies the attributes of the cylinder. The cylinder has an initial transparency of 0, a solid pattern, and is not flashing.
Note that you cannot have both endpoints of a cylinder positioned as “relative-to-decorations”, even with two distinct decorations.
Example
OvisT_3D_Position from, to;
OvisT_3D_Cylinder * cyl;
PrgT_Color color = prg_color_from_string ("red");
Ovis_3D_Position_Geodetic_Set (&from, 0, 0, 100);
Ovis_3D_Position_Geodetic_Set (&to, 0, 0, 200);
cyl = Ovis_Decoration_3D_Cylinder_Create (from, to, 5, color, OvisC_True,
OPC_NIL, OPC_NIL, OPC_NIL);
Errors
- Invalid Radius value (
<value>). Radius value must be positive.
Reference
- Use the function
Ovis_3D_Cylinder_Endpoints_Set()to modify the endpoints of the cylinder. - Use the function
Ovis_Decoration_Color_Set()to modify the color of the cylinder. - Use the function
Ovis_Decoration_Transparency_Set()to modify the transparency of the cylinder. - Use the function
Ovis_Decoration_Flashing_Set()to modify the flashing status. - Use the function
Ovis_Shape_Pattern_Set()to modify the pattern used in the cylinder rendered area. - Use the function
Ovis_Polygon_Fill_Set()to modify the fill status. - Use the function
Ovis_3D_Polygon_Scale_Set()to modify the radius for spheres and ellipsoids. - Use the function
Ovis_3D_Polygon_Rotation_Set()to modify the orientation of the cylinder.