Engines/FlatRedBallXNA/FlatRedBall.Content/ModelAnimation/X File/XFileTokenizer.cs
/// <summary>
/// Reads the next Matrix in the stream.
/// </summary>
/// <returns>The parsed Matrix</returns>
Reads the next Matrix in the stream.
Reads the next Matrix in the stream .
public Matrix NextMatrix()
        {
            try
            {
                Matrix m = new Matrix(
                    float.Parse(tokens[tokenIndex]), float.Parse(tokens[tokenIndex + 2]),
                    float.Parse(tokens[tokenIndex + 4]), float.Parse(tokens[tokenIndex + 6]),
                    float.Parse(tokens[tokenIndex + 8]), float.Parse(tokens[tokenIndex + 10]),
                    float.Parse(tokens[tokenIndex + 12]), float.Parse(tokens[tokenIndex + 14]),
                    float.Parse(tokens[tokenIndex + 16]), float.Parse(tokens[tokenIndex + 18]),
                    float.Parse(tokens[tokenIndex + 20]), float.Parse(tokens[tokenIndex + 22]),
                    float.Parse(tokens[tokenIndex + 24]), float.Parse(tokens[tokenIndex + 26]),
                    float.Parse(tokens[tokenIndex + 28]), float.Parse(tokens[tokenIndex + 30]));
                return m;
            }
            catch (Exception e)
            {
                Throw(typeof(Matrix), e, tokens[tokenIndex]);
            }
            finally
            {
                tokenIndex += 33;
            }
            return new Matrix();
        }
public Matrix NextMatrix ( ) { try { Matrix m = new Matrix ( float . Parse ( tokens [ tokenIndex ] ) , float . Parse ( tokens [ tokenIndex + 2 ] ) , float . Parse ( tokens [ tokenIndex + 4 ] ) , float . Parse ( tokens [ tokenIndex + 6 ] ) , float . Parse ( tokens [ tokenIndex + 8 ] ) , float . Parse ( tokens [ tokenIndex + 10 ] ) , float . Parse ( tokens [ tokenIndex + 12 ] ) , float . Parse ( tokens [ tokenIndex + 14 ] ) , float . Parse ( tokens [ tokenIndex + 16 ] ) , float . Parse ( tokens [ tokenIndex + 18 ] ) , float . Parse ( tokens [ tokenIndex + 20 ] ) , float . Parse ( tokens [ tokenIndex + 22 ] ) , float . Parse ( tokens [ tokenIndex + 24 ] ) , float . Parse ( tokens [ tokenIndex + 26 ] ) , float . Parse ( tokens [ tokenIndex + 28 ] ) , float . Parse ( tokens [ tokenIndex + 30 ] ) ) ; return m ; } catch ( Exception e ) { Throw ( typeof ( Matrix ) , e , tokens [ tokenIndex ] ) ; } finally { tokenIndex += 33 ; } return new Matrix ( ) ; }
Reads the next Matrix in the stream.
Reads the next Matrix in the stream .
The parsed Matrix
The parsed Matrix