private Quaterion(Quat q) { _quaterion = q; q.Length(); q.LengthSquared(); q.Normalize(); }
private Quaterion(Quat q) { _quaterion = q; q.Length(); q.LengthSquared(); q.Normalize(); }
public static AffineTransform Blend(ReadOnlySpan <AffineTransform> transforms, ReadOnlySpan <float> weights) { var s = XNAV3.Zero; var r = default(XNAQUAT); var t = XNAV3.Zero; for (int i = 0; i < transforms.Length; ++i) { var w = weights[i]; s += transforms[i].Scale * w; r += transforms[i].Rotation * w; t += transforms[i].Translation * w; } r = XNAQUAT.Normalize(r); return(new AffineTransform(s, r, t)); }
public void Normalize() { _quaterion.Normalize(); }