The Open Toolkit library  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
OpenTK.Matrix4d Struct Reference

Represents a 4x4 matrix containing 3D rotation, scale, transform, and projection with double-precision components. More...

Inherits IEquatable< Matrix4d >.

Public Member Functions

 Matrix4d (Vector4d row0, Vector4d row1, Vector4d row2, Vector4d row3)
 Constructs a new instance. More...
 
 Matrix4d (double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33)
 Constructs a new instance. More...
 
void Invert ()
 Converts this instance into its inverse. More...
 
void Transpose ()
 Converts this instance into its transpose. More...
 
Matrix4d Normalized ()
 Returns a normalised copy of this instance. More...
 
void Normalize ()
 Divides each element in the Matrix by the Determinant. More...
 
Matrix4d Inverted ()
 Returns an inverted copy of this instance. More...
 
Matrix4d ClearTranslation ()
 Returns a copy of this Matrix4d without translation. More...
 
Matrix4d ClearScale ()
 Returns a copy of this Matrix4d without scale. More...
 
Matrix4d ClearRotation ()
 Returns a copy of this Matrix4d without rotation. More...
 
Matrix4d ClearProjection ()
 Returns a copy of this Matrix4d without projection. More...
 
Vector3d ExtractTranslation ()
 Returns the translation component of this instance. More...
 
Vector3d ExtractScale ()
 Returns the scale component of this instance. More...
 
Quaterniond ExtractRotation (bool row_normalise=true)
 Returns the rotation component of this instance. Quite slow. More...
 
Vector4d ExtractProjection ()
 Returns the projection component of this instance. More...
 
override string ToString ()
 Returns a System.String that represents the current Matrix44. 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 (Matrix4d other)
 Indicates whether the current matrix is equal to another matrix. More...
 

Static Public Member Functions

static void CreateFromAxisAngle (Vector3d axis, double angle, out Matrix4d result)
 Build a rotation matrix from the specified axis/angle rotation. More...
 
static Matrix4d CreateFromAxisAngle (Vector3d axis, double angle)
 Build a rotation matrix from the specified axis/angle rotation. More...
 
static void CreateRotationX (double angle, out Matrix4d result)
 Builds a rotation matrix for a rotation around the x-axis. More...
 
static Matrix4d CreateRotationX (double angle)
 Builds a rotation matrix for a rotation around the x-axis. More...
 
static void CreateRotationY (double angle, out Matrix4d result)
 Builds a rotation matrix for a rotation around the y-axis. More...
 
static Matrix4d CreateRotationY (double angle)
 Builds a rotation matrix for a rotation around the y-axis. More...
 
static void CreateRotationZ (double angle, out Matrix4d result)
 Builds a rotation matrix for a rotation around the z-axis. More...
 
static Matrix4d 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 Matrix4d result)
 Creates a translation matrix. More...
 
static void CreateTranslation (ref Vector3d vector, out Matrix4d result)
 Creates a translation matrix. More...
 
static Matrix4d CreateTranslation (double x, double y, double z)
 Creates a translation matrix. More...
 
static Matrix4d CreateTranslation (Vector3d vector)
 Creates a translation matrix. More...
 
static void CreateOrthographic (double width, double height, double zNear, double zFar, out Matrix4d result)
 Creates an orthographic projection matrix. More...
 
static Matrix4d CreateOrthographic (double width, double height, double zNear, double zFar)
 Creates an orthographic projection matrix. More...
 
static void CreateOrthographicOffCenter (double left, double right, double bottom, double top, double zNear, double zFar, out Matrix4d result)
 Creates an orthographic projection matrix. More...
 
static Matrix4d CreateOrthographicOffCenter (double left, double right, double bottom, double top, double zNear, double zFar)
 Creates an orthographic projection matrix. More...
 
static void CreatePerspectiveFieldOfView (double fovy, double aspect, double zNear, double zFar, out Matrix4d result)
 Creates a perspective projection matrix. More...
 
static Matrix4d CreatePerspectiveFieldOfView (double fovy, double aspect, double zNear, double zFar)
 Creates a perspective projection matrix. More...
 
