VR-Link C# API Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties
makVrl.Matrix4d Struct Reference

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

+ Inheritance diagram for makVrl.Matrix4d:
+ Collaboration diagram for makVrl.Matrix4d:

Public Member Functions

 Matrix4d (Vector4d row0, Vector4d row1, Vector4d row2, Vector4d row3)
 Constructs a new instance.
 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.
void Invert ()
 Converts this instance into its inverse.
void Transpose ()
 Converts this instance into its transpose.
Matrix4d Normalized ()
 Returns a normalised copy of this instance.
void Normalize ()
 Divides each element in the Matrix by the Determinant.
Matrix4d Inverted ()
 Returns an inverted copy of this instance.
Matrix4d ClearTranslation ()
 Returns a copy of this Matrix4d without translation.
Matrix4d ClearScale ()
 Returns a copy of this Matrix4d without scale.
Matrix4d ClearRotation ()
 Returns a copy of this Matrix4d without rotation.
Matrix4d ClearProjection ()
 Returns a copy of this Matrix4d without projection.
Vector3d ExtractTranslation ()
 Returns the translation component of this instance.
Vector3d ExtractScale ()
 Returns the scale component of this instance.
Quaterniond ExtractRotation (bool row_normalise=true)
 Returns the rotation component of this instance.
Vector4d ExtractProjection ()
 Returns the projection component of this instance.
override string ToString ()
 Returns a System.String that represents the current Matrix44.
override int GetHashCode ()
 Returns the hashcode for this instance.
override bool Equals (object obj)
 Indicates whether this instance and a specified object are equal.
bool Equals (Matrix4d other)
 Indicates whether the current matrix is equal to another matrix.

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

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

Properties

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

Detailed Description

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

See Also
Matrix4

Constructor & Destructor Documentation

makVrl.Matrix4d.Matrix4d ( Vector4d  row0,
Vector4d  row1,
Vector4d  row2,
Vector4d  row3 
)
inline

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

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Matrix4d.Row3.

Referenced by makVrl.Matrix4d.CreateFromAxisAngle(), makVrl.Matrix4d.CreateOrthographicOffCenter(), makVrl.Matrix4d.CreatePerspectiveOffCenter(), makVrl.Matrix4d.Frustum(), makVrl.Matrix4d.LookAt(), and makVrl.Matrix4d.Transpose().

makVrl.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 
)
inline

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.

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Matrix4d.Row3.

Member Function Documentation

static Matrix4d makVrl.Matrix4d.Add ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

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.

Referenced by makVrl.Matrix4d.operator+().

static void makVrl.Matrix4d.Add ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  result 
)
inlinestatic

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.

References makVrl.Matrix4d.Row0.

Matrix4d makVrl.Matrix4d.ClearProjection ( )
inline

Returns a copy of this Matrix4d without projection.

References makVrl.Matrix4d.Column3, and makVrl.Vector4d.Zero.

Matrix4d makVrl.Matrix4d.ClearRotation ( )
inline
Matrix4d makVrl.Matrix4d.ClearScale ( )
inline
Matrix4d makVrl.Matrix4d.ClearTranslation ( )
inline

Returns a copy of this Matrix4d without translation.

References makVrl.Matrix4d.Row3, makVrl.Vector4d.Xyz, and makVrl.Vector3d.Zero.

static void makVrl.Matrix4d.CreateFromAxisAngle ( Vector3d  axis,
double  angle,
out Matrix4d  result 
)
inlinestatic

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.

References makVrl.Matrix4d.Matrix4d(), makVrl.Vector3d.Normalize(), makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Matrix4d.CreateFromAxisAngle().

static Matrix4d makVrl.Matrix4d.CreateFromAxisAngle ( Vector3d  axis,
double  angle 
)
inlinestatic

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.

References makVrl.Matrix4d.CreateFromAxisAngle().

static void makVrl.Matrix4d.CreateFromQuaternion ( ref Quaternion  q,
ref Matrix4  m 
)
inlinestatic

Build a rotation matrix from the specified quaternion.

Parameters
qQuaternion to translate.
mMatrix result.

