MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / GetTransformMatrices

Method GetTransformMatrices

TSMotor2D.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void Motor2D::GetTransformMatrices(Transform2D *M, Transform2D *Minv) const
47{
48 float xz = x * z * 2.0F;
49 float yz = y * z * 2.0F;
50 float xw = x * w * 2.0F;
51 float yw = y * w * 2.0F;
52 float zw = z * w * 2.0F;
53 float z2 = 1.0F - z * z * 2.0F;
54
55 M->Set(z2, -zw, xz + yw, zw, z2, yz - xw);
56 Minv->Set(z2, zw, xz - yw, -zw, z2, yz + xw);
57}
58
59Motor2D& Motor2D::SetTransformMatrix(const Transform2D& M)
60{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected