Gorgon
Show / Hide Table of Contents

Class GorgonRectangleOffsets

Defines the offsets for each corner of a rectangle.

Inheritance
object
GorgonRectangleOffsets
Implements
IReadOnlyList<Vector3>
IReadOnlyCollection<Vector3>
IEnumerable<Vector3>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Renderers
Assembly: Gorgon.Renderers.Gorgon2D.dll
Syntax
public class GorgonRectangleOffsets : IReadOnlyList<Vector3>, IReadOnlyCollection<Vector3>, IEnumerable<Vector3>, IEnumerable

Properties

| Edit this page View Source

Count

Gets the number of elements in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

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 index is not between 0 and 3.

| Edit this page View Source

LowerLeft

Property to set or return the offset of the lower left corner.

Declaration
public Vector3 LowerLeft { get; set; }
Property Value
Type Description
Vector3
| Edit this page View Source

LowerRight

Property to set or return the offset of the lower right corner.

Declaration
public Vector3 LowerRight { get; set; }
Property Value
Type Description
Vector3
| Edit this page View Source

UpperLeft

Property to set or return the offset of the upper left corner.

Declaration
public Vector3 UpperLeft { get; set; }
Property Value
Type Description
Vector3
| Edit this page View Source

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 Source

CopyTo(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 destination parameter is null.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonTreeLinqExtensions.TraverseDepthFirst<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonTreeLinqExtensions.Traverse<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
GorgonIReadOnlyListExtensions.Contains<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.CopyTo<T>(IReadOnlyList<T>, T[])
GorgonIReadOnlyListExtensions.FirstIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonIReadOnlyListExtensions.IndexOf<T>(IReadOnlyList<T>, T)
GorgonIReadOnlyListExtensions.LastIndexOf<T>(IReadOnlyList<T>, Predicate<T>)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author