说明:获得屏幕矩阵并设置WCS为屏幕方向(Z朝向自己,X轴朝右,Y轴超上)。
方法:
1 extern DllExport void ufusr(char *param, int *retcode, int rlen)
2 {
3 UF_initialize();
4
5 double v_mtx[9] = { 1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0};
6 uc6433("Trimetric", v_mtx);
7
8 tag_t tagMatrixId = NULL_TAG;
9 UF_CSYS_create_matrix(v_mtx, &tagMatrixId);
10
11 tag_t tagTempCSYS = NULL_TAG;
12 double douCsysOrigin[3] = { 0,0,0 };
13 UF_CSYS_create_temp_csys(douCsysOrigin, tagMatrixId, &tagTempCSYS);
14
15 UF_CSYS_set_wcs(tagTempCSYS);//移动WCS
16
17 UF_terminate();
18 }
19
20 extern int ufusr_ask_unload(void)
21 {
22 return (UF_UNLOAD_IMMEDIATELY);
23 }
效果: