The Open Toolkit library  1.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
OpenTK.Matrix4x3d Struct Reference

Represents a 3x4 matrix. More...

Inherits IEquatable< Matrix4x3d >.

Public Member Functions

 Matrix4x3d (Vector3d row0, Vector3d row1, Vector3d row2, Vector3d row3)
 Constructs a new instance. More...
 
 Matrix4x3d (double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22, double m30, double m31, double m32)
 Constructs a new instance. More...
 
void Invert ()
 Converts this instance into its inverse. More...
 
override string ToString ()
 Returns a System.String that represents the current Matrix4x3d. More...
 
override int GetHashCode ()
 Returns the hashcode for this instance. More...
 
override bool Equals (object obj)
 Indicates whether this instance and a specified object are equal. More...
 
bool Equals (Matrix4x3d other)
 Indicates whether the current matrix is equal to another matrix. More...
 

Static Public Member Functions

static void CreateFromAxisAngle (Vector3d axis, double angle, out Matrix4x3d result)
 Build a rotation matrix from the specified axis/angle rotation. More...
 
static Matrix4x3d CreateFromAxisAngle (Vector3d axis, double angle)
 Build a rotation matrix from the specified axis/angle rotation. More...
 
static void CreateFromQuaternion (ref Quaternion q, out Matrix4x3d result)
 Builds a rotation matrix from a quaternion. More...
 
static Matrix4x3d CreateFromQuaternion (Quaternion q)
 Builds a rotation matrix from a quaternion. More...
 
static void CreateRotationX (double angle, out Matrix4x3d result)
 Builds a rotation matrix for a rotation around the x-axis. More...
 
static Matrix4x3d CreateRotationX (double angle)
 Builds a rotation matrix for a rotation around the x-axis. More...
 
static void CreateRotationY (double angle, out Matrix4x3d result)
 Builds a rotation matrix for a rotation around the y-axis. More...
 
static Matrix4x3d CreateRotationY (double angle)
 Builds a rotation matrix for a rotation around the y-axis. More...
 
static void CreateRotationZ (double angle, out Matrix4x3d result)
 Builds a rotation matrix for a rotation around the z-axis. More...
 
static Matrix4x3d CreateRotationZ (double angle)
 Builds a rotation matrix for a rotation around the z-axis. More...
 
static void CreateTranslation (double x, double y, double z, out Matrix4x3d result)
 Creates a translation matrix. More...
 
static void CreateTranslation (ref Vector3d vector, out Matrix4x3d result)
 Creates a translation matrix. More...
 
static Matrix4x3d CreateTranslation (double x, double y, double z)
 Creates a translation matrix. More...
 
static Matrix4x3d CreateTranslation (Vector3d vector)
 Creates a translation matrix. More...
 
static Matrix4x3d CreateScale (double scale)
 Build a scaling matrix More...
 
static Matrix4x3d CreateScale (Vector3d scale)
 Build a scaling matrix More...
 
static Matrix4x3d CreateScale (double x, double y, double z)
 Build a scaling matrix More...
 
static Matrix4d Mult (Matrix4x3d left, Matrix3x4d right)
 This isn't quite a multiply, but the result may be useful in some situations. Multiplies two instances. More...
 
static void Mult (ref Matrix4x3d left, ref Matrix3x4d right, out Matrix4d result)
 This isn't quite a multiply, but the result may be useful in some situations. Multiplies two instances. More...
 
static Matrix4x3d Mult (Matrix4x3d left, Matrix4x3d right)
 Multiplies two instances. More...
 
static void Mult (ref Matrix4x3d left, ref Matrix4x3d right, out Matrix4x3d result)
 Multiplies two instances. More...
 
static Matrix4x3d Mult (Matrix4x3d left, double right)
 Multiplies an instance by a scalar. More...
 
static void Mult (ref Matrix4x3d left, double right, out Matrix4x3d result)
 Multiplies an instance by a scalar. More...
 
static Matrix4x3d Add (Matrix4x3d left, Matrix4x3d right)
 Adds two instances. More...
 
static void Add (ref Matrix4x3d left, ref Matrix4x3d right, out Matrix4x3d result)
 Adds two instances. More...
 
