internal void Set(ref Matrix2x3 toWorld) { this.ToWorld = toWorld; Matrix2x3.Invert(ref toWorld, out ToBody); Matrix2x2.CreateNormal(ref toWorld, out ToWorldNormal); Matrix2x2.CreateNormal(ref ToBody, out ToBodyNormal); }
/* public static ALVector2D Transform(Matrix2D matrix, ALVector2D source) * { * ALVector2D result; * Transform(ref matrix,ref source,out result); * return result; * } * public static void Transform(ref Matrix2D matrix, ref ALVector2D source, out ALVector2D result) * { * Scalar dAngle; * Vector2D angular = Vector2D.XAxis; * Vector2D.Transform(ref matrix.Vertex, ref source.Linear, out result.Linear); * Vector2D.Transform(ref matrix.Normal, ref angular, out angular); * Vector2D.GetAngle(ref angular, out dAngle); * result.Angular = source.Angular + dAngle; * }*/ public static void Transform(ref Matrix2x3 matrix, ref ALVector2D source, out ALVector2D result) { Scalar dAngle; Vector2D angular = Vector2D.XAxis; Vector2D.Transform(ref matrix, ref source.Linear, out result.Linear); Matrix2x2 normal; Matrix2x2.CreateNormal(ref matrix, out normal); Vector2D.Transform(ref normal, ref angular, out angular); Vector2D.GetAngle(ref angular, out dAngle); result.Angular = source.Angular + dAngle; }