static void CreatePerspectiveOffCenter (double left, double right, double bottom, double top, double zNear, double zFar, out Matrix4d result)
 Creates an perspective projection matrix. More...
 
static Matrix4d CreatePerspectiveOffCenter (double left, double right, double bottom, double top, double zNear, double zFar)
 Creates an perspective projection matrix. More...
 
static void CreateFromQuaternion (ref Quaterniond q, ref Matrix4d m)
 Build a rotation matrix from the specified quaternion. More...
 
static Matrix4d CreateFromQuaternion (ref Quaterniond q)
 Build a rotation matrix from the specified quaternion. More...
 
static Matrix4d Translation (Vector3d trans)
 Build a translation matrix with the given translation More...
 
static Matrix4d Translation (double x, double y, double z)
 Build a translation matrix with the given translation More...
 
static Matrix4d Scale (double scale)
 Build a scaling matrix More...
 
static Matrix4d Scale (Vector3d scale)
 Build a scaling matrix More...
 
static Matrix4d Scale (double x, double y, double z)
 Build a scaling matrix More...
 
static Matrix4d RotateX (double angle)
 Build a rotation matrix that rotates about the x-axis More...
 
static Matrix4d RotateY (double angle)
 Build a rotation matrix that rotates about the y-axis More...
 
static Matrix4d RotateZ (double angle)
 Build a rotation matrix that rotates about the z-axis More...
 
static Matrix4d Rotate (Vector3d axis, double angle)
 Build a rotation matrix to rotate about the given axis More...
 
static Matrix4d Rotate (Quaterniond q)
 Build a rotation matrix from a quaternion More...
 
static Matrix4d LookAt (Vector3d eye, Vector3d target, Vector3d up)
 Build a world space to camera space matrix More...
 
static Matrix4d LookAt (double eyeX, double eyeY, double eyeZ, double targetX, double targetY, double targetZ, double upX, double upY, double upZ)
 Build a world space to camera space matrix More...
 
static Matrix4d Frustum (double left, double right, double bottom, double top, double near, double far)
 Build a projection matrix More...
 
static Matrix4d Perspective (double fovy, double aspect, double near, double far)
 Build a projection matrix More...
 
static Matrix4d Add (Matrix4d left, Matrix4d right)
 Adds two instances. More...
 
static void Add (ref Matrix4d left, ref Matrix4d right, out Matrix4d result)
 Adds two instances. More...
 
static Matrix4d Subtract (Matrix4d left, Matrix4d right)
 Subtracts one instance from another. More...
 
static void Subtract (ref Matrix4d left, ref Matrix4d right, out Matrix4d result)
 Subtracts one instance from another. More...
 
static Matrix4d Mult (Matrix4d left, Matrix4d right)
 Multiplies two instances. More...
 
static void Mult (ref Matrix4d left, ref Matrix4d right, out Matrix4d result)
 Multiplies two instances. More...
 
static Matrix4d Mult (Matrix4d left, double right)
 Multiplies an instance by a scalar. More...
 
static void Mult (ref Matrix4d left, double right, out Matrix4d result)
 Multiplies an instance by a scalar. More...
 
static Matrix4d Invert (Matrix4d mat)
 Calculate the inverse of the given matrix More...
 
static Matrix4d Transpose (Matrix4d mat)
 Calculate the transpose of the given matrix More...
 
static void Transpose (ref Matrix4d mat, out Matrix4d result)
 Calculate the transpose of the given matrix More...
 
static Matrix4d operator* (Matrix4d left, Matrix4d right)
 Matrix multiplication More...
 
static Matrix4d operator* (Matrix4d left, float right)
 Matrix-scalar multiplication More...
 
static Matrix4d operator+ (Matrix4d left, Matrix4d right)
 Matrix addition More...
 
static Matrix4d operator- (Matrix4d left, Matrix4d right)
 Matrix subtraction More...
 
static bool operator== (Matrix4d left, Matrix4d right)
 Compares two instances for equality. More...
 
static bool operator!= (Matrix4d left, Matrix4d right)
 Compares two instances for inequality. More...
 

Public Attributes

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

Static Public Attributes

static Matrix4d Identity = new Matrix4d(Vector4d.UnitX, Vector4d.UnitY, Vector4d.UnitZ, Vector4d.UnitW)
 The identity matrix More...
 

