MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / getGeometricMatrix

Method getGeometricMatrix

Source/ThirdParty/OpenFBX/ofbx.cpp:1328–1342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1326
1327
1328 DMatrix getGeometricMatrix() const override
1329 {
1330 DVec3 translation = resolveVec3Property(*this, "GeometricTranslation", {0, 0, 0});
1331 DVec3 rotation = resolveVec3Property(*this, "GeometricRotation", {0, 0, 0});
1332 DVec3 scale = resolveVec3Property(*this, "GeometricScaling", {1, 1, 1});
1333
1334 DMatrix scale_mtx = makeIdentity();
1335 scale_mtx.m[0] = (float)scale.x;
1336 scale_mtx.m[5] = (float)scale.y;
1337 scale_mtx.m[10] = (float)scale.z;
1338 DMatrix mtx = getRotationMatrix(rotation, RotationOrder::EULER_XYZ);
1339 setTranslation(translation, &mtx);
1340
1341 return scale_mtx * mtx;
1342 }
1343
1344 Type getType() const override { return Type::MESH; }
1345

Callers

nothing calls this directly

Calls 4

resolveVec3PropertyFunction · 0.85
makeIdentityFunction · 0.85
getRotationMatrixFunction · 0.85
setTranslationFunction · 0.85

Tested by

no test coverage detected