/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> internal static OrthoBasis3d CreateFrom2d(OrthoBasis2d other) { return(new OrthoBasis3d { _x = other.X.As3d, _y = other.Y.As3d, _z = Vector3d.UnitZ }); }
/// <summary> /// Creates a relative rotation from t0 to t1. /// </summary> /// <param name="from"></param> /// <param name="to"></param> /// <returns></returns> public static OrthoBasis2d CreateFromTo(OrthoBasis2d from, OrthoBasis2d to) { return(to.Apply(from.Inverse)); }
/// <summary> /// /// </summary> /// <param name="origin"></param> /// <param name="x"></param> public Orient2d(Vector2d origin, Vector2d x) { Rotation = new OrthoBasis2d(x); Translation = origin; }
/// <summary> /// /// </summary> /// <param name="rotation"></param> /// <param name="translation"></param> public Orient2d(OrthoBasis2d rotation, Vector2d translation) { Rotation = rotation; Translation = translation; }
/// <summary> /// /// </summary> /// <param name="scale"></param> /// <param name="orientation"></param> public Transform2d(Vector2d scale, Orient2d orientation) { Scale = scale; Rotation = orientation.Rotation; Translation = orientation.Translation; }
/// <summary> /// /// </summary> /// <param name="scale"></param> /// <param name="rotation"></param> /// <param name="translation"></param> public Transform2d(Vector2d scale, OrthoBasis2d rotation, Vector2d translation) { Scale = scale; Rotation = rotation; Translation = translation; }