Properties

double Determinant [get]
 The determinant of this matrix More...
 
Vector4d Column0 [get, set]
 The first column of this matrix More...
 
Vector4d Column1 [get, set]
 The second column of this matrix More...
 
Vector4d Column2 [get, set]
 The third column of this matrix More...
 
Vector4d Column3 [get, set]
 The fourth 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 M14 [get, set]
 Gets or sets the value at row 1, column 4 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 M24 [get, set]
 Gets or sets the value at row 2, column 4 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 M34 [get, set]
 Gets or sets the value at row 3, column 4 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...
 
double M44 [get, set]
 Gets or sets the value at row 4, column 4 of this instance. More...
 
Vector4d 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 4x4 matrix containing 3D rotation, scale, transform, and projection with double-precision components.

See Also
Matrix4

Constructor & Destructor Documentation

OpenTK.Matrix4d.Matrix4d ( Vector4d  row0,
Vector4d  row1,
Vector4d  row2,
Vector4d  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.Matrix4d.Matrix4d ( double  m00,
double  m01,
double  m02,
double  m03,
double  m10,
double  m11,
double  m12,
double  m13,
double  m20,
double  m21,
double  m22,
double  m23,
double  m30,
double  m31,
double  m32,
double  m33 
)

Constructs a new instance.

Parameters
m00First item of the first row.
m01Second item of the first row.
m02Third item of the first row.
m03Fourth item of the first row.
m10First item of the second row.
m11Second item of the second row.
m12Third item of the second row.
m13Fourth item of the second row.
m20First item of the third row.
m21Second item of the third row.
m22Third item of the third row.
m23First item of the third row.
m30Fourth item of the fourth row.
m31Second item of the fourth row.
m32Third item of the fourth row.
m33Fourth item of the fourth row.

Member Function Documentation

static Matrix4d OpenTK.Matrix4d.Add ( Matrix4d  left,
Matrix4d  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.Matrix4d.Add ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  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.
Matrix4d OpenTK.Matrix4d.ClearProjection ( )

Returns a copy of this Matrix4d without projection.

Matrix4d OpenTK.Matrix4d.ClearRotation ( )

Returns a copy of this Matrix4d without rotation.

Matrix4d OpenTK.Matrix4d.ClearScale ( )

Returns a copy of this Matrix4d without scale.

Matrix4d OpenTK.Matrix4d.ClearTranslation ( )

Returns a copy of this Matrix4d without translation.

static void OpenTK.Matrix4d.CreateFromAxisAngle ( Vector3d  axis,
double  angle,
out Matrix4d  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 Matrix4d OpenTK.Matrix4d.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.Matrix4d.CreateFromQuaternion ( ref Quaterniond  q,
ref Matrix4d  m 
)
static

Build a rotation matrix from the specified quaternion.

Parameters
qQuaternion to translate.
mMatrix result.
static Matrix4d OpenTK.Matrix4d.CreateFromQuaternion ( ref Quaterniond  q)
static

Build a rotation matrix from the specified quaternion.

Parameters
qQuaternion to translate.
Returns
A matrix instance.
static void OpenTK.Matrix4d.CreateOrthographic ( double  width,
double  height,
double  zNear,
double  zFar,
out Matrix4d  result 
)
static

Creates an orthographic projection matrix.

Parameters
widthThe width of the projection volume.
heightThe height of the projection volume.
zNearThe near edge of the projection volume.
zFarThe far edge of the projection volume.
resultThe resulting Matrix4d instance.
static Matrix4d OpenTK.Matrix4d.CreateOrthographic ( double  width,
double  height,
double  zNear,
double  zFar 
)
static

Creates an orthographic projection matrix.

Parameters
widthThe width of the projection volume.
heightThe height of the projection volume.
zNearThe near edge of the projection volume.
zFarThe far edge of the projection volume.

<rereturns>The resulting Matrix4d instance.</rereturns>

static void OpenTK.Matrix4d.CreateOrthographicOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar,
out Matrix4d  result 
)
static

Creates an orthographic projection matrix.

Parameters
leftThe left edge of the projection volume.
rightThe right edge of the projection volume.
bottomThe bottom edge of the projection volume.
topThe top edge of the projection volume.
zNearThe near edge of the projection volume.
zFarThe far edge of the projection volume.
resultThe resulting Matrix4d instance.
static Matrix4d OpenTK.Matrix4d.CreateOrthographicOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
static

Creates an orthographic projection matrix.

Parameters
leftThe left edge of the projection volume.
rightThe right edge of the projection volume.
bottomThe bottom edge of the projection volume.
topThe top edge of the projection volume.
zNearThe near edge of the projection volume.
zFarThe far edge of the projection volume.
Returns
The resulting Matrix4d instance.
static void OpenTK.Matrix4d.CreatePerspectiveFieldOfView ( double  fovy,
double  aspect,
double  zNear,
double  zFar,
out Matrix4d  result 
)
static

Creates a perspective projection matrix.

Parameters
fovyAngle of the field of view in the y direction (in radians)
aspectAspect ratio of the view (width / height)
zNearDistance to the near clip plane
zFarDistance to the far clip plane
resultA projection matrix that transforms camera space to raster space
Exceptions
System.ArgumentOutOfRangeExceptionThrown under the following conditions:
  • fovy is zero, less than zero or larger than Math.PI
  • aspect is negative or zero
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
static Matrix4d OpenTK.Matrix4d.CreatePerspectiveFieldOfView ( double  fovy,
double  aspect,
double  zNear,
double  zFar 
)
static

Creates a perspective projection matrix.

Parameters
fovyAngle of the field of view in the y direction (in radians)
aspectAspect ratio of the view (width / height)
zNearDistance to the near clip plane
zFarDistance to the far clip plane
Returns
A projection matrix that transforms camera space to raster space
Exceptions
System.ArgumentOutOfRangeExceptionThrown under the following conditions:
  • fovy is zero, less than zero or larger than Math.PI
  • aspect is negative or zero
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
static void OpenTK.Matrix4d.CreatePerspectiveOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar,
out Matrix4d  result 
)
static

Creates an perspective projection matrix.

Parameters
leftLeft edge of the view frustum
rightRight edge of the view frustum
bottomBottom edge of the view frustum
topTop edge of the view frustum
zNearDistance to the near clip plane
zFarDistance to the far clip plane
resultA projection matrix that transforms camera space to raster space
Exceptions
System.ArgumentOutOfRangeExceptionThrown under the following conditions:
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
static Matrix4d OpenTK.Matrix4d.CreatePerspectiveOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
static

Creates an perspective projection matrix.

Parameters
leftLeft edge of the view frustum
rightRight edge of the view frustum
bottomBottom edge of the view frustum
topTop edge of the view frustum
zNearDistance to the near clip plane
zFarDistance to the far clip plane
Returns
A projection matrix that transforms camera space to raster space
Exceptions
System.ArgumentOutOfRangeExceptionThrown under the following conditions:
  • zNear is negative or zero
  • zFar is negative or zero
  • zNear is larger than zFar
static void OpenTK.Matrix4d.CreateRotationX ( double  angle,
out Matrix4d  result 
)
static

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.
static Matrix4d OpenTK.Matrix4d.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 Matrix4d instance.
static void OpenTK.Matrix4d.CreateRotationY ( double  angle,
out Matrix4d  result 
)
static

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.
static Matrix4d OpenTK.Matrix4d.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 Matrix4d instance.
static void OpenTK.Matrix4d.CreateRotationZ ( double  angle,
out Matrix4d  result 
)
static

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.
static Matrix4d OpenTK.Matrix4d.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 Matrix4d instance.
static void OpenTK.Matrix4d.CreateTranslation ( double  x,
double  y,
double  z,
out Matrix4d  result 
)
static

Creates a translation matrix.

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

Creates a translation matrix.

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

Creates a translation matrix.

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

Creates a translation matrix.

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

Indicates whether this instance and a specified object are equal.

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

Indicates whether the current matrix is equal to another matrix.

Parameters
otherA matrix to compare with this matrix.
Returns
true if the current matrix is equal to the matrix parameter; otherwise, false.
Vector4d OpenTK.Matrix4d.ExtractProjection ( )

Returns the projection component of this instance.

Quaterniond OpenTK.Matrix4d.ExtractRotation ( bool  row_normalise = true)

Returns the rotation component of this instance. Quite slow.

Parameters
row_normaliseWhether the method should row-normalise (i.e. remove scale from) the Matrix. Pass false if you know it's already normalised.
Vector3d OpenTK.Matrix4d.ExtractScale ( )

Returns the scale component of this instance.

Vector3d OpenTK.Matrix4d.ExtractTranslation ( )

Returns the translation component of this instance.

static Matrix4d OpenTK.Matrix4d.Frustum ( double  left,
double  right,
double  bottom,
double  top,
double  near,
double  far 
)
static

Build a projection matrix

Parameters
leftLeft edge of the view frustum
rightRight edge of the view frustum
bottomBottom edge of the view frustum
topTop edge of the view frustum
nearDistance to the near clip plane
farDistance to the far clip plane
Returns
A projection matrix that transforms camera space to raster space
override int OpenTK.Matrix4d.GetHashCode ( )

Returns the hashcode for this instance.

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

Converts this instance into its inverse.

static Matrix4d OpenTK.Matrix4d.Invert ( Matrix4d  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 Matrix4d is singular.
Matrix4d OpenTK.Matrix4d.Inverted ( )

Returns an inverted copy of this instance.

static Matrix4d OpenTK.Matrix4d.LookAt ( Vector3d  eye,
Vector3d  target,
Vector3d  up 
)
static

Build a world space to camera space matrix

Parameters
eyeEye (camera) position in world space
targetTarget position in world space
upUp vector in world space (should not be parallel to the camera direction, that is target - eye)
Returns
A Matrix that transforms world space to camera space
static Matrix4d OpenTK.Matrix4d.LookAt ( double  eyeX,
double  eyeY,
double  eyeZ,
double  targetX,
double  targetY,
double  targetZ,
double  upX,
double  upY,
double  upZ 
)
static

Build a world space to camera space matrix

Parameters
eyeXEye (camera) position in world space
eyeYEye (camera) position in world space
eyeZEye (camera) position in world space
targetXTarget position in world space
targetYTarget position in world space
targetZTarget position in world space
upXUp vector in world space (should not be parallel to the camera direction, that is target - eye)
upYUp vector in world space (should not be parallel to the camera direction, that is target - eye)
upZUp vector in world space (should not be parallel to the camera direction, that is target - eye)
Returns
A Matrix4 that transforms world space to camera space
static Matrix4d OpenTK.Matrix4d.Mult ( Matrix4d  left,
Matrix4d  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.Matrix4d.Mult ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  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 Matrix4d OpenTK.Matrix4d.Mult ( Matrix4d  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.Matrix4d.Mult ( ref Matrix4d  left,
double  right,
out Matrix4d  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
void OpenTK.Matrix4d.Normalize ( )

Divides each element in the Matrix by the Determinant.

Matrix4d OpenTK.Matrix4d.Normalized ( )

Returns a normalised copy of this instance.

static bool OpenTK.Matrix4d.operator!= ( Matrix4d  left,
Matrix4d  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.Matrix4d.operator* ( Matrix4d  left,
Matrix4d  right 
)
static

Matrix multiplication

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

Matrix-scalar multiplication

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

Matrix addition

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

Matrix subtraction

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

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.
static Matrix4d OpenTK.Matrix4d.Perspective ( double  fovy,
double  aspect,
double  near,
double  far 
)
static

Build a projection matrix

Parameters
fovyAngle of the field of view in the y direction (in radians)
aspectAspect ratio of the view (width / height)
nearDistance to the near clip plane
farDistance to the far clip plane
Returns
A projection matrix that transforms camera space to raster space
static Matrix4d OpenTK.Matrix4d.Rotate ( Vector3d  axis,
double  angle 
)
static

Build a rotation matrix to rotate about the given axis

Parameters
axisthe axis to rotate about
angleangle in radians to rotate counter-clockwise (looking in the direction of the given axis)
Returns
A rotation matrix
static Matrix4d OpenTK.Matrix4d.Rotate ( Quaterniond  q)
static

Build a rotation matrix from a quaternion

Parameters
qthe quaternion
Returns
A rotation matrix
static Matrix4d OpenTK.Matrix4d.RotateX ( double  angle)
static

Build a rotation matrix that rotates about the x-axis

Parameters
angleangle in radians to rotate counter-clockwise around the x-axis
Returns
A rotation matrix
static Matrix4d OpenTK.Matrix4d.RotateY ( double  angle)
static

Build a rotation matrix that rotates about the y-axis

Parameters
angleangle in radians to rotate counter-clockwise around the y-axis
Returns
A rotation matrix
static Matrix4d OpenTK.Matrix4d.RotateZ ( double  angle)
static

Build a rotation matrix that rotates about the z-axis

Parameters
angleangle in radians to rotate counter-clockwise around the z-axis
Returns
A rotation matrix
static Matrix4d OpenTK.Matrix4d.Scale ( double  scale)
static

Build a scaling matrix

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

Build a scaling matrix

Parameters
scaleScale factors for x,y and z axes
Returns
A scaling matrix
static Matrix4d OpenTK.Matrix4d.Scale ( 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 Matrix4d OpenTK.Matrix4d.Subtract ( Matrix4d  left,
Matrix4d  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.Matrix4d.Subtract ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  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.Matrix4d.ToString ( )

Returns a System.String that represents the current Matrix44.

Returns
static Matrix4d OpenTK.Matrix4d.Translation ( Vector3d  trans)
static

Build a translation matrix with the given translation

Parameters
transThe vector to translate along
Returns
A Translation matrix
static Matrix4d OpenTK.Matrix4d.Translation ( double  x,
double  y,
double  z 
)
static

Build a translation matrix with the given translation

Parameters
xX translation
yY translation
zZ translation
Returns
A Translation matrix
void OpenTK.Matrix4d.Transpose ( )

Converts this instance into its transpose.

static Matrix4d OpenTK.Matrix4d.Transpose ( Matrix4d  mat)
static

Calculate the transpose of the given matrix

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

Calculate the transpose of the given matrix

Parameters
matThe matrix to transpose
resultThe result of the calculation

Member Data Documentation

Matrix4d OpenTK.Matrix4d.Identity = new Matrix4d(Vector4d.UnitX, Vector4d.UnitY, Vector4d.UnitZ, Vector4d.UnitW)
static

The identity matrix

Vector4d OpenTK.Matrix4d.Row0

Top row of the matrix

Vector4d OpenTK.Matrix4d.Row1

2nd row of the matrix

Vector4d OpenTK.Matrix4d.Row2

3rd row of the matrix

Vector4d OpenTK.Matrix4d.Row3

Bottom row of the matrix

Property Documentation

Vector4d OpenTK.Matrix4d.Column0
getset

The first column of this matrix

Vector4d OpenTK.Matrix4d.Column1
getset

The second column of this matrix

Vector4d OpenTK.Matrix4d.Column2
getset

The third column of this matrix

Vector4d OpenTK.Matrix4d.Column3
getset

The fourth column of this matrix

double OpenTK.Matrix4d.Determinant
get

The determinant of this matrix

Vector4d OpenTK.Matrix4d.Diagonal
getset

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

double OpenTK.Matrix4d.M11
getset

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

double OpenTK.Matrix4d.M12
getset

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

double OpenTK.Matrix4d.M13
getset

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

double OpenTK.Matrix4d.M14
getset

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

double OpenTK.Matrix4d.M21
getset

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

double OpenTK.Matrix4d.M22
getset

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

double OpenTK.Matrix4d.M23
getset

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

double OpenTK.Matrix4d.M24
getset

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

double OpenTK.Matrix4d.M31
getset

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

double OpenTK.Matrix4d.M32
getset

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

double OpenTK.Matrix4d.M33
getset

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

double OpenTK.Matrix4d.M34
getset

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

double OpenTK.Matrix4d.M41
getset

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

double OpenTK.Matrix4d.M42
getset

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

double OpenTK.Matrix4d.M43
getset

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

double OpenTK.Matrix4d.M44
getset

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

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

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

double OpenTK.Matrix4d.Trace
get

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