CVB.Net 14.1
AffineMatrix2D Struct Reference

Compacted affine matrix for 2D operations. More...

Public Member Functions

 AffineMatrix2D (Matrix2D m, Point2Dd p)
 Define an affine matrix. More...
 
void Invert ()
 Invert this affine transformation in-place if possible. More...
 
AffineMatrix2D Inverse ()
 Gets the inverse of this affine transformation if possible. More...
 
override string ToString ()
 String conversion. More...
 

Static Public Member Functions

static AffineMatrix2D operator* (AffineMatrix2D lhs, AffineMatrix2D rhs)
 Compose two affine matrices by multiplying them. More...
 

Static Public Attributes

static readonly AffineMatrix2D Identity = new AffineMatrix2D(Matrix2D.Identity, Point2Dd.Empty)
 The identity element.
 

Properties

Point2Dd Translation [get, set]
 The translation part of the affine matrix.
 
Matrix2D Matrix [get, set]
 The transformation part of the affine matrix.
 
double this[int row, int column] [get, set]
 Index access. More...
 
bool IsTranslation [get]
 True if this affine matrix corresponds to a pure translation, false otherwise.
 

Detailed Description

Compacted affine matrix for 2D operations.

The third line is assumed to be 0, 0, 1.

Constructor & Destructor Documentation

◆ AffineMatrix2D()

Define an affine matrix.

Parameters
mtransformation part
ptranslation part

Member Function Documentation

◆ Inverse()

AffineMatrix2D Inverse ( )

Gets the inverse of this affine transformation if possible.

Returns
Inverse.
Exceptions
DivideByZeroExceptionIf the matrix cannot be inverted.

◆ Invert()

void Invert ( )

Invert this affine transformation in-place if possible.

Exceptions
DivideByZeroExceptionIf the matrix cannot be inverted.

◆ operator*()

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

Compose two affine matrices by multiplying them.

Parameters
lhsleft hand side operand
rhsright hand side operand
Returns
composed AffineMatrix struct

◆ ToString()

override string ToString ( )

String conversion.

Returns
string representation of this affine matrix

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.