static Matrix4x3d Subtract (Matrix4x3d left, Matrix4x3d right)
 Subtracts one instance from another. More...
 
static void Subtract (ref Matrix4x3d left, ref Matrix4x3d right, out Matrix4x3d result)
 Subtracts one instance from another. More...
 
static Matrix4x3d Invert (Matrix4x3d mat)
 Calculate the inverse of the given matrix More...
 
static void Invert (ref Matrix4x3d mat, out Matrix4x3d result)
 Calculate the inverse of the given matrix More...
 
static Matrix3x4d Transpose (Matrix4x3d mat)
 Calculate the transpose of the given matrix More...
 
static void Transpose (ref Matrix4x3d mat, out Matrix3x4d result)
 Calculate the transpose of the given matrix More...
 
static Matrix4d operator* (Matrix4x3d left, Matrix3x4d right)
 Matrix multiplication More...
 
static Matrix4x3d operator* (Matrix4x3d left, Matrix4x3d right)
 Matrix multiplication More...
 
static Matrix4x3d operator* (Matrix4x3d left, double right)
 Matrix-scalar multiplication More...
 
static Matrix4x3d operator+ (Matrix4x3d left, Matrix4x3d right)
 Matrix addition More...
 
static Matrix4x3d operator- (Matrix4x3d left, Matrix4x3d right)
 Matrix subtraction More...
 
static bool operator== (Matrix4x3d left, Matrix4x3d right)
 Compares two instances for equality. More...
 
static bool operator!= (Matrix4x3d left, Matrix4x3d right)
 Compares two instances for inequality. More...
 

Public Attributes

Vector3d Row0
 Top row of the matrix More...
 
Vector3d Row1
 2nd row of the matrix More...
 
Vector3d Row2
 3rd row of the matrix More...
 
Vector3d Row3
 Bottom row of the matrix More...
 

Static Public Attributes

static Matrix4x3d Zero = new Matrix4x3d(Vector3d.Zero, Vector3d.Zero, Vector3d.Zero, Vector3d.Zero)
 The zero matrix More...
 

Properties

Vector4d Column0 [get]
 Gets the first column of this matrix. More...
 
Vector4d Column1 [get]
 Gets the second column of this matrix. More...
 
Vector4d Column2 [get]
 Gets the third column of this matrix. More...
 
double M11 [get, set]
 Gets or sets the value at row 1, column 1 of this instance. More...
 
double M12 [get, set]
 Gets or sets the value at row 1, column 2 of this instance. More...
 
double M13 [get, set]
 Gets or sets the value at row 1, column 3 of this instance. More...
 
double M21 [get, set]
 Gets or sets the value at row 2, column 1 of this instance. More...
 
double M22 [get, set]
 Gets or sets the value at row 2, column 2 of this instance. More...
 
double M23 [get, set]
 Gets or sets the value at row 2, column 3 of this instance. More...
 
double M31 [get, set]
 Gets or sets the value at row 3, column 1 of this instance. More...
 
double M32 [get, set]
 Gets or sets the value at row 3, column 2 of this instance. More...
 
double M33 [get, set]
 Gets or sets the value at row 3, column 3 of this instance. More...
 
double M41 [get, set]
 Gets or sets the value at row 4, column 1 of this instance. More...
 
double M42 [get, set]
 Gets or sets the value at row 4, column 2 of this instance. More...
 
double M43 [get, set]
 Gets or sets the value at row 4, column 3 of this instance. More...
 
Vector3d Diagonal [get, set]
 Gets or sets the values along the main diagonal of the matrix. More...
 
double Trace [get]
 Gets the trace of the matrix, the sum of the values along the diagonal. More...
 
double this[int rowIndex, int columnIndex] [get, set]
 Gets or sets the value at a specified row and column. More...
 

Detailed Description

Represents a 3x4 matrix.

Constructor & Destructor Documentation

OpenTK.Matrix4x3d.Matrix4x3d ( Vector3d  row0,
Vector3d  row1,
Vector3d  row2,
Vector3d  row3 
)

Constructs a new instance.

Parameters
row0Top row of the matrix
row1Second row of the matrix
row2Third row of the matrix
row3Bottom row of the matrix
OpenTK.Matrix4x3d.Matrix4x3d ( double  m00,
double  m01,
double  m02,
double  m10,
double  m11,
double  m12,
double  m20,
double  m21,
double  m22,
double  m30,
double  m31,
double  m32 
)

