Accord.Math.Matrix4x4.ToArray C# (CSharp) Method

ToArray() public method

Returns array representation of the matrix.
public ToArray ( ) : float[]
return float[]
        public float[] ToArray()
        {
            return new float[]
            {
                V00, V01, V02, V03, V10, V11, V12, V13, V20, V21, V22, V23, V30, V31, V32, V33
            };
        }

Usage Example

Example #1
0
        public void SetMatrix( Matrix4x4 matrix )
        {
            float[] array = matrix.ToArray( );

            for ( int i = 0, k = 0; i < 4; i++ )
            {
                for ( int j = 0; j < 4; j++, k++ )
                {
                    string textBoxName = string.Format( "i{0}_j{1}_Box", i, j );

                    if ( textBoxes.ContainsKey( textBoxName ) )
                    {
                        textBoxes[textBoxName].Text = FormatFloat( array[k] );
                    }
                }
            }
        }