References makVrl.Matrix4.Identity, and makVrl.Matrix4.M11.

static Matrix4 makVrl.Matrix4d.CreateFromQuaternion ( ref Quaternion  q)
inlinestatic

Build a rotation matrix from the specified quaternion.

Parameters
qQuaternion to translate.
Returns
A matrix instance.

References makVrl.Matrix4.Identity, makVrl.Matrix4.M11, makVrl.Matrix4.M12, makVrl.Matrix4.M13, makVrl.Matrix4.M21, makVrl.Matrix4.M22, makVrl.Matrix4.M23, makVrl.Matrix4.M31, makVrl.Matrix4.M32, and makVrl.Matrix4.M33.

static void makVrl.Matrix4d.CreateOrthographic ( double  width,
double  height,
double  zNear,
double  zFar,
out Matrix4d  result 
)
inlinestatic

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.

References makVrl.Matrix4d.CreateOrthographicOffCenter().

static Matrix4d makVrl.Matrix4d.CreateOrthographic ( double  width,
double  height,
double  zNear,
double  zFar 
)
inlinestatic

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>

References makVrl.Matrix4d.CreateOrthographicOffCenter().

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

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.

References makVrl.Matrix4d.Matrix4d().

Referenced by makVrl.Matrix4d.CreateOrthographic(), and makVrl.Matrix4d.CreateOrthographicOffCenter().

static Matrix4d makVrl.Matrix4d.CreateOrthographicOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
inlinestatic

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.

References makVrl.Matrix4d.CreateOrthographicOffCenter().

static void makVrl.Matrix4d.CreatePerspectiveFieldOfView ( double  fovy,
double  aspect,
double  zNear,
double  zFar,
out Matrix4d  result 
)
inlinestatic

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

References makVrl.Matrix4d.CreatePerspectiveOffCenter().

Referenced by makVrl.Matrix4d.CreatePerspectiveFieldOfView().

static Matrix4d makVrl.Matrix4d.CreatePerspectiveFieldOfView ( double  fovy,
double  aspect,
double  zNear,
double  zFar 
)
inlinestatic

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

References makVrl.Matrix4d.CreatePerspectiveFieldOfView().

static void makVrl.Matrix4d.CreatePerspectiveOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar,
out Matrix4d  result 
)
inlinestatic

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

References makVrl.Matrix4d.Matrix4d().

Referenced by makVrl.Matrix4d.CreatePerspectiveFieldOfView(), and makVrl.Matrix4d.CreatePerspectiveOffCenter().

static Matrix4d makVrl.Matrix4d.CreatePerspectiveOffCenter ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
inlinestatic

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

References makVrl.Matrix4d.CreatePerspectiveOffCenter().

static void makVrl.Matrix4d.CreateRotationX ( double  angle,
out Matrix4d  result 
)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.

References makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitX.

Referenced by makVrl.Matrix4d.CreateRotationX().

static Matrix4d makVrl.Matrix4d.CreateRotationX ( double  angle)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4d instance.

References makVrl.Matrix4d.CreateRotationX().

static void makVrl.Matrix4d.CreateRotationY ( double  angle,
out Matrix4d  result 
)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.

References makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitY.

Referenced by makVrl.Matrix4d.CreateRotationY().

static Matrix4d makVrl.Matrix4d.CreateRotationY ( double  angle)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4d instance.

References makVrl.Matrix4d.CreateRotationY().

static void makVrl.Matrix4d.CreateRotationZ ( double  angle,
out Matrix4d  result 
)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
resultThe resulting Matrix4d instance.

References makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitZ.

Referenced by makVrl.Matrix4d.CreateRotationZ().

static Matrix4d makVrl.Matrix4d.CreateRotationZ ( double  angle)
inlinestatic

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

Parameters
angleThe counter-clockwise angle in radians.
Returns
The resulting Matrix4d instance.

References makVrl.Matrix4d.CreateRotationZ().

static void makVrl.Matrix4d.CreateTranslation ( double  x,
double  y,
double  z,
out Matrix4d  result 
)
inlinestatic

Creates a translation matrix.

