/// <summary>
        /// Makes a new <see cref="TransformManagerL2G"/> from a lambda matrix.
        /// </summary>
        /// <param name="lambdaMatrix">The λ Matrix.</param>
        /// <returns>new TransformManagerL2G</returns>
        public static TransformManagerL2G MakeFromLambdaMatrix(Matrix lambdaMatrix)
        {
            var buf = new TransformManagerL2G();

            buf.LambdaMatrix = lambdaMatrix;

            buf.VeryMagicNumber = 1;

            return(buf);
        }
        /// <summary>
        /// Makes a new <see cref="TransformManagerL2G"/> from a transformation matrix.
        /// </summary>
        /// <param name="transformMatrix">The T Matrix.</param>
        /// <returns>new TransformManagerL2G</returns>
        public static TransformManagerL2G MakeFromTransformationMatrix(Matrix transformMatrix)
        {
            var buf = new TransformManagerL2G();

            buf.TransformMatrix = transformMatrix;

            buf.VeryMagicNumber = 2;

            return(buf);
        }
        /// <summary>
        /// Makes a new <see cref="TransformManagerL2G"/> from a transformation matrix.
        /// </summary>
        /// <param name="transformMatrix">The T Matrix.</param>
        /// <returns>new TransformManagerL2G</returns>
        public static TransformManagerL2G MakeFromTransformationMatrix(Matrix transformMatrix, MatrixPool pool = null)
        {
            var buf = new TransformManagerL2G();

            buf.TransformMatrix = transformMatrix;
            buf.VeryMagicNumber = 2;

            buf.MatrixPool = pool == null ? new MatrixPool() : pool;

            return(buf);
        }
        /// <summary>
        /// Makes a new <see cref="TransformManagerL2G"/> from a lambda matrix.
        /// </summary>
        /// <param name="lambdaMatrix">The λ Matrix.</param>
        /// <returns>new TransformManagerL2G</returns>
        public static TransformManagerL2G MakeFromLambdaMatrix(Matrix lambdaMatrix, MatrixPool pool = null)
        {
            var buf = new TransformManagerL2G();

            buf.LambdaMatrix = lambdaMatrix;

            buf.VeryMagicNumber = 1;

            buf.MatrixPool = pool == null ? new MatrixPool() : pool;

            return(buf);
        }
Exemple #5
0
        /// <summary>
        /// Gets the local to global (and vice versa) transformation manager for this element.
        /// </summary>
        /// <returns>the trasformation manager related to this element</returns>
        public TransformManagerL2G GetTransformationManager()
        {
            var lambda = GetLambdaMatrix();

            return(TransformManagerL2G.MakeFromLambdaMatrix(lambda, MatrixPool));
        }