Constructs a new instance.

Parameters
m00First item of the first row of the matrix.
m01Second item of the first row of the matrix.
m02Third item of the first row of the matrix.
m10First item of the second row of the matrix.
m11Second item of the second row of the matrix.
m12Third item of the second row of the matrix.
m20First item of the third row of the matrix.
m21Second item of the third row of the matrix.
m22Third item of the third row of the matrix.
m30First item of the fourth row of the matrix.
m31Second item of the fourth row of the matrix.
m32Third item of the fourth row of the matrix.

Member Function Documentation

static Matrix4x3d OpenTK.Matrix4x3d.Add ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Adds two instances.

Parameters
leftThe left operand of the addition.
rightThe right operand of the addition.
Returns
A new instance that is the result of the addition.
static void OpenTK.Matrix4x3d.Add ( ref Matrix4x3d  left,
ref Matrix4x3d  right,
out Matrix4x3d  result 
)
static

Adds two instances.

Parameters
leftThe left operand of the addition.
rightThe right operand of the addition.
resultA new instance that is the result of the addition.
static void OpenTK.Matrix4x3d.CreateFromAxisAngle ( Vector3d  axis,
double  angle,
out Matrix4x3d  result 
)
static

Build a rotation matrix from the specified axis/angle rotation.

Parameters
axisThe axis to rotate about.
angleAngle in radians to rotate counter-clockwise (looking in the direction of the given axis).
resultA matrix instance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateFromAxisAngle ( Vector3d  axis,
double  angle 
)
static

Build a rotation matrix from the specified axis/angle rotation.

Parameters
axisThe axis to rotate about.
angleAngle in radians to rotate counter-clockwise (looking in the direction of the given axis).
Returns
A matrix instance.
static void OpenTK.Matrix4x3d.CreateFromQuaternion ( ref Quaternion  q,
out Matrix4x3d  result 
)
static

Builds a rotation matrix from a quaternion.

Parameters
qThe quaternion to rotate by.
resultA matrix instance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateFromQuaternion ( Quaternion  q)
static

Builds a rotation matrix from a quaternion.

Parameters
qThe quaternion to rotate by.
Returns
A matrix instance.
static void OpenTK.Matrix4x3d.CreateRotationX ( double  angle,
out Matrix4x3d  result 
)
static

Builds a rotation matrix for a rotation around the x-axis.

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateRotationX ( double  angle)
static

Builds a rotation matrix for a rotation around the x-axis.

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4dinstance.
static void OpenTK.Matrix4x3d.CreateRotationY ( double  angle,
out Matrix4x3d  result 
)
static

Builds a rotation matrix for a rotation around the y-axis.

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateRotationY ( double  angle)
static

Builds a rotation matrix for a rotation around the y-axis.

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4dinstance.
static void OpenTK.Matrix4x3d.CreateRotationZ ( double  angle,
out Matrix4x3d  result 
)
static

Builds a rotation matrix for a rotation around the z-axis.

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateRotationZ ( double  angle)
static

Builds a rotation matrix for a rotation around the z-axis.

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateScale ( double  scale)
static

Build a scaling matrix

Parameters
scaleSingle scale factor for x,y and z axes
Returns
A scaling matrix
static Matrix4x3d OpenTK.Matrix4x3d.CreateScale ( Vector3d  scale)
static

Build a scaling matrix

Parameters
scaleScale factors for x,y and z axes
Returns
A scaling matrix
static Matrix4x3d OpenTK.Matrix4x3d.CreateScale ( double  x,
double  y,
double  z 
)
static

Build a scaling matrix

Parameters
xScale factor for x-axis
yScale factor for y-axis
zScale factor for z-axis
Returns
A scaling matrix
static void OpenTK.Matrix4x3d.CreateTranslation ( double  x,
double  y,
double  z,
out Matrix4x3d  result 
)
static

Creates a translation matrix.

Parameters
xX translation.
yY translation.
zZ translation.
resultThe resulting Matrix4dinstance.
static void OpenTK.Matrix4x3d.CreateTranslation ( ref Vector3d  vector,
out Matrix4x3d  result 
)
static