Parameters
xX translation.
yY translation.
zZ translation.
resultThe resulting Matrix4d instance.

References makVrl.Matrix4d.Identity, and makVrl.Matrix4d.Row3.

Referenced by makVrl.Matrix4d.CreateTranslation(), and makVrl.Matrix4d.LookAt().

static void makVrl.Matrix4d.CreateTranslation ( ref Vector3d  vector,
out Matrix4d  result 
)
inlinestatic

Creates a translation matrix.

Parameters
vectorThe translation vector.
resultThe resulting Matrix4d instance.

References makVrl.Matrix4d.Identity, and makVrl.Matrix4d.Row3.

static Matrix4d makVrl.Matrix4d.CreateTranslation ( double  x,
double  y,
double  z 
)
inlinestatic

Creates a translation matrix.

Parameters
xX translation.
yY translation.
zZ translation.
Returns
The resulting Matrix4d instance.

References makVrl.Matrix4d.CreateTranslation().

static Matrix4d makVrl.Matrix4d.CreateTranslation ( Vector3d  vector)
inlinestatic

Creates a translation matrix.

Parameters
vectorThe translation vector.
Returns
The resulting Matrix4d instance.

References makVrl.Matrix4d.CreateTranslation(), makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

override bool makVrl.Matrix4d.Equals ( object  obj)
inline

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.

Referenced by makVrl.Matrix4d.operator!=(), and makVrl.Matrix4d.operator==().

bool makVrl.Matrix4d.Equals ( Matrix4d  other)
inline

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.

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Matrix4d.Row3.

Vector4d makVrl.Matrix4d.ExtractProjection ( )
inline

Returns the projection component of this instance.

References makVrl.Matrix4d.Column3.

Quaterniond makVrl.Matrix4d.ExtractRotation ( bool  row_normalise = true)
inline

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.

References makVrl.Quaterniond.Normalize(), makVrl.Vector3d.Normalized(), makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Quaterniond.W, makVrl.Quaterniond.X, makVrl.Vector4d.Xyz, makVrl.Quaterniond.Y, and makVrl.Quaterniond.Z.

Vector3d makVrl.Matrix4d.ExtractScale ( )
inline

Returns the scale component of this instance.

References makVrl.Vector3d.Length, makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Vector4d.Xyz.

Vector3d makVrl.Matrix4d.ExtractTranslation ( )
inline

Returns the translation component of this instance.

References makVrl.Matrix4d.Row3, and makVrl.Vector4d.Xyz.

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

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

References makVrl.Matrix4d.Matrix4d().

Referenced by makVrl.Matrix4d.Perspective().

override int makVrl.Matrix4d.GetHashCode ( )
inline

Returns the hashcode for this instance.

Returns
A System.Int32 containing the unique hashcode for this instance.

References makVrl.Vector4d.GetHashCode(), makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Matrix4d.Row3.

void makVrl.Matrix4d.Invert ( )
inline

Converts this instance into its inverse.

References makVrl.Matrix4d.Invert().

Referenced by makVrl.Matrix4d.Invert(), makVrl.Matrix4d.Inverted(), and makVrl.Vector3d.TransformNormal().

static Matrix4d makVrl.Matrix4d.Invert ( Matrix4d  mat)
inlinestatic

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.

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.W, makVrl.Vector4d.X, makVrl.Vector4d.Y, and makVrl.Vector4d.Z.

Matrix4d makVrl.Matrix4d.Inverted ( )
inline

Returns an inverted copy of this instance.

References makVrl.Matrix4d.Determinant, and makVrl.Matrix4d.Invert().

static Matrix4d makVrl.Matrix4d.LookAt ( Vector3d  eye,
Vector3d  target,
Vector3d  up 
)
inlinestatic

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

References makVrl.Matrix4d.CreateTranslation(), makVrl.Vector3d.Cross(), makVrl.Matrix4d.Matrix4d(), makVrl.Vector3d.Normalize(), makVrl.Vector4d.UnitW, makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Matrix4d.LookAt().

