Options to be used by various polygon operations.
Inheritance: PolygonOperationOptions
Ejemplo n.º 1
0
 /// <summary>
 /// Creates a copy of the given object or the default object when given <c>null</c>.
 /// </summary>
 /// <param name="options">The object to clone.</param>
 /// <returns>A new object.</returns>
 public static PolygonBinaryOperationOptions CloneOrDefault(PolygonBinaryOperationOptions options)
 {
     Contract.Ensures(Contract.Result <PolygonBinaryOperationOptions>() != null);
     return(null == options
         ? new PolygonBinaryOperationOptions()
         : new PolygonBinaryOperationOptions(options));
 }
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="options">The object to copy.</param>
        public PolygonBinaryOperationOptions(PolygonBinaryOperationOptions options)
            : base(options) {
            if (null == options) throw new ArgumentNullException("options");
            Contract.EndContractBlock();

            InvertLeftHandSide = options.InvertLeftHandSide;
            InvertRightHandSide = options.InvertRightHandSide;
        }
Ejemplo n.º 3
0
 static PolygonUnionOperation() {
     DefaultInverseIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide = true,
         InvertRightHandSide = true,
         InvertResult = true
     };
     DefaultInverseIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseIntersectionOptions);
 }
 static PolygonDifferenceOperation() {
     DefaultInverseRightIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide = false,
         InvertRightHandSide = true,
         InvertResult = false
     };
     DefaultInverseRightIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseRightIntersectionOptions);
 }
Ejemplo n.º 5
0
 static PolygonDifferenceOperation()
 {
     DefaultInverseRightIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide  = false,
         InvertRightHandSide = true,
         InvertResult        = false
     };
     DefaultInverseRightIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseRightIntersectionOptions);
 }
Ejemplo n.º 6
0
 static PolygonUnionOperation()
 {
     DefaultInverseIntersectionOptions = new PolygonBinaryOperationOptions {
         InvertLeftHandSide  = true,
         InvertRightHandSide = true,
         InvertResult        = true
     };
     DefaultInverseIntersectionOperation = new PolygonIntersectionOperation(DefaultInverseIntersectionOptions);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="options">The object to copy.</param>
        public PolygonBinaryOperationOptions(PolygonBinaryOperationOptions options)
            : base(options)
        {
            if (null == options)
            {
                throw new ArgumentNullException("options");
            }
            Contract.EndContractBlock();

            InvertLeftHandSide  = options.InvertLeftHandSide;
            InvertRightHandSide = options.InvertRightHandSide;
        }
 /// <summary>
 /// Creates a copy of the given object or the default object when given <c>null</c>.
 /// </summary>
 /// <param name="options">The object to clone.</param>
 /// <returns>A new object.</returns>
 public static PolygonBinaryOperationOptions CloneOrDefault(PolygonBinaryOperationOptions options) {
     Contract.Ensures(Contract.Result<PolygonBinaryOperationOptions>() != null);
     return null == options
         ? new PolygonBinaryOperationOptions()
         : new PolygonBinaryOperationOptions(options);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructs a new polygon intersection operation using the given options.
 /// </summary>
 /// <param name="options">The operation options to apply.</param>
 /// <remarks>
 /// Using this constructor can help optimize other operators that
 /// rely on intersection operations, such as union or difference.
 /// </remarks>
 internal PolygonIntersectionOperation(PolygonBinaryOperationOptions options)
 {
     Options = PolygonBinaryOperationOptions.CloneOrDefault(options);
 }
 /// <summary>
 /// Constructs a new polygon intersection operation using the given options.
 /// </summary>
 /// <param name="options">The operation options to apply.</param>
 /// <remarks>
 /// Using this constructor can help optimize other operators that
 /// rely on intersection operations, such as union or difference.
 /// </remarks>
 internal PolygonIntersectionOperation(PolygonBinaryOperationOptions options) {
     Options = PolygonBinaryOperationOptions.CloneOrDefault(options);
 }