Creates a translation matrix.

Parameters
vectorThe translation vector.
resultThe resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateTranslation ( double  x,
double  y,
double  z 
)
static

Creates a translation matrix.

Parameters
xX translation.
yY translation.
zZ translation.
Returns
The resulting Matrix4dinstance.
static Matrix4x3d OpenTK.Matrix4x3d.CreateTranslation ( Vector3d  vector)
static

Creates a translation matrix.

Parameters
vectorThe translation vector.
Returns
The resulting Matrix4dinstance.
override bool OpenTK.Matrix4x3d.Equals ( object  obj)

Indicates whether this instance and a specified object are equal.

Parameters
objThe object to compare tresult.
Returns
True if the instances are equal; false otherwise.
bool OpenTK.Matrix4x3d.Equals ( Matrix4x3d  other)

Indicates whether the current matrix is equal to another matrix.

Parameters
otherAn matrix to compare with this matrix.
Returns
true if the current matrix is equal to the matrix parameter; otherwise, false.
override int OpenTK.Matrix4x3d.GetHashCode ( )

Returns the hashcode for this instance.

Returns
A System.Int32 containing the unique hashcode for this instance.
void OpenTK.Matrix4x3d.Invert ( )

Converts this instance into its inverse.

static Matrix4x3d OpenTK.Matrix4x3d.Invert ( Matrix4x3d  mat)
static

Calculate the inverse of the given matrix

Parameters
matThe matrix to invert
Returns
The inverse of the given matrix if it has one, or the input if it is singular
Exceptions
InvalidOperationExceptionThrown if the Matrix4 is singular.
static void OpenTK.Matrix4x3d.Invert ( ref Matrix4x3d  mat,
out Matrix4x3d  result 
)
static

Calculate the inverse of the given matrix

Parameters
matThe matrix to invert
resultThe inverse of the given matrix if it has one, or the input if it is singular
Exceptions
InvalidOperationExceptionThrown if the Matrix4 is singular.
static Matrix4d OpenTK.Matrix4x3d.Mult ( Matrix4x3d  left,
Matrix3x4d  right 
)
static

This isn't quite a multiply, but the result may be useful in some situations. Multiplies two instances.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
Returns
A new instance that is the result of the multiplication
static void OpenTK.Matrix4x3d.Mult ( ref Matrix4x3d  left,
ref Matrix3x4d  right,
out Matrix4d  result 
)
static

This isn't quite a multiply, but the result may be useful in some situations. Multiplies two instances.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
resultA new instance that is the result of the multiplication
static Matrix4x3d OpenTK.Matrix4x3d.Mult ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Multiplies two instances.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
Returns
A new instance that is the result of the multiplication
static void OpenTK.Matrix4x3d.Mult ( ref Matrix4x3d  left,
ref Matrix4x3d  right,
out Matrix4x3d  result 
)
static

Multiplies two instances.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
resultA new instance that is the result of the multiplication
static Matrix4x3d OpenTK.Matrix4x3d.Mult ( Matrix4x3d  left,
double  right 
)
static

Multiplies an instance by a scalar.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
Returns
A new instance that is the result of the multiplication
static void OpenTK.Matrix4x3d.Mult ( ref Matrix4x3d  left,
double  right,
out Matrix4x3d  result 
)
static

Multiplies an instance by a scalar.

Parameters
leftThe left operand of the multiplication.
rightThe right operand of the multiplication.
resultA new instance that is the result of the multiplication
static bool OpenTK.Matrix4x3d.operator!= ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Compares two instances for inequality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left does not equal right; false otherwise.
static Matrix4d OpenTK.Matrix4x3d.operator* ( Matrix4x3d  left,
Matrix3x4d  right 
)
static

Matrix multiplication

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4d which holds the result of the multiplication
static Matrix4x3d OpenTK.Matrix4x3d.operator* ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Matrix multiplication

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4x3d which holds the result of the multiplication
static Matrix4x3d OpenTK.Matrix4x3d.operator* ( Matrix4x3d  left,
double  right 
)
static