static Matrix4d makVrl.Matrix4d.LookAt ( double  eyeX,
double  eyeY,
double  eyeZ,
double  targetX,
double  targetY,
double  targetZ,
double  upX,
double  upY,
double  upZ 
)
inlinestatic

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

References makVrl.Matrix4d.LookAt().

static Matrix4d makVrl.Matrix4d.Mult ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

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

Referenced by makVrl.Matrix4d.Mult(), and makVrl.Matrix4d.operator*().

static void makVrl.Matrix4d.Mult ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  result 
)
inlinestatic

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

References makVrl.Matrix4d.Row0, and makVrl.Vector4d.X.

static Matrix4d makVrl.Matrix4d.Mult ( Matrix4d  left,
double  right 
)
inlinestatic

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

References makVrl.Matrix4d.Mult().

static void makVrl.Matrix4d.Mult ( ref Matrix4d  left,
double  right,
out Matrix4d  result 
)
inlinestatic

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

References makVrl.Matrix4d.Row0.

void makVrl.Matrix4d.Normalize ( )
inline
Matrix4d makVrl.Matrix4d.Normalized ( )
inline

Returns a normalised copy of this instance.

References makVrl.Matrix4d.Normalize().

static bool makVrl.Matrix4d.operator!= ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

Compares two instances for inequality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left does not equal right; false otherwise.

References makVrl.Matrix4d.Equals().

static Matrix4d makVrl.Matrix4d.operator* ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

Matrix multiplication

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4d which holds the result of the multiplication

References makVrl.Matrix4d.Mult().

static Matrix4d makVrl.Matrix4d.operator* ( Matrix4d  left,
float  right 
)
inlinestatic

Matrix-scalar multiplication

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4d which holds the result of the multiplication

References makVrl.Matrix4d.Mult().

static Matrix4d makVrl.Matrix4d.operator+ ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

Matrix addition

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4d which holds the result of the addition

References makVrl.Matrix4d.Add().

static Matrix4d makVrl.Matrix4d.operator- ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

Matrix subtraction

Parameters
leftleft-hand operand
rightright-hand operand
Returns
A new Matrix4d which holds the result of the subtraction

References makVrl.Matrix4d.Subtract().

static bool makVrl.Matrix4d.operator== ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.

References makVrl.Matrix4d.Equals().

static Matrix4d makVrl.Matrix4d.Perspective ( double  fovy,
double  aspect,
double  near,
double  far 
)
inlinestatic

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

References makVrl.Matrix4d.Frustum().

static Matrix4d makVrl.Matrix4d.Rotate ( Vector3d  axis,
double  angle 
)
inlinestatic

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

References makVrl.Vector3d.Normalize(), makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.UnitW, makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Matrix4d.Rotate().

static Matrix4d makVrl.Matrix4d.Rotate ( Quaterniond  q)
inlinestatic

Build a rotation matrix from a quaternion

Parameters
qthe quaternion
Returns
A rotation matrix

References makVrl.Matrix4d.Rotate(), and makVrl.Quaterniond.ToAxisAngle().

static Matrix4d makVrl.Matrix4d.RotateX ( double  angle)
inlinestatic

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

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitX.

static Matrix4d makVrl.Matrix4d.RotateY ( double  angle)
inlinestatic

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

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitY.

static Matrix4d makVrl.Matrix4d.RotateZ ( double  angle)
inlinestatic

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

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.UnitW, and makVrl.Vector4d.UnitZ.

static Matrix4d makVrl.Matrix4d.Scale ( double  scale)
inlinestatic

Build a scaling matrix

Parameters
scaleSingle scale factor for x,y and z axes
Returns
A scaling matrix

Referenced by makVrl.Matrix4d.Scale().

static Matrix4d makVrl.Matrix4d.Scale ( Vector3d  scale)
inlinestatic

Build a scaling matrix

Parameters
scaleScale factors for x,y and z axes
Returns
A scaling matrix

References makVrl.Matrix4d.Scale(), makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Matrix4d makVrl.Matrix4d.Scale ( double  x,
double  y,
double  z 
)
inlinestatic

Build a scaling matrix

