Class: Matrix

PhotoEditorSDK.Math~ Matrix

Represents a 3-dimensional matrix

new Matrix()

sdk/core/lib/math/matrix.js, line 27

Creates a Matrix

Members

staticPhotoEditorSDK.Math.Matrix.IDENTITYPhotoEditorSDK.Math.Matrix

The identity matrix

Methods

applyInverseToVector(position){PhotoEditorSDK.Math.Vector2}

sdk/core/lib/math/matrix.js, line 72

Applies the inverse of this matrix to the given vector

Name Type Description
position PhotoEditorSDK.Math.Vector2
Returns:
Type Description
PhotoEditorSDK.Math.Vector2

applyToVector(position){PhotoEditorSDK.Math.Vector2}

sdk/core/lib/math/matrix.js, line 59

Applies this matrix to the given vector

Name Type Description
position PhotoEditorSDK.Math.Vector2
Returns:
Type Description
PhotoEditorSDK.Math.Vector2

multiply(matrix){PhotoEditorSDK.Math.Matrix}

sdk/core/lib/math/matrix.js, line 36

Multiplies this matrix with the given one

Name Type Description
matrix PhotoEditorSDK.Math.Matrix
Returns:
Type Description
PhotoEditorSDK.Math.Matrix

rectangleToCoordinates(rectangle, anchor){Array.<PhotoEditorSDK.Math.Vector2>}

sdk/core/lib/math/matrix.js, line 93

Turns the given rectangle into vector coordinates by applying this Matrix

Name Type Description
rectangle PhotoEditorSDK.Math.Rectangle
anchor PhotoEditorSDK.Math.Vector2
Returns:
Type Description
Array.<PhotoEditorSDK.Math.Vector2>

reset()

sdk/core/lib/math/matrix.js, line 132

Resets this matrix to the identity matrix

toArray(){Float32Array}

sdk/core/lib/math/matrix.js, line 145

Returns an array representation of this matrix

Returns:
Type Description
Float32Array

toString(){String}

sdk/core/lib/math/matrix.js, line 161

Returns a string representation of this matrix

Returns:
Type Description
String