Ovis_Decoration_3D_Cube_Create()
Abstract
Creates the 3D cube.
Syntax
Ovis_Decoration_3D_Cube_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 cube |
x_scale |
double |
X scale of the cube |
y_scale |
double |
Y scale of the cube |
z_scale |
double |
Z scale of the cube |
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_Cube *
The 3D cube
Header
ovis_decoration.h
Details
This function creates the Ovis 3D cube. It specifies the attributes of the cube. The cube 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 cube 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 long (or, if you prefer, a cube with a "radius" of 0.5 meter).
A 0 scale factor is allowed. With one scale factor set to 0, you get a very thin rectangle that is invisible if the viewpoint is in the plane defined by the other two radii.
Example
OvisT_3D_Position pos;
OvisT_3D_Cube * cube;
PrgT_Color color = prg_color_from_string ("red");
Ovis_3D_Position_Geodetic_Set (&pos, 0, 0, 100);
cube = Ovis_Decoration_3D_Cube_Create (pos, 5, 5, 10, color, OvisC_True,
OPC_NIL, OPC_NIL, OPC_NIL);
Errors
- Invalid X-radius value (<value>). Radius value must be positive.
- Invalid Y-radius value (<value>). Radius value must be positive.
- Invalid Z-radius value (<value>). Radius value must be positive.
Reference
- Use the function
Ovis_3D_Cube_Center_Set()to modify the center of the cube. - Use the function
Ovis_Decoration_Color_Set()to modify the color of the cube. - Use the function
Ovis_Decoration_Transparency_Set()to modify the transparency of the cube. - 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 cube 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 cubes and bricks. - Use the function
Ovis_3D_Polygon_Rotation_Set()to modify the orientation of the cube.