* @brief Returns the 4x4 world transformation matrix for a given placement Express ID, * flattened into a 1D array of 16 doubles in **column-major order**. * * @param modelID: ID of the IFC model. * @param placementExpressId: Express ID of the placement (e.g. IfcLocalPlacement). * @return std::array containing the flattened matrix. */
| 320 | * @return std::array<double,16> containing the flattened matrix. |
| 321 | */ |
| 322 | std::array<double, 16> GetWorldTransformMatrix(uint32_t modelID, uint32_t placementExpressId) |
| 323 | { |
| 324 | std::array<double, 16> out{}; |
| 325 | if (!manager.IsModelOpen(modelID)) |
| 326 | return out; |
| 327 | |
| 328 | glm::dmat4 m = manager.GetGeometryProcessor(modelID)->GetLoader().GetLocalPlacement(placementExpressId); |
| 329 | |
| 330 | int index = 0; |
| 331 | for (int col = 0; col < 4; ++col) |
| 332 | { |
| 333 | for (int row = 0; row < 4; ++row) |
| 334 | { |
| 335 | out[index++] = m[col][row]; |
| 336 | } |
| 337 | } |
| 338 | return out; |
| 339 | } |
| 340 | std::vector<uint32_t> GetLineIDsWithType(uint32_t modelID, emscripten::val types) |
| 341 | { |
| 342 | if (!manager.IsModelOpen(modelID)) |
nothing calls this directly
no test coverage detected