MCPcopy
hub / github.com/CesiumGS/cesium / getScale

Method getScale

packages/engine/Source/Core/Matrix3.js:944–960  ·  view source on GitHub ↗

* Extracts the non-uniform scale assuming the matrix is an affine transformation. * * @param {Matrix3} matrix The matrix. * @param {Cartesian3} result The object onto which to store the result. * @returns {Cartesian3} The modified result parameter. * * @see Matrix3.multiplyByScale

(matrix, result)

Source from the content-addressed store, hash-verified

942 * @see Matrix3.setUniformScale
943 */
944 static getScale(matrix, result) {
945 //>>includeStart('debug', pragmas.debug);
946 Check.typeOf.object("matrix", matrix);
947 Check.typeOf.object("result", result);
948 //>>includeEnd('debug');
949
950 result.x = Cartesian3.magnitude(
951 Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn),
952 );
953 result.y = Cartesian3.magnitude(
954 Cartesian3.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn),
955 );
956 result.z = Cartesian3.magnitude(
957 Cartesian3.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn),
958 );
959 return result;
960 }
961
962 /**
963 * Computes the maximum scale assuming the matrix is an affine transformation.

Callers 15

VoxelBoxShape.jsFile · 0.45
getBoxChunkObbFunction · 0.45
getBoxShapeFunction · 0.45
createSphereFunction · 0.45
Cesium3DTile.jsFile · 0.45
SpatialNode.jsFile · 0.45
PointCloud.jsFile · 0.45
computeTransformFunction · 0.45
setScaleMethod · 0.45

Calls 3

objectMethod · 0.80
magnitudeMethod · 0.45
fromElementsMethod · 0.45

Tested by

no test coverage detected