Android Guides | Samples

Android.Opengl.Matrix Class

Matrix math utilities.

See Also: Matrix

Syntax

[Android.Runtime.Register("android/opengl/Matrix", DoNotGenerateAcw=true)]
public class Matrix : Object

Remarks

Matrix math utilities. These methods operate on OpenGL ES format matrices and vectors stored in float arrays.

Matrices are 4 x 4 column-vector matrices stored in column-major order:

java Example

  m[offset +  0] m[offset +  4] m[offset +  8] m[offset + 12]
  m[offset +  1] m[offset +  5] m[offset +  9] m[offset + 13]
  m[offset +  2] m[offset +  6] m[offset + 10] m[offset + 14]
  m[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]
Vectors are 4 x 1 column vectors stored in order:

java Example

 v[offset + 0]
 v[offset + 1]
 v[offset + 2]
 v[offset + 3]

[Android Documentation]

Requirements

Namespace: Android.Opengl
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Opengl.Matrix are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
FrustumM(Single[], Int32, Single, Single, Single, Single, Single, Single)
Defines a projection matrix in terms of six clip planes.
static
InvertM(Single[], Int32, Single[], Int32) : Boolean
Inverts a 4 x 4 matrix.
static
Length(Single, Single, Single) : Single
Computes the length of a vector.
static
MultiplyMM(Single[], Int32, Single[], Int32, Single[], Int32)
Multiplies two 4x4 matrices together and stores the result in a third 4x4 matrix.
static
MultiplyMV(Single[], Int32, Single[], Int32, Single[], Int32)
Multiplies a 4 element vector by a 4x4 matrix and stores the result in a 4-element column vector.
static
OrthoM(Single[], Int32, Single, Single, Single, Single, Single, Single)
Computes an orthographic projection matrix.
static
PerspectiveM(Single[], Int32, Single, Single, Single, Single)
Defines a projection matrix in terms of a field of view angle, an aspect ratio, and z clip planes.
static
RotateM(Single[], Int32, Single, Single, Single, Single)
Rotates matrix m in place by angle a (in degrees) around the axis (x, y, z).
static
RotateM(Single[], Int32, Single[], Int32, Single, Single, Single, Single)
Rotates matrix m by angle a (in degrees) around the axis (x, y, z).
static
ScaleM(Single[], Int32, Single, Single, Single)
Scales matrix m in place by sx, sy, and sz.
static
ScaleM(Single[], Int32, Single[], Int32, Single, Single, Single)
Scales matrix m by x, y, and z, putting the result in sm.
static
SetIdentityM(Single[], Int32)
Sets matrix m to the identity matrix.
static
SetLookAtM(Single[], Int32, Single, Single, Single, Single, Single, Single, Single, Single, Single)
Defines a viewing transformation in terms of an eye point, a center of view, and an up vector.
static
SetRotateEulerM(Single[], Int32, Single, Single, Single)
Converts Euler angles to a rotation matrix.
static
SetRotateM(Single[], Int32, Single, Single, Single, Single)
Creates a matrix for rotation by angle a (in degrees) around the axis (x, y, z).
static
TranslateM(Single[], Int32, Single, Single, Single)
Translates matrix m by x, y, and z in place.
static
TranslateM(Single[], Int32, Single[], Int32, Single, Single, Single)
Translates matrix m by x, y, and z, putting the result in tm.
static
TransposeM(Single[], Int32, Single[], Int32)
Transposes a 4 x 4 matrix.