Matrix-scalar multiplication

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4x3d which holds the result of the multiplication
static Matrix4x3d OpenTK.Matrix4x3d.operator+ ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Matrix addition

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4x3d which holds the result of the addition
static Matrix4x3d OpenTK.Matrix4x3d.operator- ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Matrix subtraction

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4x3d which holds the result of the subtraction
static bool OpenTK.Matrix4x3d.operator== ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.
static Matrix4x3d OpenTK.Matrix4x3d.Subtract ( Matrix4x3d  left,
Matrix4x3d  right 
)
static

Subtracts one instance from another.

Parameters
leftThe left operand of the subraction.
rightThe right operand of the subraction.
Returns
A new instance that is the result of the subraction.
static void OpenTK.Matrix4x3d.Subtract ( ref Matrix4x3d  left,
ref Matrix4x3d  right,
out Matrix4x3d  result 
)
static

Subtracts one instance from another.

Parameters
leftThe left operand of the subraction.
rightThe right operand of the subraction.
resultA new instance that is the result of the subraction.
override string OpenTK.Matrix4x3d.ToString ( )

Returns a System.String that represents the current Matrix4x3d.

Returns
The string representation of the matrix.
static Matrix3x4d OpenTK.Matrix4x3d.Transpose ( Matrix4x3d  mat)
static

Calculate the transpose of the given matrix

Parameters
matThe matrix to transpose
Returns
The transpose of the given matrix
static void OpenTK.Matrix4x3d.Transpose ( ref Matrix4x3d  mat,
out Matrix3x4d  result 
)
static

Calculate the transpose of the given matrix

Parameters
matThe matrix to transpose
resultThe result of the calculation

Member Data Documentation

Vector3d OpenTK.Matrix4x3d.Row0

Top row of the matrix

Vector3d OpenTK.Matrix4x3d.Row1

2nd row of the matrix

Vector3d OpenTK.Matrix4x3d.Row2

3rd row of the matrix

Vector3d OpenTK.Matrix4x3d.Row3

Bottom row of the matrix

Matrix4x3d OpenTK.Matrix4x3d.Zero = new Matrix4x3d(Vector3d.Zero, Vector3d.Zero, Vector3d.Zero, Vector3d.Zero)
static

The zero matrix

Property Documentation

Vector4d OpenTK.Matrix4x3d.Column0
get

Gets the first column of this matrix.

Vector4d OpenTK.Matrix4x3d.Column1
get

Gets the second column of this matrix.

Vector4d OpenTK.Matrix4x3d.Column2
get

Gets the third column of this matrix.

Vector3d OpenTK.Matrix4x3d.Diagonal
getset

Gets or sets the values along the main diagonal of the matrix.

double OpenTK.Matrix4x3d.M11
getset

Gets or sets the value at row 1, column 1 of this instance.

double OpenTK.Matrix4x3d.M12
getset

Gets or sets the value at row 1, column 2 of this instance.

double OpenTK.Matrix4x3d.M13
getset

Gets or sets the value at row 1, column 3 of this instance.

double OpenTK.Matrix4x3d.M21
getset

Gets or sets the value at row 2, column 1 of this instance.

double OpenTK.Matrix4x3d.M22
getset

Gets or sets the value at row 2, column 2 of this instance.

double OpenTK.Matrix4x3d.M23
getset

Gets or sets the value at row 2, column 3 of this instance.

double OpenTK.Matrix4x3d.M31
getset

Gets or sets the value at row 3, column 1 of this instance.

double OpenTK.Matrix4x3d.M32
getset

Gets or sets the value at row 3, column 2 of this instance.

double OpenTK.Matrix4x3d.M33
getset

Gets or sets the value at row 3, column 3 of this instance.

double OpenTK.Matrix4x3d.M41
getset

Gets or sets the value at row 4, column 1 of this instance.

double OpenTK.Matrix4x3d.M42
getset

Gets or sets the value at row 4, column 2 of this instance.

double OpenTK.Matrix4x3d.M43
getset

Gets or sets the value at row 4, column 3 of this instance.

double OpenTK.Matrix4x3d.this[int rowIndex, int columnIndex]
getset

Gets or sets the value at a specified row and column.

double OpenTK.Matrix4x3d.Trace
get

Gets the trace of the matrix, the sum of the values along the diagonal.