CVB.Net 14.0
Matrix3D Struct Reference

Double precision 3x3 matrix struct. More...

Inherits IEquatable< Matrix3D >.

Public Member Functions

 Matrix3D (double[] row1, double[] row2, double[] row3)
 Constructor. More...
 
 Matrix3D (double[,] arr)
 Constructor. More...
 
 Matrix3D (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33)
 Constructor. More...
 
 Matrix3D (RotationAngles3D rotationAngles)
 Constructor. More...
 
Matrix3D Invert ()
 Inverts this Matrix. More...
 
override bool Equals (object obj)
 Indicates whether this instance and the given obj are equal. More...
 
bool Equals (Matrix3D obj)
 Indicates whether this instance and the given obj are equal. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
override string ToString ()
 String conversion. More...
 

Static Public Member Functions

static Matrix3D operator+ (Matrix3D lhs, Matrix3D rhs)
 Addition operator. More...
 
static Matrix3D operator- (Matrix3D lhs, Matrix3D rhs)
 Subtraction operator. More...
 
static Matrix3D operator* (Matrix3D lhs, Matrix3D rhs)
 Multiplication operator. More...
 
static bool operator== (Matrix3D lhs, Matrix3D rhs)
 Equality comparison operator. More...
 
static bool operator!= (Matrix3D lhs, Matrix3D rhs)
 Unequality comparison operator. More...
 

Static Public Attributes

static readonly Matrix3D Identity
 The identity element.
 

Properties

double A11 [get, set]
 Top left matrix element.
 
double A12 [get, set]
 Top middle matrix element.
 
double A13 [get, set]
 Top right matrix element.
 
double A21 [get, set]
 Mid left matrix element.
 
double A22 [get, set]
 Mid matrix element.
 
double A23 [get, set]
 Mid right matrix element.
 
double A31 [get, set]
 Bottom left matrix element.
 
double A32 [get, set]
 Bottom mid matrix element.
 
double A33 [get, set]
 Bottom right matrix element.
 
double this[int row, int column] [get, set]
 Index access. More...
 

Detailed Description

Double precision 3x3 matrix struct.

Constructor & Destructor Documentation

◆ Matrix3D() [1/4]

Matrix3D ( double[]  row1,
double[]  row2,
double[]  row3 
)

Constructor.

Parameters
row1First component row.
row2Second component row.
row3Third component row.
Exceptions
IndexOutOfRangeExceptionWhen one of the given rows has less than three values.
NullReferenceExceptionWhen one of the given rows is null.

◆ Matrix3D() [2/4]

Matrix3D ( double  arr[,])

Constructor.

Parameters
arrA 3x3 array containing the matrix values.
Exceptions
IndexOutOfRangeExceptionWhen the given arr is smaller than 3x3.
NullReferenceExceptionIf the given arr is null.

◆ Matrix3D() [3/4]

Matrix3D ( double  a11,
double  a12,
double  a13,
double  a21,
double  a22,
double  a23,
double  a31,
double  a32,
double  a33 
)

Constructor.

Parameters
a11Top left matrix element.
a12Top middle matrix element.
a13Top right matrix element.
a21Mid left matrix element.
a22Mid matrix element.
a23Mid right matrix element.
a31Bottom left matrix element.
a32Bottom mid matrix element.
a33Bottom right matrix element.

◆ Matrix3D() [4/4]

Matrix3D ( RotationAngles3D  rotationAngles)

Constructor.

Parameters
rotationAnglesRotation angles to create matrix from.
Exceptions
CvbExceptionWhen creating the matrix failed.

Member Function Documentation

◆ Equals() [1/2]

bool Equals ( Matrix3D  obj)

Indicates whether this instance and the given obj are equal.

Parameters
objObject to compare to.
Returns
True if obj and this instance represent the same value; otherwise, false.

◆ Equals() [2/2]

override bool Equals ( object  obj)

Indicates whether this instance and the given obj are equal.

Parameters
objObject to compare to.
Returns
True if obj and this instance are the same type and represent the same value; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer that is the hash code for this instance.

◆ Invert()

Matrix3D Invert ( )

Inverts this Matrix.

Returns
Inverted matrix.

◆ operator!=()

static bool operator!= ( Matrix3D  lhs,
Matrix3D  rhs 
)
static

Unequality comparison operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
True if lhs != rhs , otherwise false.

◆ operator*()

static Matrix3D operator* ( Matrix3D  lhs,
Matrix3D  rhs 
)
static

Multiplication operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Product of lhs and rhs .

◆ operator+()

static Matrix3D operator+ ( Matrix3D  lhs,
Matrix3D  rhs 
)
static

Addition operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Sum of lhs and rhs .

◆ operator-()

static Matrix3D operator- ( Matrix3D  lhs,
Matrix3D  rhs 
)
static

Subtraction operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Difference of lhs and rhs .

◆ operator==()

static bool operator== ( Matrix3D  lhs,
Matrix3D  rhs 
)
static

Equality comparison operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
True if lhs == rhs , otherwise false.

◆ ToString()

override string ToString ( )

String conversion.

Returns
string representation of this MatrixD

Property Documentation

◆ this[int row, int column]

double this[int row, int column]
getset

Index access.

Parameters
rowThe row, or "Y" index to get.
columnThe column, or "X" index to get.
Returns
Value at the specified position.