Skip to content

Commit e08db74

Browse files
author
aothms
committed
Fix product's 4x4 matrix on the IfcGeomServer
1 parent 3a971d6 commit e08db74

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ifcgeomserver/IfcGeomServer.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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)));

0 commit comments

Comments
 (0)