[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Matrix5x4

Struct Matrix5x4

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Represents a 5x4 matrix for the built-in ColorMatrix effect.

public struct Matrix5x4 : IEquatable<Matrix5x4>, IFormattable
Implements
System.IEquatable<T><Matrix5x4>
System.IFormattable
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

Matrix5x4(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)

Initializes a new instance of the Matrix5x4 struct.

public Matrix5x4(float M11, float M12, float M13, float M14, float M21, float M22, float M23, float M24, float M31, float M32, float M33, float M34, float M41, float M42, float M43, float M44, float M51, float M52, float M53, float M54)

Parameters

M11 float

The value to assign at row 1 column 1 of the Matrix5x4.

M12 float

The value to assign at row 1 column 2 of the Matrix5x4.

M13 float

The value to assign at row 1 column 3 of the Matrix5x4.

M14 float

The value to assign at row 1 column 4 of the Matrix5x4.

M21 float

The value to assign at row 2 column 1 of the Matrix5x4.

M22 float

The value to assign at row 2 column 2 of the Matrix5x4.

M23 float

The value to assign at row 2 column 3 of the Matrix5x4.

M24 float

The value to assign at row 2 column 4 of the Matrix5x4.

M31 float

The value to assign at row 3 column 1 of the Matrix5x4.

M32 float

The value to assign at row 3 column 2 of the Matrix5x4.

M33 float

The value to assign at row 3 column 3 of the Matrix5x4.

M34 float

The value to assign at row 3 column 4 of the Matrix5x4.

M41 float

The value to assign at row 4 column 1 of the Matrix5x4.

M42 float

The value to assign at row 4 column 2 of the Matrix5x4.

M43 float

The value to assign at row 4 column 3 of the Matrix5x4.

M44 float

The value to assign at row 4 column 4 of the Matrix5x4.

M51 float

The value to assign at row 5 column 1 of the Matrix5x4.

M52 float

The value to assign at row 5 column 2 of the Matrix5x4.

M53 float

The value to assign at row 5 column 3 of the Matrix5x4.

M54 float

The value to assign at row 5 column 4 of the Matrix5x4.

Matrix5x4(float)

Initializes a new instance of the Matrix5x4 struct.

public Matrix5x4(float value)

Parameters

value float

The value that will be assigned to all components.

Matrix5x4(float[])

Initializes a new instance of the Matrix5x4 struct.

public Matrix5x4(float[] values)

Parameters

values float[]

The values to assign to the components of the Matrix5x4. This must be an array with 20 elements.

Exceptions

System.ArgumentNullException

Thrown when values is null.

System.ArgumentOutOfRangeException

Thrown when values contains more or less than sixteen elements.

Fields

Identity

The identity Matrix5x4.

public static readonly Matrix5x4 Identity

Field Value

Matrix5x4

M11

Value at row 1 column 1 of the Matrix5x4.

public float M11

Field Value

float

M12

Value at row 1 column 2 of the Matrix5x4.

public float M12

Field Value

float

M13

Value at row 1 column 3 of the Matrix5x4.

public float M13

Field Value

float

M14

Value at row 1 column 4 of the Matrix5x4.

public float M14

Field Value

float

M21

Value at row 2 column 1 of the Matrix5x4.

public float M21

Field Value

float

M22

Value at row 2 column 2 of the Matrix5x4.

public float M22

Field Value

float

M23

Value at row 2 column 3 of the Matrix5x4.

public float M23

Field Value

float

M24

Value at row 2 column 4 of the Matrix5x4.

public float M24

Field Value

float

M31

Value at row 3 column 1 of the Matrix5x4.

public float M31

Field Value

float

M32

Value at row 3 column 2 of the Matrix5x4.

public float M32

Field Value

float

M33

Value at row 3 column 3 of the Matrix5x4.

public float M33

Field Value

float

M34

Value at row 3 column 4 of the Matrix5x4.

public float M34

Field Value

float

M41

Value at row 4 column 1 of the Matrix5x4.

public float M41

Field Value

float

M42

Value at row 4 column 2 of the Matrix5x4.

public float M42

Field Value

float

M43

Value at row 4 column 3 of the Matrix5x4.

public float M43

Field Value

float

M44

Value at row 4 column 4 of the Matrix5x4.

public float M44

Field Value

float

M51

Value at row 5 column 1 of the Matrix5x4.

public float M51

Field Value

float

M52

Value at row 5 column 2 of the Matrix5x4.

public float M52

Field Value

float

M53

Value at row 5 column 3 of the Matrix5x4.

public float M53

Field Value

float

M54

Value at row 5 column 4 of the Matrix5x4.

public float M54

Field Value

float

SizeInBytes

The size of the Matrix5x4 type, in bytes.

public const int SizeInBytes = 80

Field Value

int

Zero

A Matrix5x4 with all of its components set to zero.

public static readonly Matrix5x4 Zero

Field Value

Matrix5x4

Properties

IsIdentity

Gets a value indicating whether this instance is an identity Matrix5x4.

public bool IsIdentity { get; }

Property Value

bool

true if this instance is an identity Matrix5x4; otherwise, false.

this[int, int]

Gets or sets the component at the specified index.

public float this[int row, int column] { get; set; }

Parameters

row int

The row of the Matrix5x4 to access.

column int

The column of the Matrix5x4 to access.

Property Value

float

The value of the Matrix5x4 component, depending on the index.

Exceptions

System.ArgumentOutOfRangeException

Thrown when the row or columnis out of the range [0, 3].

this[int]

Gets or sets the component at the specified index.

public float this[int index] { get; set; }

Parameters

index int

The zero-based index of the component to access.

Property Value

float

The value of the Matrix5x4 component, depending on the index.

Exceptions

System.ArgumentOutOfRangeException

Thrown when the index is out of the range [0, 15].

Row1

Gets or sets the first row in the Matrix5x4; that is M11, M12, M13, and M14.

public Vector4 Row1 { get; set; }

Property Value

Vector4

Row2

Gets or sets the second row in the Matrix5x4; that is M21, M22, M23, and M24.

public Vector4 Row2 { get; set; }

Property Value

Vector4

Row3

Gets or sets the third row in the Matrix5x4; that is M31, M32, M33, and M34.

public Vector4 Row3 { get; set; }

Property Value

Vector4

Row4

Gets or sets the fourth row in the Matrix5x4; that is M41, M42, M43, and M44.

public Vector4 Row4 { get; set; }

Property Value

Vector4

Row5

Gets or sets the fifth row in the Matrix5x4; that is M51, M52, M53, and M54.

public Vector4 Row5 { get; set; }

Property Value

Vector4

Methods

Add(in Matrix5x4, in Matrix5x4)

Determines the sum of two matrices.

public static Matrix5x4 Add(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first Matrix5x4 to add.

right Matrix5x4

The second Matrix5x4 to add.

Returns

Matrix5x4

The sum of the two matrices.

Divide(in Matrix5x4, float)

Divides a Matrix5x4 by the given value.

public static Matrix5x4 Divide(in Matrix5x4 left, float right)

Parameters

left Matrix5x4

The Matrix5x4 to divide.

right float

The amount by which to divide.

Returns

Matrix5x4

The resulting Matrix5x4.

Equals(Matrix5x4)

Determines whether the specified Matrix5x4 is equal to this instance.

public bool Equals(Matrix5x4 other)

Parameters

other Matrix5x4

Returns

bool

Equals(in Matrix5x4, in Matrix5x4)

Determines whether two instances of Matrix5x4 are equal.

public static bool Equals(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4
right Matrix5x4

Returns

bool

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object value)

Parameters

value object

Returns

bool

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Lerp(in Matrix5x4, in Matrix5x4, float)

Performs a linear interpolation between two matrices based on the given weighting.

public static Matrix5x4 Lerp(in Matrix5x4 matrix1, in Matrix5x4 matrix2, float amount)

Parameters

matrix1 Matrix5x4

The first matrix.

matrix2 Matrix5x4

The second matrix.

amount float

A value between 0 and 1 that indicates the weight of matrix2.

Returns

Matrix5x4

The interpolated matrix.

Multiply(in Matrix5x4, float)

Scales a Matrix5x4 by the given value.

public static Matrix5x4 Multiply(in Matrix5x4 left, float right)

Parameters

left Matrix5x4

The Matrix5x4 to scale.

right float

The amount by which to scale.

Returns

Matrix5x4

The scaled matrix.

Negate(in Matrix5x4)

Negates a Matrix5x4.

public static Matrix5x4 Negate(in Matrix5x4 value)

Parameters

value Matrix5x4

The Matrix5x4 to be negated.

Returns

Matrix5x4

NegateRef(ref Matrix5x4)

Negates a Matrix5x4.

public static void NegateRef(ref Matrix5x4 value)

Parameters

value Matrix5x4

The Matrix5x4 to be negated.

Subtract(in Matrix5x4, in Matrix5x4)

Determines the difference between two matrices.

public static Matrix5x4 Subtract(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first Matrix5x4 to subtract.

right Matrix5x4

The second Matrix5x4 to subtract.

Returns

Matrix5x4

The difference between the two matrices.

ToArray()

Creates an array containing the elements of the Matrix5x4.

public float[] ToArray()

Returns

float[]

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

ToString(IFormatProvider)

Returns a string that represents this instance.

public string ToString(IFormatProvider formatProvider)

Parameters

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string, IFormatProvider)

Returns a string that represents this instance.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format.

formatProvider System.IFormatProvider

The format provider.

Returns

string

A string that represents this instance.

ToString(string)

Returns a string that represents this instance.

public string ToString(string format)

Parameters

format string

The format.

Returns

string

A string that represents this instance.

Operators

operator +(in Matrix5x4, in Matrix5x4)

Adds two matricies.

public static Matrix5x4 operator +(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first Matrix5x4 to add.

right Matrix5x4

The second Matrix5x4 to add.

Returns

Matrix5x4

The sum of the two matricies.

operator /(in Matrix5x4, float)

Scales a Matrix5x4 by a given value.

public static Matrix5x4 operator /(in Matrix5x4 left, float right)

Parameters

left Matrix5x4

The Matrix5x4 to scale.

right float

The amount by which to scale.

Returns

Matrix5x4

The scaled Matrix5x4.

operator ==(in Matrix5x4, in Matrix5x4)

Tests for equality between two objects.

public static bool operator ==(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first value to compare.

right Matrix5x4

The second value to compare.

Returns

bool

true if left has the same value as right; otherwise, false.

operator !=(in Matrix5x4, in Matrix5x4)

Tests for inequality between two objects.

public static bool operator !=(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first value to compare.

right Matrix5x4

The second value to compare.

Returns

bool

true if left has a different value than right; otherwise, false.

operator *(in Matrix5x4, float)

Scales a Matrix5x4 by a given value.

public static Matrix5x4 operator *(in Matrix5x4 left, float right)

Parameters

left Matrix5x4

The Matrix5x4 to scale.

right float

The amount by which to scale.

Returns

Matrix5x4

The scaled Matrix5x4.

operator *(float, in Matrix5x4)

Scales a Matrix5x4 by a given value.

public static Matrix5x4 operator *(float left, in Matrix5x4 right)

Parameters

left float

The amount by which to scale.

right Matrix5x4

The Matrix5x4 to scale.

Returns

Matrix5x4

The scaled Matrix5x4.

operator -(in Matrix5x4, in Matrix5x4)

Subtracts two matricies.

public static Matrix5x4 operator -(in Matrix5x4 left, in Matrix5x4 right)

Parameters

left Matrix5x4

The first Matrix5x4 to subtract.

right Matrix5x4

The second Matrix5x4 to subtract.

Returns

Matrix5x4

The difference between the two matricies.

operator -(in Matrix5x4)

Negates a Matrix5x4.

public static Matrix5x4 operator -(in Matrix5x4 value)

Parameters

value Matrix5x4

The Matrix5x4 to negate.

Returns

Matrix5x4

The negated Matrix5x4.