qd-changjing/public/static/Build/Documentation/Matrix4.html

13720 lines
241 KiB
HTML
Raw Normal View History

2022-07-05 16:56:29 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Matrix4 - Cesium Documentation</title>
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
<link href="styles/jsdoc-default.css" rel="stylesheet">
<link href="styles/prism.css" rel="stylesheet">
</head>
<body>
<div id="main">
<h1 class="page-title">
<a href="index.html"><img src="Images/CesiumLogo.png" class="cesiumLogo"></a>
Matrix4
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="Matrix4">
<a href="#Matrix4" class="doc-link"></a>
new Cesium.Matrix4<span class="signature">(<span class="optional">column0Row0</span>, <span class="optional">column1Row0</span>, <span class="optional">column2Row0</span>, <span class="optional">column3Row0</span>, <span class="optional">column0Row1</span>, <span class="optional">column1Row1</span>, <span class="optional">column2Row1</span>, <span class="optional">column3Row1</span>, <span class="optional">column0Row2</span>, <span class="optional">column1Row2</span>, <span class="optional">column2Row2</span>, <span class="optional">column3Row2</span>, <span class="optional">column0Row3</span>, <span class="optional">column1Row3</span>, <span class="optional">column2Row3</span>, <span class="optional">column3Row3</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L56">Core/Matrix4.js 56</a>
</div>
</h4>
</div>
<div class="description">
A 4x4 matrix, indexable as a column-major order array.
Constructor parameters are in row-major order for code readability.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>column0Row0</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 0, row 0.</td>
</tr>
<tr>
<td class="name"><code>column1Row0</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 1, row 0.</td>
</tr>
<tr>
<td class="name"><code>column2Row0</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 2, row 0.</td>
</tr>
<tr>
<td class="name"><code>column3Row0</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 3, row 0.</td>
</tr>
<tr>
<td class="name"><code>column0Row1</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 0, row 1.</td>
</tr>
<tr>
<td class="name"><code>column1Row1</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 1, row 1.</td>
</tr>
<tr>
<td class="name"><code>column2Row1</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 2, row 1.</td>
</tr>
<tr>
<td class="name"><code>column3Row1</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 3, row 1.</td>
</tr>
<tr>
<td class="name"><code>column0Row2</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 0, row 2.</td>
</tr>
<tr>
<td class="name"><code>column1Row2</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 1, row 2.</td>
</tr>
<tr>
<td class="name"><code>column2Row2</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 2, row 2.</td>
</tr>
<tr>
<td class="name"><code>column3Row2</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 3, row 2.</td>
</tr>
<tr>
<td class="name"><code>column0Row3</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 0, row 3.</td>
</tr>
<tr>
<td class="name"><code>column1Row3</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 1, row 3.</td>
</tr>
<tr>
<td class="name"><code>column2Row3</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 2, row 3.</td>
</tr>
<tr>
<td class="name"><code>column3Row3</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The value for column 3, row 3.</td>
</tr>
</tbody>
</table>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.fromArray">Matrix4.fromArray</a></li>
<li><a href="Matrix4.html#.fromColumnMajorArray">Matrix4.fromColumnMajorArray</a></li>
<li><a href="Matrix4.html#.fromRowMajorArray">Matrix4.fromRowMajorArray</a></li>
<li><a href="Matrix4.html#.fromRotationTranslation">Matrix4.fromRotationTranslation</a></li>
<li><a href="Matrix4.html#.fromTranslationQuaternionRotationScale">Matrix4.fromTranslationQuaternionRotationScale</a></li>
<li><a href="Matrix4.html#.fromTranslationRotationScale">Matrix4.fromTranslationRotationScale</a></li>
<li><a href="Matrix4.html#.fromTranslation">Matrix4.fromTranslation</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.fromRotation">Matrix4.fromRotation</a></li>
<li><a href="Matrix4.html#.fromCamera">Matrix4.fromCamera</a></li>
<li><a href="Matrix4.html#.computePerspectiveFieldOfView">Matrix4.computePerspectiveFieldOfView</a></li>
<li><a href="Matrix4.html#.computeOrthographicOffCenter">Matrix4.computeOrthographicOffCenter</a></li>
<li><a href="Matrix4.html#.computePerspectiveOffCenter">Matrix4.computePerspectiveOffCenter</a></li>
<li><a href="Matrix4.html#.computeInfinitePerspectiveOffCenter">Matrix4.computeInfinitePerspectiveOffCenter</a></li>
<li><a href="Matrix4.html#.computeViewportTransformation">Matrix4.computeViewportTransformation</a></li>
<li><a href="Matrix4.html#.computeView">Matrix4.computeView</a></li>
<li><a href="Matrix2.html">Matrix2</a></li>
<li><a href="Matrix3.html">Matrix3</a></li>
<li><a href="Packable.html">Packable</a></li>
</ul>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id="length">
<a href="#length" class="doc-link"></a>
length<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3153">Core/Matrix4.js 3153</a>
</div>
</h4>
</div>
<div class="description">
Gets the number of items in the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN0ROW0">
<a href="#.COLUMN0ROW0" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN0ROW0<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3024">Core/Matrix4.js 3024</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 0, row 0.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN0ROW1">
<a href="#.COLUMN0ROW1" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN0ROW1<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3032">Core/Matrix4.js 3032</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 0, row 1.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN0ROW2">
<a href="#.COLUMN0ROW2" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN0ROW2<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3040">Core/Matrix4.js 3040</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 0, row 2.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN0ROW3">
<a href="#.COLUMN0ROW3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN0ROW3<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3048">Core/Matrix4.js 3048</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 0, row 3.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN1ROW0">
<a href="#.COLUMN1ROW0" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN1ROW0<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3056">Core/Matrix4.js 3056</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 1, row 0.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN1ROW1">
<a href="#.COLUMN1ROW1" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN1ROW1<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3064">Core/Matrix4.js 3064</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 1, row 1.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN1ROW2">
<a href="#.COLUMN1ROW2" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN1ROW2<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3072">Core/Matrix4.js 3072</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 1, row 2.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN1ROW3">
<a href="#.COLUMN1ROW3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN1ROW3<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3080">Core/Matrix4.js 3080</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 1, row 3.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN2ROW0">
<a href="#.COLUMN2ROW0" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN2ROW0<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3088">Core/Matrix4.js 3088</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 2, row 0.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN2ROW1">
<a href="#.COLUMN2ROW1" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN2ROW1<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3096">Core/Matrix4.js 3096</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 2, row 1.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN2ROW2">
<a href="#.COLUMN2ROW2" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN2ROW2<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3104">Core/Matrix4.js 3104</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 2, row 2.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN2ROW3">
<a href="#.COLUMN2ROW3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN2ROW3<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3112">Core/Matrix4.js 3112</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 2, row 3.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN3ROW0">
<a href="#.COLUMN3ROW0" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN3ROW0<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3120">Core/Matrix4.js 3120</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 3, row 0.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN3ROW1">
<a href="#.COLUMN3ROW1" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN3ROW1<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3128">Core/Matrix4.js 3128</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 3, row 1.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN3ROW2">
<a href="#.COLUMN3ROW2" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN3ROW2<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3136">Core/Matrix4.js 3136</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 3, row 2.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".COLUMN3ROW3">
<a href="#.COLUMN3ROW3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.COLUMN3ROW3<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3144">Core/Matrix4.js 3144</a>
</div>
</h4>
</div>
<div class="description">
The index into Matrix4 for column 3, row 3.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".IDENTITY">
<a href="#.IDENTITY" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.IDENTITY<span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2970">Core/Matrix4.js 2970</a>
</div>
</h4>
</div>
<div class="description">
An immutable Matrix4 instance initialized to the identity matrix.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".packedLength">
<a href="#.packedLength" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.packedLength<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L96">Core/Matrix4.js 96</a>
</div>
</h4>
</div>
<div class="description">
The number of elements used to pack the object into an array.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".ZERO">
<a href="#.ZERO" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> <span class="type-signature attribute-constant">constant</span> Cesium.Matrix4.ZERO<span class="type-signature"> : <a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2997">Core/Matrix4.js 2997</a>
</div>
</h4>
</div>
<div class="description">
An immutable Matrix4 instance initialized to the zero matrix.
</div>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id="clone">
<a href="#clone" class="doc-link"></a>
clone<span class="signature">(<span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3166">Core/Matrix4.js 3166</a>
</div>
</h4>
</div>
<div class="description">
Duplicates the provided Matrix4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="equals">
<a href="#equals" class="doc-link"></a>
equals<span class="signature">(<span class="optional">right</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3177">Core/Matrix4.js 3177</a>
</div>
</h4>
</div>
<div class="description">
Compares this matrix to the provided matrix componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The right hand side matrix.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="equalsEpsilon">
<a href="#equalsEpsilon" class="doc-link"></a>
equalsEpsilon<span class="signature">(<span class="optional">right</span>, <span class="optional">epsilon</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3214">Core/Matrix4.js 3214</a>
</div>
</h4>
</div>
<div class="description">
Compares this matrix to the provided matrix componentwise and returns
<code>true</code> if they are within the provided epsilon,
<code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The right hand side matrix.</td>
</tr>
<tr>
<td class="name"><code>epsilon</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The epsilon to use for equality testing.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if they are within the provided epsilon, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="toString">
<a href="#toString" class="doc-link"></a>
toString<span class="signature">()</span> &rarr; <span class="type-signature returnType">String</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L3224">Core/Matrix4.js 3224</a>
</div>
</h4>
</div>
<div class="description">
Computes a string representing this Matrix with each row being
on a separate line and in the format '(column0, column1, column2, column3)'.
</div>
<h5>Returns:</h5>
<div class="param-desc">
A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".abs">
<a href="#.abs" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.abs<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2461">Core/Matrix4.js 2461</a>
</div>
</h4>
</div>
<div class="description">
Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix with signed elements.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".add">
<a href="#.add" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.add<span class="signature">(left, right, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1819">Core/Matrix4.js 1819</a>
</div>
</h4>
</div>
<div class="description">
Computes the sum of two matrices.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The second matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".clone">
<a href="#.clone" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.clone<span class="signature">(matrix, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L243">Core/Matrix4.js 243</a>
</div>
</h4>
</div>
<div class="description">
Duplicates a Matrix4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to duplicate.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computeInfinitePerspectiveOffCenter">
<a href="#.computeInfinitePerspectiveOffCenter" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computeInfinitePerspectiveOffCenter<span class="signature">(left, right, bottom, top, near, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1004">Core/Matrix4.js 1004</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing an infinite off center perspective transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the left of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the right of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>bottom</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters below of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>top</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters above of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>near</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the near plane in meters.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computeOrthographicOffCenter">
<a href="#.computeOrthographicOffCenter" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computeOrthographicOffCenter<span class="signature">(left, right, bottom, top, near, far, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L886">Core/Matrix4.js 886</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing an orthographic transformation matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the left of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the right of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>bottom</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters below of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>top</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters above of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>near</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the near plane in meters.</td>
</tr>
<tr>
<td class="name"><code>far</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the far plane in meters.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computePerspectiveFieldOfView">
<a href="#.computePerspectiveFieldOfView" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computePerspectiveFieldOfView<span class="signature">(fovY, aspectRatio, near, far, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L833">Core/Matrix4.js 833</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing a perspective transformation matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>fovY</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The field of view along the Y axis in radians.</td>
</tr>
<tr>
<td class="name"><code>aspectRatio</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The aspect ratio.</td>
</tr>
<tr>
<td class="name"><code>near</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the near plane in meters.</td>
</tr>
<tr>
<td class="name"><code>far</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the far plane in meters.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: fovY must be in (0, PI].
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: aspectRatio must be greater than zero.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: near must be greater than zero.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: far must be greater than zero.
</div>
</li>
</ul>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computePerspectiveOffCenter">
<a href="#.computePerspectiveOffCenter" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computePerspectiveOffCenter<span class="signature">(left, right, bottom, top, near, far, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L947">Core/Matrix4.js 947</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing an off center perspective transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the left of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters to the right of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>bottom</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters below of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>top</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number of meters above of the camera that will be in view.</td>
</tr>
<tr>
<td class="name"><code>near</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the near plane in meters.</td>
</tr>
<tr>
<td class="name"><code>far</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The distance to the far plane in meters.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computeView">
<a href="#.computeView" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computeView<span class="signature">(position, direction, up, right, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1126">Core/Matrix4.js 1126</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance that transforms from world space to view space.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>position</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The position of the camera.</td>
</tr>
<tr>
<td class="name"><code>direction</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The forward direction.</td>
</tr>
<tr>
<td class="name"><code>up</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The up direction.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The right direction.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".computeViewportTransformation">
<a href="#.computeViewportTransformation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.computeViewportTransformation<span class="signature">(<span class="optional">viewport</span>, <span class="optional">nearDepthRange</span>, <span class="optional">farDepthRange</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1066">Core/Matrix4.js 1066</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>viewport</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="default">
<code class="language-javascript">{ x : 0.0, y : 0.0, width : 0.0, height : 0.0 }</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The viewport's corners as shown in Example 1.</td>
</tr>
<tr>
<td class="name"><code>nearDepthRange</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The near plane distance in window coordinates.</td>
</tr>
<tr>
<td class="name"><code>farDepthRange</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">1.0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The far plane distance in window coordinates.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Create viewport transformation using an explicit viewport and depth range.
const m = Cesium.Matrix4.computeViewportTransformation({
x : 0.0,
y : 0.0,
width : 1024.0,
height : 768.0
}, 0.0, 1.0, new Cesium.Matrix4());</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".equals">
<a href="#.equals" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.equals<span class="signature">(<span class="optional">left</span>, <span class="optional">right</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2516">Core/Matrix4.js 2516</a>
</div>
</h4>
</div>
<div class="description">
Compares the provided matrices componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The second matrix.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if left and right are equal, <code>false</code> otherwise.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//compares two Matrix4 instances
// a = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]
// b = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]
if(Cesium.Matrix4.equals(a,b)) {
console.log("Both matrices are equal");
} else {
console.log("They are not equal");
}
//Prints "Both matrices are equal" on the console</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".equalsEpsilon">
<a href="#.equalsEpsilon" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.equalsEpsilon<span class="signature">(<span class="optional">left</span>, <span class="optional">right</span>, <span class="optional">epsilon</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2578">Core/Matrix4.js 2578</a>
</div>
</h4>
</div>
<div class="description">
Compares the provided matrices componentwise and returns
<code>true</code> if they are within the provided epsilon,
<code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The second matrix.</td>
</tr>
<tr>
<td class="name"><code>epsilon</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The epsilon to use for equality testing.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//compares two Matrix4 instances
// a = [10.5, 14.5, 18.5, 22.5]
// [11.5, 15.5, 19.5, 23.5]
// [12.5, 16.5, 20.5, 24.5]
// [13.5, 17.5, 21.5, 25.5]
// b = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]
if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){
console.log("Difference between both the matrices is less than 0.1");
} else {
console.log("Difference between both the matrices is not less than 0.1");
}
//Prints "Difference between both the matrices is not less than 0.1" on the console</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromArray">
<a href="#.fromArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromArray<span class="signature">(array, <span class="optional">startingIndex</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L309">Core/Matrix4.js 309</a>
</div>
</h4>
</div>
<div class="description">
Creates a Matrix4 from 16 consecutive elements in an array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.</td>
</tr>
<tr>
<td class="name"><code>startingIndex</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The offset into the array of the first element, which corresponds to first column first row position in the matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Create the Matrix4:
// [1.0, 2.0, 3.0, 4.0]
// [1.0, 2.0, 3.0, 4.0]
// [1.0, 2.0, 3.0, 4.0]
// [1.0, 2.0, 3.0, 4.0]
const v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];
const m = Cesium.Matrix4.fromArray(v);
// Create same Matrix4 with using an offset into an array
const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];
const m2 = Cesium.Matrix4.fromArray(v2, 2);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromCamera">
<a href="#.fromCamera" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromCamera<span class="signature">(camera, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L723">Core/Matrix4.js 723</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance from a Camera.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>camera</code></td>
<td class="type">
<span class="param-type"><a href="Camera.html">Camera</a></span>
</td>
<td class="description last">
The camera to use.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromColumnMajorArray">
<a href="#.fromColumnMajorArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromColumnMajorArray<span class="signature">(values, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L318">Core/Matrix4.js 318</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance from a column-major order array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>values</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
The column-major order array.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRotation">
<a href="#.fromRotation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromRotation<span class="signature">(rotation, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L681">Core/Matrix4.js 681</a>
</div>
</h4>
</div>
<div class="description">
Creates a rotation matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type"><a href="Matrix3.html">Matrix3</a></span>
</td>
<td class="description last">
The rotation matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRotationTranslation">
<a href="#.fromRotationTranslation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromRotationTranslation<span class="signature">(rotation, <span class="optional">translation</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L387">Core/Matrix4.js 387</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance from a Matrix3 representing the rotation
and a Cartesian3 representing the translation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type"><a href="Matrix3.html">Matrix3</a></span>
</td>
<td class="default">
</td>
<td class="description last">
The upper left portion of the matrix representing the rotation.</td>
</tr>
<tr>
<td class="name"><code>translation</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="default">
<code class="language-javascript">Cartesian3.ZERO</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The upper right portion of the matrix representing the translation.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromRowMajorArray">
<a href="#.fromRowMajorArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromRowMajorArray<span class="signature">(values, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L334">Core/Matrix4.js 334</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance from a row-major order array.
The resulting matrix will be in column-major order.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>values</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
The row-major order array.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromScale">
<a href="#.fromScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromScale<span class="signature">(scale, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L569">Core/Matrix4.js 569</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing a non-uniform scale.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The x, y, and z scale factors.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Creates
// [7.0, 0.0, 0.0, 0.0]
// [0.0, 8.0, 0.0, 0.0]
// [0.0, 0.0, 9.0, 0.0]
// [0.0, 0.0, 0.0, 1.0]
const m = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromTranslation">
<a href="#.fromTranslation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromTranslation<span class="signature">(translation, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L546">Core/Matrix4.js 546</a>
</div>
</h4>
</div>
<div class="description">
Creates a Matrix4 instance from a Cartesian3 representing the translation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>translation</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The upper right portion of the matrix representing the translation.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.multiplyByTranslation">Matrix4.multiplyByTranslation</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromTranslationQuaternionRotationScale">
<a href="#.fromTranslationQuaternionRotationScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromTranslationQuaternionRotationScale<span class="signature">(translation, rotation, scale, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L451">Core/Matrix4.js 451</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance from a translation, rotation, and scale (TRS)
representation with the rotation represented as a quaternion.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>translation</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The translation transformation.</td>
</tr>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type"><a href="Quaternion.html">Quaternion</a></span>
</td>
<td class="description last">
The rotation transformation.</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The non-uniform scale transformation.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(
new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation
Cesium.Quaternion.IDENTITY, // rotation
new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale
result);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromTranslationRotationScale">
<a href="#.fromTranslationRotationScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromTranslationRotationScale<span class="signature">(translationRotationScale, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L521">Core/Matrix4.js 521</a>
</div>
</h4>
</div>
<div class="description">
Creates a Matrix4 instance from a <a href="TranslationRotationScale.html"><code>TranslationRotationScale</code></a> instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>translationRotationScale</code></td>
<td class="type">
<span class="param-type"><a href="TranslationRotationScale.html">TranslationRotationScale</a></span>
</td>
<td class="description last">
The instance.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromUniformScale">
<a href="#.fromUniformScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.fromUniformScale<span class="signature">(scale, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L629">Core/Matrix4.js 629</a>
</div>
</h4>
</div>
<div class="description">
Computes a Matrix4 instance representing a uniform scale.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The uniform scale factor.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The object in which the result will be stored, if undefined a new instance will be created.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter, or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Creates
// [2.0, 0.0, 0.0, 0.0]
// [0.0, 2.0, 0.0, 0.0]
// [0.0, 0.0, 2.0, 0.0]
// [0.0, 0.0, 0.0, 1.0]
const m = Cesium.Matrix4.fromUniformScale(2.0);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getColumn">
<a href="#.getColumn" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getColumn<span class="signature">(matrix, index, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian4.html">Cartesian4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1272">Core/Matrix4.js 1272</a>
</div>
</h4>
</div>
<div class="description">
Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the column to retrieve.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: index must be 0, 1, 2, or 3.
</div>
</li>
</ul>
<dl class="details">
<h5>Examples:</h5>
<pre><code class="language-javascript">//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 = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());</code></pre>
<pre><code class="language-javascript">//Example 2: Sets values for Cartesian instance
const a = new Cesium.Cartesian4();
Cesium.Matrix4.getColumn(m, 2, a);
// a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getElementIndex">
<a href="#.getElementIndex" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getElementIndex<span class="signature">(row, column)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1233">Core/Matrix4.js 1233</a>
</div>
</h4>
</div>
<div class="description">
Computes the array index of the element at the provided row and column.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>row</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the row.</td>
</tr>
<tr>
<td class="name"><code>column</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the column.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The index of the element at the provided row and column.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: row must be 0, 1, 2, or 3.
</div>
</li>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: column must be 0, 1, 2, or 3.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const myMatrix = new Cesium.Matrix4();
const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);
const column1Row0 = myMatrix[column1Row0Index];
myMatrix[column1Row0Index] = 10.0;</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getMatrix3">
<a href="#.getMatrix3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getMatrix3<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix3.html">Matrix3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2645">Core/Matrix4.js 2645</a>
</div>
</h4>
</div>
<div class="description">
Gets the upper left 3x3 matrix of the provided matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix3.html">Matrix3</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// returns a Matrix3 instance from a Matrix4 instance
// m = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]
const b = new Cesium.Matrix3();
Cesium.Matrix4.getMatrix3(m,b);
// b = [10.0, 14.0, 18.0]
// [11.0, 15.0, 19.0]
// [12.0, 16.0, 20.0]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getMaximumScale">
<a href="#.getMaximumScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getMaximumScale<span class="signature">(matrix)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1624">Core/Matrix4.js 1624</a>
</div>
</h4>
</div>
<div class="description">
Computes the maximum scale assuming the matrix is an affine transformation.
The maximum scale is the maximum length of the column vectors in the upper-left
3x3 matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The maximum scale.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".getRotation">
<a href="#.getRotation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getRotation<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1684">Core/Matrix4.js 1684</a>
</div>
</h4>
</div>
<div class="description">
Extracts the rotation matrix assuming the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.setRotation">Matrix4.setRotation</a></li>
<li><a href="Matrix4.html#.fromRotation">Matrix4.fromRotation</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getRow">
<a href="#.getRow" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getRow<span class="signature">(matrix, index, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian4.html">Cartesian4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1368">Core/Matrix4.js 1368</a>
</div>
</h4>
</div>
<div class="description">
Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the row to retrieve.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: index must be 0, 1, 2, or 3.
</div>
</li>
</ul>
<dl class="details">
<h5>Examples:</h5>
<pre><code class="language-javascript">//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: Returns an instance of Cartesian
const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());</code></pre>
<pre><code class="language-javascript">//Example 2: Sets values for a Cartesian instance
const a = new Cesium.Cartesian4();
Cesium.Matrix4.getRow(m, 2, a);
// a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0;</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getScale">
<a href="#.getScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getScale<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian3.html">Cartesian3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1596">Core/Matrix4.js 1596</a>
</div>
</h4>
</div>
<div class="description">
Extracts the non-uniform scale assuming the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.multiplyByScale">Matrix4.multiplyByScale</a></li>
<li><a href="Matrix4.html#.multiplyByUniformScale">Matrix4.multiplyByUniformScale</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.setScale">Matrix4.setScale</a></li>
<li><a href="Matrix4.html#.setUniformScale">Matrix4.setUniformScale</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".getTranslation">
<a href="#.getTranslation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.getTranslation<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian3.html">Cartesian3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2611">Core/Matrix4.js 2611</a>
</div>
</h4>
</div>
<div class="description">
Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".inverse">
<a href="#.inverse" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.inverse<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2680">Core/Matrix4.js 2680</a>
</div>
</h4>
</div>
<div class="description">
Computes the inverse of the provided matrix using Cramers Rule.
If the determinant is zero, the matrix can not be inverted, and an exception is thrown.
If the matrix is a proper rigid transformation, it is more efficient
to invert it with <a href="Matrix4.html#.inverseTransformation"><code>Matrix4.inverseTransformation</code></a>.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to invert.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="RuntimeError.html">RuntimeError</a></span>
: matrix is not invertible because its determinate is zero.
</div>
</li>
</ul>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".inverseTransformation">
<a href="#.inverseTransformation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.inverseTransformation<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2894">Core/Matrix4.js 2894</a>
</div>
</h4>
</div>
<div class="description">
Computes the inverse of the provided matrix assuming it is a proper rigid matrix,
where the upper left 3x3 elements are a rotation matrix,
and the upper three elements in the fourth column are the translation.
The bottom row is assumed to be [0, 0, 0, 1].
The matrix is not verified to be in the proper form.
This method is faster than computing the inverse for a general 4x4
matrix using <a href="Matrix4.html#.inverse"><code>Matrix4.inverse</code></a>.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to invert.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".inverseTranspose">
<a href="#.inverseTranspose" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.inverseTranspose<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2952">Core/Matrix4.js 2952</a>
</div>
</h4>
</div>
<div class="description">
Computes the inverse transpose of a matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to transpose and invert.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiply">
<a href="#.multiply" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiply<span class="signature">(left, right, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1715">Core/Matrix4.js 1715</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of two matrices.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The second matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByMatrix3">
<a href="#.multiplyByMatrix3" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByMatrix3<span class="signature">(matrix, rotation, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1983">Core/Matrix4.js 1983</a>
</div>
</h4>
</div>
<div class="description">
Multiplies a transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
by a 3x3 rotation matrix. This is an optimization
for <code>Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);</code> with less allocations and arithmetic operations.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix on the left-hand side.</td>
</tr>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type"><a href="Matrix3.html">Matrix3</a></span>
</td>
<td class="description last">
The 3x3 rotation matrix on the right-hand side.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);
Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByPoint">
<a href="#.multiplyByPoint" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByPoint<span class="signature">(matrix, cartesian, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian3.html">Cartesian3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2283">Core/Matrix4.js 2283</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of a matrix and a <a href="Cartesian3.html"><code>Cartesian3</code></a>. This is equivalent to calling <a href="Matrix4.html#.multiplyByVector"><code>Matrix4.multiplyByVector</code></a>
with a <a href="Cartesian4.html"><code>Cartesian4</code></a> with a <code>w</code> component of 1, but returns a <a href="Cartesian3.html"><code>Cartesian3</code></a> instead of a <a href="Cartesian4.html"><code>Cartesian4</code></a>.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The point.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByPointAsVector">
<a href="#.multiplyByPointAsVector" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByPointAsVector<span class="signature">(matrix, cartesian, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian3.html">Cartesian3</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2249">Core/Matrix4.js 2249</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of a matrix and a <a href="Cartesian3.html"><code>Cartesian3</code></a>. This is equivalent to calling <a href="Matrix4.html#.multiplyByVector"><code>Matrix4.multiplyByVector</code></a>
with a <a href="Cartesian4.html"><code>Cartesian4</code></a> with a <code>w</code> component of zero.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The point.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());
// A shortcut for
// Cartesian3 p = ...
// Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByScalar">
<a href="#.multiplyByScalar" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByScalar<span class="signature">(matrix, scalar, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2327">Core/Matrix4.js 2327</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of a matrix and a scalar.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>scalar</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The number to multiply by.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//create a Matrix4 instance which is a scaled version of the supplied Matrix4
// 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]
const a = Cesium.Matrix4.multiplyByScalar(m, -2, new Cesium.Matrix4());
// m remains the same
// a = [-20.0, -22.0, -24.0, -26.0]
// [-28.0, -30.0, -32.0, -34.0]
// [-36.0, -38.0, -40.0, -42.0]
// [-44.0, -46.0, -48.0, -50.0]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByScale">
<a href="#.multiplyByScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByScale<span class="signature">(matrix, scale, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2113">Core/Matrix4.js 2113</a>
</div>
</h4>
</div>
<div class="description">
Multiplies an affine transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
by an implicit non-uniform scale matrix. This is an optimization
for <code>Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);</code>, where
<code>m</code> must be an affine matrix.
This function performs fewer allocations and arithmetic operations.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The affine matrix on the left-hand side.</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The non-uniform scale on the right-hand side.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);
Cesium.Matrix4.multiplyByScale(m, scale, m);</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.multiplyByUniformScale">Matrix4.multiplyByUniformScale</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.setScale">Matrix4.setScale</a></li>
<li><a href="Matrix4.html#.setUniformScale">Matrix4.setUniformScale</a></li>
<li><a href="Matrix4.html#.getScale">Matrix4.getScale</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByTranslation">
<a href="#.multiplyByTranslation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByTranslation<span class="signature">(matrix, translation, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2055">Core/Matrix4.js 2055</a>
</div>
</h4>
</div>
<div class="description">
Multiplies a transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
by an implicit translation matrix defined by a <a href="Cartesian3.html"><code>Cartesian3</code></a>. This is an optimization
for <code>Matrix4.multiply(m, Matrix4.fromTranslation(position), m);</code> with less allocations and arithmetic operations.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix on the left-hand side.</td>
</tr>
<tr>
<td class="name"><code>translation</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The translation on the right-hand side.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);
Cesium.Matrix4.multiplyByTranslation(m, position, m);</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByUniformScale">
<a href="#.multiplyByUniformScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByUniformScale<span class="signature">(matrix, scale, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2171">Core/Matrix4.js 2171</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix on the left-hand side.</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The uniform scale on the right-hand side.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">// Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);
Cesium.Matrix4.multiplyByUniformScale(m, scale, m);</code></pre>
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.multiplyByScale">Matrix4.multiplyByScale</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.setScale">Matrix4.setScale</a></li>
<li><a href="Matrix4.html#.setUniformScale">Matrix4.setUniformScale</a></li>
<li><a href="Matrix4.html#.getScale">Matrix4.getScale</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyByVector">
<a href="#.multiplyByVector" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyByVector<span class="signature">(matrix, cartesian, result)</span> &rarr; <span class="type-signature returnType"><a href="Cartesian4.html">Cartesian4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2209">Core/Matrix4.js 2209</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of a matrix and a column vector.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The vector.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".multiplyTransformation">
<a href="#.multiplyTransformation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.multiplyTransformation<span class="signature">(left, right, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1898">Core/Matrix4.js 1898</a>
</div>
</h4>
</div>
<div class="description">
Computes the product of two matrices assuming the matrices are affine transformation matrices,
where the upper left 3x3 elements are any matrix, and
the upper three elements in the fourth column are the translation.
The bottom row is assumed to be [0, 0, 0, 1].
The matrix is not verified to be in the proper form.
This method is faster than computing the product for general 4x4
matrices using <a href="Matrix4.html#.multiply"><code>Matrix4.multiply</code></a>.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The second matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);
const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));
const m3 = Cesium.Matrix4.multiplyTransformation(m1, m2, new Cesium.Matrix4());</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".negate">
<a href="#.negate" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.negate<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2375">Core/Matrix4.js 2375</a>
</div>
</h4>
</div>
<div class="description">
Computes a negated copy of the provided matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to negate.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//create a new Matrix4 instance which is a negation of a Matrix4
// 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]
const a = Cesium.Matrix4.negate(m, new Cesium.Matrix4());
// m remains the same
// a = [-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]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".pack">
<a href="#.pack" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.pack<span class="signature">(value, array, <span class="optional">startingIndex</span>)</span> &rarr; <span class="type-signature returnType">Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L107">Core/Matrix4.js 107</a>
</div>
</h4>
</div>
<div class="description">
Stores the provided instance into the provided array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
The value to pack.</td>
</tr>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
The array to pack into.</td>
</tr>
<tr>
<td class="name"><code>startingIndex</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The index into the array at which to start packing the elements.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The array that was packed into
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".packArray">
<a href="#.packArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.packArray<span class="signature">(array, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType">Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L181">Core/Matrix4.js 181</a>
</div>
</h4>
</div>
<div class="description">
Flattens an array of Matrix4s into an array of components. The components
are stored in column-major order.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="Matrix4.html">Matrix4</a>></span>
</td>
<td class="description last">
The array of matrices to pack.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a <a href="DeveloperError.html"><code>DeveloperError</code></a> will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The packed array.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".setColumn">
<a href="#.setColumn" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setColumn<span class="signature">(matrix, index, cartesian, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1321">Core/Matrix4.js 1321</a>
</div>
</h4>
</div>
<div class="description">
Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the column to set.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The Cartesian whose values will be assigned to the specified column.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: index must be 0, 1, 2, or 3.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//creates a new Matrix4 instance with new column values from the Cartesian4 instance
// 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]
const a = Cesium.Matrix4.setColumn(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());
// m remains the same
// a = [10.0, 11.0, 99.0, 13.0]
// [14.0, 15.0, 98.0, 17.0]
// [18.0, 19.0, 97.0, 21.0]
// [22.0, 23.0, 96.0, 25.0]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".setRotation">
<a href="#.setRotation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setRotation<span class="signature">(matrix, rotation)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1641">Core/Matrix4.js 1641</a>
</div>
</h4>
</div>
<div class="description">
Sets the rotation assuming the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix.</td>
</tr>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The rotation matrix.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.fromRotation">Matrix4.fromRotation</a></li>
<li><a href="Matrix4.html#.getRotation">Matrix4.getRotation</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".setRow">
<a href="#.setRow" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setRow<span class="signature">(matrix, index, cartesian, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1416">Core/Matrix4.js 1416</a>
</div>
</h4>
</div>
<div class="description">
Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The zero-based index of the row to set.</td>
</tr>
<tr>
<td class="name"><code>cartesian</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian4.html">Cartesian4</a></span>
</td>
<td class="description last">
The Cartesian whose values will be assigned to the specified row.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<span class="param-type"><a href="DeveloperError.html">DeveloperError</a></span>
: index must be 0, 1, 2, or 3.
</div>
</li>
</ul>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//create a new Matrix4 instance with new row values from the Cartesian4 instance
// 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]
const a = Cesium.Matrix4.setRow(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());
// m remains the same
// a = [10.0, 11.0, 12.0, 13.0]
// [14.0, 15.0, 16.0, 17.0]
// [99.0, 98.0, 97.0, 96.0]
// [22.0, 23.0, 24.0, 25.0]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".setScale">
<a href="#.setScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setScale<span class="signature">(matrix, scale, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1492">Core/Matrix4.js 1492</a>
</div>
</h4>
</div>
<div class="description">
Computes a new matrix that replaces the scale with the provided scale.
This assumes the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The scale that replaces the scale of the provided matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.setUniformScale">Matrix4.setUniformScale</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.multiplyByScale">Matrix4.multiplyByScale</a></li>
<li><a href="Matrix4.html#.multiplyByUniformScale">Matrix4.multiplyByUniformScale</a></li>
<li><a href="Matrix4.html#.getScale">Matrix4.getScale</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".setTranslation">
<a href="#.setTranslation" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setTranslation<span class="signature">(matrix, translation, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1444">Core/Matrix4.js 1444</a>
</div>
</h4>
</div>
<div class="description">
Computes a new matrix that replaces the translation in the rightmost column of the provided
matrix with the provided translation. This assumes the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>translation</code></td>
<td class="type">
<span class="param-type"><a href="Cartesian3.html">Cartesian3</a></span>
</td>
<td class="description last">
The translation that replaces the translation of the provided matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".setUniformScale">
<a href="#.setUniformScale" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.setUniformScale<span class="signature">(matrix, scale, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1545">Core/Matrix4.js 1545</a>
</div>
</h4>
</div>
<div class="description">
Computes a new matrix that replaces the scale with the provided uniform scale.
This assumes the matrix is an affine transformation.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use.</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The uniform scale that replaces the scale of the provided matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>See:</h5>
<ul class="see-list">
<li><a href="Matrix4.html#.setScale">Matrix4.setScale</a></li>
<li><a href="Matrix4.html#.fromScale">Matrix4.fromScale</a></li>
<li><a href="Matrix4.html#.fromUniformScale">Matrix4.fromUniformScale</a></li>
<li><a href="Matrix4.html#.multiplyByScale">Matrix4.multiplyByScale</a></li>
<li><a href="Matrix4.html#.multiplyByUniformScale">Matrix4.multiplyByUniformScale</a></li>
<li><a href="Matrix4.html#.getScale">Matrix4.getScale</a></li>
</ul>
</dl>
<div class="nameContainer">
<h4 class="name" id=".subtract">
<a href="#.subtract" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.subtract<span class="signature">(left, right, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1853">Core/Matrix4.js 1853</a>
</div>
</h4>
</div>
<div class="description">
Computes the difference of two matrices.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>left</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The first matrix.</td>
</tr>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The second matrix.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".toArray">
<a href="#.toArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.toArray<span class="signature">(matrix, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType">Array.&lt;Number></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L1173">Core/Matrix4.js 1173</a>
</div>
</h4>
</div>
<div class="description">
Computes an Array from the provided Matrix4 instance.
The array will be in column-major order.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to use..</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The Array onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified Array parameter or a new Array instance if one was not provided.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//create an array from an instance of Matrix4
// m = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]
const a = Cesium.Matrix4.toArray(m);
// m remains the same
//creates a = [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]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".transpose">
<a href="#.transpose" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.transpose<span class="signature">(matrix, result)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L2422">Core/Matrix4.js 2422</a>
</div>
</h4>
</div>
<div class="description">
Computes the transpose of the provided matrix.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>matrix</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The matrix to transpose.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="description last">
The object onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter.
</div>
<dl class="details">
<h5>Example:</h5>
<pre><code class="language-javascript">//returns transpose of a Matrix4
// 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]
const a = Cesium.Matrix4.transpose(m, new Cesium.Matrix4());
// m remains the same
// a = [10.0, 14.0, 18.0, 22.0]
// [11.0, 15.0, 19.0, 23.0]
// [12.0, 16.0, 20.0, 24.0]
// [13.0, 17.0, 21.0, 25.0]</code></pre>
</dl>
<div class="nameContainer">
<h4 class="name" id=".unpack">
<a href="#.unpack" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.unpack<span class="signature">(array, <span class="optional">startingIndex</span>, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="Matrix4.html">Matrix4</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L143">Core/Matrix4.js 143</a>
</div>
</h4>
</div>
<div class="description">
Retrieves an instance from a packed array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="default">
</td>
<td class="description last">
The packed array.</td>
</tr>
<tr>
<td class="name"><code>startingIndex</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="default">
<code class="language-javascript">0</code>
</td>
<td class="description last">
<span class="optional">optional</span>
The starting index of the element to be unpacked.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
The object into which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new Matrix4 instance if one was not provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".unpackArray">
<a href="#.unpackArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.Matrix4.unpackArray<span class="signature">(array, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType">Array.&lt;<a href="Matrix4.html">Matrix4</a>></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/Matrix4.js#L213">Core/Matrix4.js 213</a>
</div>
</h4>
</div>
<div class="description">
Unpacks an array of column-major matrix components into an array of Matrix4s.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">Array.&lt;Number></span>
</td>
<td class="description last">
The array of components to unpack.</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="Matrix4.html">Matrix4</a>></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The array onto which to store the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The unpacked array.
</div>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a>
</footer>
</div>
<div class="nav">
<div class="menu">
<input type="text" class="classFilter" id="ClassFilter" placeholder="Search">
<ul id="ClassList"><li data-name="Animation"><a href="Animation.html">Animation</a></li><li data-name="AnimationViewModel"><a href="AnimationViewModel.html">AnimationViewModel</a></li><li data-name="Appearance"><a href="Appearance.html">Appearance</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="ArcGISTiledElevationTerrainProvider"><a href="ArcGISTiledElevationTerrainProvider.html">ArcGISTiledElevationTerrainProvider</a></li><li data-name="ArcType"><a href="global.html#ArcType">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="Axis"><a href="global.html#Axis">Axis</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="backFaceCulling"><a href="global.html#backFaceCulling">backFaceCulling</a></li><li data-name="barycentricCoordinates"><a href="global.html#barycentricCoordinates">barycentricCoordinates</a></li><li data-name="BaseLayerPicker"><a href="BaseLayerPicker.html">BaseLayerPicker</a></li><li data-name="BaseLayerPickerViewModel"><a href="BaseLayerPickerViewModel.html">BaseLayerPickerViewModel</a></li><li data-name="Billboard"><a href="Billboard.html">Billboard</a></li><li data-name="BillboardCollection"><a href="BillboardCollection.html">BillboardCollection</a></li><li data-name="BillboardGraphics"><a href="BillboardGraphics.html">BillboardGraphics</a></li><li data-name="BillboardVisualizer"><a href="BillboardVisualizer.html">BillboardVisualizer</a></li><li data-name="binarySearch"><a href="global.html#binarySearch">binarySearch</a></li><li data-name="binarySearchComparator"><a href="global.html#binarySearchComparator">binarySearchComparator</a></li><li data-name="BingMapsGeocoderService"><a href="BingMapsGeocoderService.html">BingMapsGeocoderService</a></li><li data-name="BingMapsImageryProvider"><a href="BingMapsImageryProvider.html">BingMapsImageryProvider</a></li><li data-name="BingMapsStyle"><a href="global.html#BingMapsStyle">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="global.html#BlendEquation">BlendEquation</a></li><li data-name="BlendFunction"><a href="global.html#BlendFunction">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="global.html#BlendOption">BlendOption</a></li><li data-name="BoundingRectangle"><a href="BoundingRectangle.html">BoundingRectangle</a></li><li data-name="BoundingSphere"><a href="BoundingSphere.html">BoundingSphere</a></li><li data-name="boundingSphere"><a href="global.html#boundingSphere">boundingSphere</a></li><li data-name="BoxEmitter"><a href="BoxEmitter.html">BoxEmitter</a></li><li data-name="BoxGeometry"><a href="BoxGeometry.html">BoxGeometry</a></li><li data-name="BoxGeometryUpdater"><a href="BoxGeometryUpdater.html">BoxGeometryUpdater</a></li><li data-name="BoxGraphics"><a href="BoxGraphics.html">BoxGraphics</a></li><li data-name="BoxOutlineGeometry"><a href="BoxOutlineGeometry.html">BoxOutlineGeometry</a></li><li data-name="buildModuleUrl"><a href="global.html#buildModuleUrl">buildModuleUrl</a></li><li data-name="CallbackProperty"><a href="CallbackProperty.html">CallbackProperty</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="CameraEventAggregator"><a href="CameraEventAggregator.html">CameraEventAggregator</a></li><li data-name="CameraEventType"><a href="global.html#CameraEventType">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="global.html#cancelAnimationFrame">cancelAnimationFrame</a></li><li data-name="Cartesian2"><a href="Cartesian2.html">Cartesian2</a></li><li data-name="Cartesian3"><a href="Cartesian3.html">Cartesian3</a></li><li data-name="Cartesian4"><a href="Cartesian4.html">Cartesian4</a></li><li data-name="Cartographic"><a href="Cartographic.html">Cartographic</a></li><li data-name="CartographicGeocoderService"><a href="CartographicGeocoderServic
</div>
</div>
<script>
if (window.frameElement) {
document.body.className = 'embedded';
var ele = document.createElement('a');
ele.className = 'popout';
ele.target = '_blank';
ele.href = window.location.href;
ele.title = 'Pop out';
document.getElementById('main').appendChild(ele);
}
// Set targets on external links. Sandcastle and GitHub shouldn't be embedded in any iframe.
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
if (/^https?:/i.test(a.getAttribute('href'))) {
a.target='_blank';
}
});
</script>
<script src="javascript/prism.js"></script>
<script src="javascript/cesiumDoc.js"></script>
</body>
</html>