2 * Copyright (c) 2007-2010 SlimDX Group
\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
5 * of this software and associated documentation files (the "Software"), to deal
\r
6 * in the Software without restriction, including without limitation the rights
\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
8 * copies of the Software, and to permit persons to whom the Software is
\r
9 * furnished to do so, subject to the following conditions:
\r
11 * The above copyright notice and this permission notice shall be included in
\r
12 * all copies or substantial portions of the Software.
\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
26 namespace Direct3D11
\r
29 /// Represents a 3D region of a resource's data.
\r
31 /// <unmanaged>D3D11_BOX</unmanaged>
\r
32 public value class ResourceRegion : System::IEquatable<ResourceRegion>
\r
43 ResourceRegion( const D3D11_BOX& native );
\r
45 D3D11_BOX CreateNativeVersion();
\r
49 /// Gets or sets the left boundary of the region.
\r
54 void set( int value );
\r
58 /// Gets or sets the top boundary of the region.
\r
63 void set( int value );
\r
67 /// Gets or sets the front boundary of the region.
\r
72 void set( int value );
\r
76 /// Gets or sets the right boundary of the region.
\r
81 void set( int value );
\r
85 /// Gets or sets the bottom boundary of the region.
\r
90 void set( int value );
\r
94 /// Gets or sets the back boundary of the region.
\r
99 void set( int value );
\r
103 /// Initializes a new instance of the <see cref="ResourceRegion"/> struct.
\r
105 /// <param name="left">The left boundary of the region.</param>
\r
106 /// <param name="top">The top boundary of the region.</param>
\r
107 /// <param name="front">The front boundary of the region.</param>
\r
108 /// <param name="right">The right boundary of the region.</param>
\r
109 /// <param name="bottom">The bottom boundary of the region.</param>
\r
110 /// <param name="back">The back boundary of the region.</param>
\r
111 ResourceRegion(int left, int top, int front, int right, int bottom, int back);
\r
114 /// Tests for equality between two ResourceRegions.
\r
116 /// <param name="left">The first value to compare.</param>
\r
117 /// <param name="right">The second value to compare.</param>
\r
118 /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>
\r
119 static bool operator == ( ResourceRegion left, ResourceRegion right );
\r
122 /// Tests for inequality between two ResourceRegions.
\r
124 /// <param name="left">The first value to compare.</param>
\r
125 /// <param name="right">The second value to compare.</param>
\r
126 /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>
\r
127 static bool operator != ( ResourceRegion left, ResourceRegion right );
\r
130 /// Returns the hash code for this instance.
\r
132 /// <returns>A 32-bit signed integer hash code.</returns>
\r
133 virtual int GetHashCode() override;
\r
136 /// Returns a value indicating whether this instance is equal to the specified object.
\r
138 /// <param name="obj">An object to compare with this instance.</param>
\r
139 /// <returns><c>true</c> if <paramref name="obj"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
\r
140 virtual bool Equals( System::Object^ obj ) override;
\r
143 /// Returns a value indicating whether this instance is equal to the specified object.
\r
145 /// <param name="other">A <see cref="ResourceRegion"/> to compare with this instance.</param>
\r
146 /// <returns><c>true</c> if <paramref name="other"/> has the same value as this instance; otherwise, <c>false</c>.</returns>
\r
147 virtual bool Equals( ResourceRegion other );
\r
150 /// Returns a value indicating whether the two ResourceRegions are equivalent.
\r
152 /// <param name="value1">The first value to compare.</param>
\r
153 /// <param name="value2">The second value to compare.</param>
\r
154 /// <returns><c>true</c> if <paramref name="value1"/> has the same value as <paramref name="value2"/>; otherwise, <c>false</c>.</returns>
\r
155 static bool Equals( ResourceRegion% value1, ResourceRegion% value2 );
\r