getColumn
Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
//returns a Cartesian4 instance with values from the specified column
// m = [10.0, 11.0, 12.0, 13.0]
// [14.0, 15.0, 16.0, 17.0]
// [18.0, 19.0, 20.0, 21.0]
// [22.0, 23.0, 24.0, 25.0]
//Example 1: Creates an instance of Cartesian
const a = Matrix4.getColumn(m, 2, new Cartesian4());
Content copied to clipboard
//Example 2: Sets values for Cartesian instance
const a = new Cartesian4();
Matrix4.getColumn(m, 2, a);
// a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;
Content copied to clipboard
Return
The modified result parameter.
Parameters
matrix
The matrix to use.
index
The zero-based index of the column to retrieve.
result
The object onto which to store the result.