Skip to content

Commit 348f7f3

Browse files
committed
docs(rowcolumnmajor): document what class is row major and what class is column major
1 parent 8b17606 commit 348f7f3

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Sources/Common/Core/Math/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export function solveLinearSystem(A: Matrix, x: number[], size: number): number;
788788
* @param {Number} [size] The square size of the matrix to invert : 4 for a 4x4
789789
* @param {Number[]} [index]
790790
* @param {Number[]} [column]
791-
* @return AI on success, null otherwise
791+
* @returns AI on success, null otherwise
792792
*/
793793
export function invertMatrix(
794794
A: Matrix,
@@ -1136,6 +1136,7 @@ export function isFinite(value: any): boolean;
11361136
* operations such as dot and cross products and vector norm; matrix determinant
11371137
* for 2x2 and 3x3 matrices; univariate polynomial solvers; and for random
11381138
* number generation (for backward compatibility only).
1139+
* **Contrary to the rest of vtk.js, vtkMath is in row-major format (similar to VTK C++).**
11391140
*/
11401141
export declare const vtkMath: {
11411142
createArray: typeof createArray;

Sources/Common/Core/MatrixBuilder/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ declare function buildFromRadian(): Transform;
131131
* The `vtkMatrixBuilder` class provides a system to create a mat4
132132
* transformation matrix. All functions return the MatrixBuilder Object
133133
* instance, allowing transformations to be chained.
134+
* **Note**: Contrary to vtkMath, vtkMatrixBuilder uses column-major format.
134135
*
135136
* @example
136137
* ```js

Sources/Common/Transform/Transform/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ export function newInstance(
286286
* Most of the methods for manipulating this transformation (e.g. transformMatrices, transformMatrix) (TODO: Translate, Rotate, Concatenate...) can operate in either PreMultiply (the default) or PostMultiply mode. In PreMultiply mode, the translation, concatenation, etc. will occur before any transformations which are represented by the current matrix. In PostMultiply mode, the additional transformation will occur after any transformations represented by the current matrix.
287287
*
288288
* This class performs all of its operations in a right handed coordinate system with right handed rotations. Some other graphics libraries use left handed coordinate systems and rotations.
289+
* **Note**: vtkTransform uses column-major format.
289290
*
290291
* @example
291292
* ```js

Sources/Imaging/Core/ImageReslice/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,8 @@ export function newInstance(
666666
* slice rather than a volume. You can use both the resliceAxes and the
667667
* resliceTransform at the same time, in order to extract slices from a
668668
* volume that you have applied a transformation to.
669-
* */
669+
* **Note**: vtkImageReslice uses column-major format.
670+
*/
670671
export declare const vtkImageReslice: {
671672
newInstance: typeof newInstance;
672673
extend: typeof extend;

0 commit comments

Comments
 (0)