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

Function SetCoordinateSpace

code/AssetLib/IFC/IFCLoader.cpp:367–382  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

365
366// ------------------------------------------------------------------------------------------------
367void SetCoordinateSpace(ConversionData &conv) {
368 const Schema_2x3::IfcRepresentationContext *fav = nullptr;
369 for (const Schema_2x3::IfcRepresentationContext &v : conv.proj.RepresentationContexts) {
370 fav = &v;
371 // Model should be the most suitable type of context, hence ignore the others
372 if (v.ContextType && v.ContextType.Get() == "Model") {
373 break;
374 }
375 }
376 if (fav) {
377 if (const Schema_2x3::IfcGeometricRepresentationContext *const geo = fav->ToPtr<Schema_2x3::IfcGeometricRepresentationContext>()) {
378 ConvertAxisPlacement(conv.wcs, *geo->WorldCoordinateSystem, conv);
379 IFCImporter::LogDebug("got world coordinate system");
380 }
381 }
382}
383
384// ------------------------------------------------------------------------------------------------
385void ResolveObjectPlacement(aiMatrix4x4 &m, const Schema_2x3::IfcObjectPlacement &place, ConversionData &conv) {

Callers 1

InternReadFileMethod · 0.85

Calls 2

ConvertAxisPlacementFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected