Ovis_3D_Decoration_Offset_Set()
Abstract
Specifies the offset data of the object in the 3D view.
Syntax
Ovis_3D_Decoration_Offset_Set (dec_ptr, x_meters, y_meters, z_meters)
| Argument | Type | Description |
|---|---|---|
dec_ptr |
OvisT_3D_Decoration * |
Offset |
x_meters |
double |
Specifies the offset of X, in meters |
y_meters |
double |
Specifies the offset of Y, in meters |
z_meters |
double |
Specifies the offset of Z, in meters |
Return Type
OvisT_Compcode
OvisC_Compcode_Success if the provided object is a valid offset. All 3D decorations have an offset (0, 0, 0) by default. Otherwise, it returns OvisC_Compcode_Failure.
Header
ovis_decoration.h
Details
This function specifies, in meters, the offsets of the X, Y, and Z coordinates of the 3D decoration. The 3D offset is especially useful for 3D decorations attached to entities to avoid overlaps.
Example
OvisT_3D_Cylinder * sphere;
/* … sphere created at some point */
/* 3 meters off its current position along the X axis */
Ovis_3D_Decoration_Offset_Set (sphere, 3, 0, 0);
Errors
- Decoration is NIL.
- Decoration type does not support 3D offset.
Reference
- Use the function
Ovis_3D_Decoration_Offset_Get()to obtain the offset of the decoration.