fCraft.Drawing.DrawOperation.Prepare C# (CSharp) Method

Prepare() public method

public Prepare ( [ marks ) : bool
marks [
return bool
        public virtual bool Prepare( [NotNull] Vector3I[] marks )
        {
            if ( marks == null )
                throw new ArgumentNullException( "marks" );
            if ( marks.Length != ExpectedMarks ) {
                string msg = String.Format( "Wrong number of marks ({0}), expecting {1}.",
                                            marks.Length, ExpectedMarks );
                throw new ArgumentException( msg, "marks" );
            }

            Marks = marks;
            if ( marks.Length == 2 ) {
                Bounds = new BoundingBox( Marks[0], Marks[1] );
            }

            if ( Brush == null )
                throw new NullReferenceException( Name + ": Brush not set" );
            return Brush.Begin( Player, this );
        }