MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / ReadVec3InMeters

Method ReadVec3InMeters

Source/URLab/Private/MuJoCo/Utils/MjUtils.cpp:439–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439bool MjUtils::ReadVec3InMeters(const FXmlNode* Node, const TCHAR* Attr, FVector& Out, bool& bOverride)
440{
441 if (!Node)
442 return false;
443 FString Str = Node->GetAttribute(Attr);
444 if (Str.IsEmpty())
445 return false;
446 bOverride = true;
447 // Schema attribute is in MJ metres; convert to UE centimetres + Y-flip.
448 FVector MjVec = MjXmlUtils::ParseVector(Str);
449 const double MjArr[3] = {MjVec.X, MjVec.Y, MjVec.Z};
450 Out = MjUtils::MjToUEPosition(MjArr);
451 return true;
452}

Callers

nothing calls this directly

Calls 1

IsEmptyMethod · 0.80

Tested by

no test coverage detected