File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,14 @@ class Entity : public Command {
195195 swrite (s, geom->name ());
196196 swrite (s, geom->type ());
197197 swrite<int32_t >(s, geom->parent_id ());
198- swrite (s, std::string ((char *)geom->matrix ().data (), 16 * sizeof (float )));
198+ const std::vector<float >& m = geom->matrix ();
199+ const float matrix_array[16 ] = {
200+ m[0 ], m[3 ], m[6 ], m[ 9 ],
201+ m[1 ], m[4 ], m[7 ], m[10 ],
202+ m[2 ], m[5 ], m[8 ], m[11 ],
203+ 0 , 0 , 0 , 1
204+ };
205+ swrite (s, std::string ((char *)matrix_array, 16 * sizeof (float )));
199206 swrite<int32_t >(s, geom->mesh ().id ());
200207 swrite (s, std::string ((char *)geom->mesh ().verts ().data (), geom->mesh ().verts ().size () * sizeof (float )));
201208 swrite (s, std::string ((char *)geom->mesh ().normals ().data (), geom->mesh ().normals ().size () * sizeof (float )));
You can’t perform that action at this time.
0 commit comments