| Methods |
|---|
Constructor
new Mat3(valuesopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
values |
Array |
<optional> |
Initial values for the matrix |
- Source:
Methods
multiply(other) → {OpenSeadragon.Mat3}
Parameters:
| Name | Type | Description |
|---|---|---|
other |
OpenSeadragon.Mat3 | the matrix to multiply with |
- Source:
Returns:
The result of matrix multiplication
- Type
- OpenSeadragon.Mat3
(static) makeIdentity() → {OpenSeadragon.Mat3}
- Source:
Returns:
an identity matrix
- Type
- OpenSeadragon.Mat3
(static) makeRotation(angleInRadians) → {OpenSeadragon.Mat3}
Parameters:
| Name | Type | Description |
|---|---|---|
angleInRadians |
Number | The desired rotation angle, in radians |
- Source:
Returns:
A rotation matrix
- Type
- OpenSeadragon.Mat3
(static) makeScaling(sx, sy) → {OpenSeadragon.Mat3}
Parameters:
| Name | Type | Description |
|---|---|---|
sx |
Number | The x value of the scaling |
sy |
Number | The y value of the scaling |
- Source:
Returns:
A scaling matrix
- Type
- OpenSeadragon.Mat3
(static) makeTranslation(tx, ty) → {OpenSeadragon.Mat3}
Parameters:
| Name | Type | Description |
|---|---|---|
tx |
Number | The x value of the translation |
ty |
Number | The y value of the translation |
- Source:
Returns:
A translation matrix
- Type
- OpenSeadragon.Mat3
(static) Mat3#scaleAndTranslate() → {OpenSeadragon.Mat3}
Scaling & translation only changes certain values, no need to compute full matrix multiplication.
- Source:
Returns:
The result of matrix multiplication
- Type
- OpenSeadragon.Mat3
(static) Mat3#scaleAndTranslateOtherSetSelf(other)
Move and translate another matrix by self. 'this' matrix must be scale & translate matrix.
Optimization: in case the original matrix can be thrown away, optimize instead by computing in-place.
Used for optimization: we have
A) THIS matrix, carrying scale and translation,
B) OTHER general matrix to scale and translate.
Since THIS matrix is unique per tile, we can optimize the operation by:
- move & scale OTHER by THIS, and
- store the result to THIS, since we don't need to keep the scaling and translation, but
we need to keep the original OTHER matrix (for each tile within tiled image).
Parameters:
| Name | Type | Description |
|---|---|---|
other |
OpenSeadragon.Mat3 | the matrix to scale and translate by this matrix and accept values from |
- Source:
(static) Mat3#scaleAndTranslateSelf()
Scaling & translation only changes certain values, no need to compute full matrix multiplication.
Optimization: in case the original matrix can be thrown away, optimize instead by computing in-place.
- Source: