27 auto path = this->varOutputPath()->getValue();
30 std::fstream
output(filename.c_str(), std::ios::out);
33 int pNum = this->inTransform()->size();
42 tm.assign(this->inTransform()->getData());
44 for (
int i = 0; i < pNum; i++)
46 Vec3f dM = tm[i].scale();
47 Mat3f rM = tm[i].rotation();
48 Coord pos = tm[i].translation();
52 char buf1[50], buf2[50], buf3[50];
53 sprintf(buf1,
"%f", (
double)pos[0]);
54 sprintf(buf2,
"%f", (
double)pos[1]);
55 sprintf(buf3,
"%f", (
double)pos[2]);
56 output << buf1 <<
' ' << buf2 <<
' ' << buf3 <<
' ';
59 char d1[50], d2[50], d3[50];
60 sprintf(d1,
"%f", (
double)dM[0]);
61 sprintf(d2,
"%f", (
double)dM[1]);
62 sprintf(d3,
"%f", (
double)dM[2]);
63 output << d1 <<
' ' << d2 <<
' ' << d3 <<
' ';
67 char v11[50], v12[50], v13[50];
68 sprintf(v11,
"%f", (
double)rM(0, 0));
69 sprintf(v12,
"%f", (
double)rM(1, 0));
70 sprintf(v13,
"%f", (
double)rM(2, 0));
71 output << v11 <<
' ' << v12 <<
' ' << v13 <<
' ';
74 char v21[50], v22[50], v23[50];
75 sprintf(v21,
"%f", (
double)rM(0, 1));
76 sprintf(v22,
"%f", (
double)rM(1, 1));
77 sprintf(v23,
"%f", (
double)rM(2, 1));
78 output << v21 <<
' ' << v22 <<
' ' << v23 <<
' ';
81 char v31[50], v32[50], v33[50];
82 sprintf(v31,
"%f", (
double)rM(0, 2));
83 sprintf(v32,
"%f", (
double)rM(1, 2));
84 sprintf(v33,
"%f", (
double)rM(2, 2));
85 output << v31 <<
' ' << v32 <<
' ' << v33 <<
' ';