Notifications
Clear all

[Closed] Get local scale from Matrix3

How I could extract local scale from Matrix3?

As far as I see you can use m.GetTrans(); to get translation or Quat q(m); to get rotation but with scale the only way I’ve found was.

AffineParts parts;
decomp_affine(rtm, &parts);
ScaleValue sv = ScaleValue(parts.k*parts.f, parts.u);
scale = sv.s;

And it doesn’t seem to be ok.

Regards

3 Replies
AffineParts parts;
decomp_affine(tm, &parts);

why parts.k is not scale for you?

It doesn’t deal with negative scales (mirror)

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

i see…

there is the

SpectralDecomp(Matrix3 m, Point3 &s, Quat& q)