简介:
NX二次开发 转置矩阵 UF_MTX3_transpose。
代码:
#include "me.hpp"
extern DllExport void ufusr(char* param, int* returnCode, int rlen)
{
UF_initialize();
double dMtx[9] = {
1.000000000, 0.000000000, 0.000000000,
0.000000000, 0.956304756, 0.292371705,
0.000000000, -0.292371705,0.956304756 };
double TransposeMtx[9] = { 0.0 };
UF_MTX3_transpose(dMtx, TransposeMtx);
for (int i = 0; i < 9; ++i)
{
print("%f", TransposeMtx[i]);
if ((i+1) % 3 == 0)
print("\n");
else
print(",");
}
UF_terminate();
}
extern int ufusr_ask_unload(void)
{
return (UF_UNLOAD_IMMEDIATELY);
}
效果:
me.hpp 内容
标签:0.000000000,TransposeMtx,转置,print,transpose,int,MTX3,二次开发,UF From: https://blog.51cto.com/wangpaifeixingy/8596278