Ovis_3D_Polygon_Scale_Get()
Abstract
Returns the scale of a 3D polygon.
Syntax
Ovis_3D_Polygon_Scale_Get (poly_ptr, x_scale_ptr, y_scale_ptr, z_scale_ptr)
| Argument | Type | Description |
|---|---|---|
poly_ptr |
OvisT_Polygon * |
Polygon scale |
x_scale_ptr |
double * |
X scale of the polygon |
y_scale_ptr |
double * |
Y scale of the polygon |
z_scale_ptr |
double * |
Z scale of the polygon |
Return Type
OvisT_Compcode
OvisC_Compcode_Success if the provided object is a valid polygon. Otherwise, it returns OvisC_Compcode_Failure.
Header
ovis_decoration.h
Details
This function returns the x_scale, y_scale, and z_scale values of the 3D polygon. The polygon can be a sphere, cube, or cylinder. A cube with scale factors of 1.0 represents 1 cubic meter, with each edge 1 meter (or, if you prefer, a cube with a "radius" of 0.5 meter). A sphere with scale factors of 1.0 has a diameter of 1meter.
In the case of a cylinder, only the y_scale and z_scale values are meaningful.
Example
OvisT_3D_Cube * cube;
double x_scale, y_scale, z_scale;
/* … cube created previously */
Ovis_3D_Polygon_Scale_Get (cube, &x_scale, &y_scale, &zscale);
Errors
- Decoration is not a 3D sphere, cube, or cylinder.
- Decoration is NIL.
- Return address for X scale value is NIL.
- Return address for Y scale value is NIL.
- Return address for Z scale value is NIL.
Reference
- Use the function
Ovis_3D_Polygon_Scale_Set()to modify the radius for spheres, cubes, or cylinders.