MCPcopy Create free account
hub / github.com/assimp/assimp / ResolveObjectPlacement

Function ResolveObjectPlacement

code/AssetLib/IFC/IFCLoader.cpp:385–400  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

383
384// ------------------------------------------------------------------------------------------------
385void ResolveObjectPlacement(aiMatrix4x4 &m, const Schema_2x3::IfcObjectPlacement &place, ConversionData &conv) {
386 if (const Schema_2x3::IfcLocalPlacement *const local = place.ToPtr<Schema_2x3::IfcLocalPlacement>()) {
387 IfcMatrix4 tmp;
388 ConvertAxisPlacement(tmp, *local->RelativePlacement, conv);
389
390 m = static_cast<aiMatrix4x4>(tmp);
391
392 if (local->PlacementRelTo) {
393 aiMatrix4x4 tmpM;
394 ResolveObjectPlacement(tmpM, local->PlacementRelTo.Get(), conv);
395 m = tmpM * m;
396 }
397 } else {
398 IFCImporter::LogWarn("skipping unknown IfcObjectPlacement entity, type is ", place.GetClassName());
399 }
400}
401
402// ------------------------------------------------------------------------------------------------
403bool ProcessMappedItem(const Schema_2x3::IfcMappedItem &mapped, aiNode *nd_src, std::vector<aiNode *> &subnodes_src, unsigned int matid, ConversionData &conv) {

Callers 1

ProcessSpatialStructureFunction · 0.85

Calls 3

ConvertAxisPlacementFunction · 0.85
GetClassNameMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected