opensourceBIM / IfcOpenShell-BIMserver-plugin

IfcOpenShell BIMserver plugin
Other
51 stars 28 forks source link

Geometry Rotation #6

Open jddaigle opened 6 years ago

jddaigle commented 6 years ago

Hi, it's more a question than an issue... I extracted geometry from an IFC, it works fine, but loaded into a 3D engine, those meshes have no rotation in the Transformation Matrix, only translation (look the attached file). How can I extract the rotation? tks!

image

aothms commented 6 years ago

Both rotation and translation are in the 4x4 matrix. I see there is a transpose operation somewhere in the code [1], maybe you need to transpose the matrix for use in your engine? Other than that we can only guess of course what's going on on your end.

[1] https://github.com/opensourceBIM/IfcOpenShell-BIMserver-plugin/blob/master/src/org/ifcopenshell/IfcGeomServerClientEntity.java#L52

jddaigle commented 6 years ago

oh, my bad, I misinterpreted the matrix. The rotation information is in the matrix. tks!