Parameters
xScale factor for x-axis
yScale factor for y-axis
zScale factor for z-axis
Returns
A scaling matrix

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, makVrl.Matrix4d.Row3, makVrl.Vector4d.UnitW, makVrl.Vector4d.UnitX, makVrl.Vector4d.UnitY, and makVrl.Vector4d.UnitZ.

static Matrix4d makVrl.Matrix4d.Subtract ( Matrix4d  left,
Matrix4d  right 
)
inlinestatic

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.

Referenced by makVrl.Matrix4d.operator-().

static void makVrl.Matrix4d.Subtract ( ref Matrix4d  left,
ref Matrix4d  right,
out Matrix4d  result 
)
inlinestatic

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.

References makVrl.Matrix4d.Row0.

override string makVrl.Matrix4d.ToString ( )
inline

Returns a System.String that represents the current Matrix44.

Returns

References makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Matrix4d.Row3.

static Matrix4d makVrl.Matrix4d.Translation ( Vector3d  trans)
inlinestatic

Build a translation matrix with the given translation

Parameters
transThe vector to translate along
Returns
A Translation matrix

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Matrix4d makVrl.Matrix4d.Translation ( double  x,
double  y,
double  z 
)
inlinestatic

Build a translation matrix with the given translation

Parameters
xX translation
yY translation
zZ translation
Returns
A Translation matrix

References makVrl.Matrix4d.Identity, and makVrl.Matrix4d.Row3.

void makVrl.Matrix4d.Transpose ( )
inline

Converts this instance into its transpose.

References makVrl.Matrix4d.Transpose().

Referenced by makVrl.Matrix4d.Transpose().

static Matrix4d makVrl.Matrix4d.Transpose ( Matrix4d  mat)
inlinestatic

Calculate the transpose of the given matrix

Parameters
matThe matrix to transpose
Returns
The transpose of the given matrix

References makVrl.Matrix4d.Column0, makVrl.Matrix4d.Column1, makVrl.Matrix4d.Column2, makVrl.Matrix4d.Column3, and makVrl.Matrix4d.Matrix4d().

static void makVrl.Matrix4d.Transpose ( ref Matrix4d  mat,
out Matrix4d  result 
)
inlinestatic

Calculate the transpose of the given matrix

Parameters
matThe matrix to transpose
resultThe result of the calculation

Member Data Documentation

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

The identity matrix

Referenced by makVrl.Matrix4d.CreateTranslation(), and makVrl.Matrix4d.Translation().

Vector4d makVrl.Matrix4d.Row0
Vector4d makVrl.Matrix4d.Row1
Vector4d makVrl.Matrix4d.Row2
Vector4d makVrl.Matrix4d.Row3

Property Documentation

Vector4d makVrl.Matrix4d.Column0
getset
Vector4d makVrl.Matrix4d.Column1
getset
Vector4d makVrl.Matrix4d.Column2
getset
Vector4d makVrl.Matrix4d.Column3
getset
double makVrl.Matrix4d.Determinant
get

The determinant of this matrix

Referenced by makVrl.Matrix4d.Inverted(), and makVrl.Matrix4d.Normalize().

Vector4d makVrl.Matrix4d.Diagonal
getset

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

double makVrl.Matrix4d.M11
getset

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

double makVrl.Matrix4d.M12
getset

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

double makVrl.Matrix4d.M13
getset

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

double makVrl.Matrix4d.M14
getset

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

double makVrl.Matrix4d.M21
getset

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

double makVrl.Matrix4d.M22
getset

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

double makVrl.Matrix4d.M23
getset

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

double makVrl.Matrix4d.M24
getset

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

double makVrl.Matrix4d.M31
getset

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

double makVrl.Matrix4d.M32
getset

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

double makVrl.Matrix4d.M33
getset

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

double makVrl.Matrix4d.M34
getset

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

double makVrl.Matrix4d.M41
getset

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

double makVrl.Matrix4d.M42
getset

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

double makVrl.Matrix4d.M43
getset

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

double makVrl.Matrix4d.M44
getset

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

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

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

double makVrl.Matrix4d.Trace
get

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


The documentation for this struct was generated from the following file:

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)