fCraft.FuncDrawOperation.FuncDrawOperation C# (CSharp) Method

FuncDrawOperation() protected method

protected FuncDrawOperation ( Player player, Command cmd ) : System
player Player
cmd Command
return System
        protected FuncDrawOperation( Player player, Command cmd )
            : base(player)
        {
            string strFunc = cmd.Next();
            if ( string.IsNullOrWhiteSpace( strFunc ) ) {
                player.Message( "&WEmpty function expression" );
                return;
            }
            if ( strFunc.Length < 3 ) {
                player.Message( "&WExpression is too short (should be like z=f(x,y))" );
                return;
            }

            strFunc = strFunc.ToLower();

            _vaxis = GetAxis( SimpleParser.PreparseAssignment( ref strFunc ) );

            _expression = SimpleParser.Parse( strFunc, GetVarArray( _vaxis ) );

            player.Message( "Expression parsed as " + _expression.Print() );
            string scalingStr = cmd.Next();
            _scaler = new Scaler( scalingStr );
        }