Class GorgonRectangleOffsets
Defines the offsets for each corner of a rectangle.
Inherited Members
Namespace: Gorgon.Renderers
Assembly: Gorgon.Renderers.Gorgon2D.dll
Syntax
public class GorgonRectangleOffsets : IReadOnlyList<Vector3>, IReadOnlyCollection<Vector3>, IEnumerable<Vector3>, IEnumerable
Properties
| Edit this page View SourceCount
Gets the number of elements in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
this[int]
Property to set or return the corner offset value by index.
Declaration
public Vector3 this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index |
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
The ordering of the indices is as follows: 0 - Upper left, 1 - Upper right, 2 - Lower right, 3 - Lower left.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when the |
LowerLeft
Property to set or return the offset of the lower left corner.
Declaration
public Vector3 LowerLeft { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
LowerRight
Property to set or return the offset of the lower right corner.
Declaration
public Vector3 LowerRight { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
UpperLeft
Property to set or return the offset of the upper left corner.
Declaration
public Vector3 UpperLeft { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
UpperRight
Property to set or return the offset of the upper right corner.
Declaration
public Vector3 UpperRight { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
| Edit this page View SourceCopyTo(GorgonRectangleOffsets)
Function to copy the offsets into the specified destination.
Declaration
public void CopyTo(GorgonRectangleOffsets destination)
Parameters
Type | Name | Description |
---|---|---|
GorgonRectangleOffsets | destination | The destination that will receive the copy of the offsets. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<Vector3> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<Vector3> | An enumerator that can be used to iterate through the collection. |
SetAll(Vector3)
Function to assign a single offset to all corners.
Declaration
public void SetAll(Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | offset | The offset to assign. |