Ovis_3D_Decoration_Offset_Set()
摘要
指定对象在 3D 视图中的偏移数据。
语法
Ovis_3D_Decoration_Offset_Set (dec_ptr, x_meters, y_meters, z_meters)
| 参数 | 类型 | 说明 |
|---|---|---|
dec_ptr |
OvisT_3D_Decoration * |
偏移 |
x_meters |
double |
指定 X 偏移,以米计 |
y_meters |
double |
指定 Y 偏移,以米计 |
z_meters |
double |
指定 Z 偏移,以米计 |
返回类型
OvisT_Compcode
若所提供的对象是有效的偏移,返回 OvisC_Compcode_Success;否则返回 OvisC_Compcode_Failure。所有 3D 装饰对象默认偏移为 (0, 0, 0)。
头文件
ovis_decoration.h
详情
该函数以米为单位指定 3D 装饰对象 X、Y、Z 坐标的偏移。3D 偏移对于附着于实体、用于避免重叠的 3D 装饰对象尤其有用。
示例
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);
错误
- 装饰对象为 NIL。
- 装饰对象类型不支持 3D 偏移。
参考
- 使用函数
Ovis_3D_Decoration_Offset_Get()可获取装饰对象的偏移。