@babylonjs/core 5.7.0 → 5.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/DeviceInput/InputDevices/webDeviceInputSystem.js +1 -1
  2. package/DeviceInput/InputDevices/webDeviceInputSystem.js.map +1 -1
  3. package/Engines/Extensions/engine.dynamicBuffer.js +7 -5
  4. package/Engines/Extensions/engine.dynamicBuffer.js.map +1 -1
  5. package/Engines/Extensions/engine.rawTexture.d.ts +4 -2
  6. package/Engines/Extensions/engine.rawTexture.js +9 -4
  7. package/Engines/Extensions/engine.rawTexture.js.map +1 -1
  8. package/Engines/WebGPU/Extensions/engine.computeShader.js +3 -1
  9. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  10. package/Engines/WebGPU/Extensions/engine.dynamicBuffer.js +3 -21
  11. package/Engines/WebGPU/Extensions/engine.dynamicBuffer.js.map +1 -1
  12. package/Engines/WebGPU/Extensions/engine.rawTexture.js +7 -3
  13. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  14. package/Engines/WebGPU/webgpuConstants.d.ts +8 -2
  15. package/Engines/WebGPU/webgpuConstants.js +15 -8
  16. package/Engines/WebGPU/webgpuConstants.js.map +1 -1
  17. package/Engines/WebGPU/webgpuTextureHelper.js +4 -0
  18. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  19. package/Engines/engine.d.ts +56 -77
  20. package/Engines/nativeEngine.d.ts +4 -4
  21. package/Engines/nativeEngine.js +9 -5
  22. package/Engines/nativeEngine.js.map +1 -1
  23. package/Engines/nullEngine.d.ts +4 -2
  24. package/Engines/nullEngine.js +11 -3
  25. package/Engines/nullEngine.js.map +1 -1
  26. package/Engines/thinEngine.js +30 -4
  27. package/Engines/thinEngine.js.map +1 -1
  28. package/Engines/webgpuEngine.js +2 -8
  29. package/Engines/webgpuEngine.js.map +1 -1
  30. package/Gizmos/boundingBoxGizmo.js +5 -0
  31. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  32. package/Gizmos/gizmo.js +8 -2
  33. package/Gizmos/gizmo.js.map +1 -1
  34. package/Inputs/scene.inputManager.js +5 -2
  35. package/Inputs/scene.inputManager.js.map +1 -1
  36. package/Loading/Plugins/babylonFileLoader.js +1 -0
  37. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  38. package/Materials/Node/Blocks/Input/inputBlock.js +7 -0
  39. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  40. package/Materials/Node/nodeMaterial.d.ts +4 -2
  41. package/Materials/Node/nodeMaterial.js +13 -4
  42. package/Materials/Node/nodeMaterial.js.map +1 -1
  43. package/Materials/PBR/pbrBaseMaterial.js +1 -1
  44. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  45. package/Materials/Textures/internalTexture.js +1 -1
  46. package/Materials/Textures/internalTexture.js.map +1 -1
  47. package/Materials/Textures/rawTexture.d.ts +10 -4
  48. package/Materials/Textures/rawTexture.js +20 -9
  49. package/Materials/Textures/rawTexture.js.map +1 -1
  50. package/Materials/effect.d.ts +1 -0
  51. package/Materials/effect.js +5 -0
  52. package/Materials/effect.js.map +1 -1
  53. package/Materials/standardMaterial.js +5 -1
  54. package/Materials/standardMaterial.js.map +1 -1
  55. package/Maths/math.vector.js +5 -5
  56. package/Maths/math.vector.js.map +1 -1
  57. package/Meshes/Builders/groundBuilder.d.ts +1 -1
  58. package/Meshes/Builders/groundBuilder.js.map +1 -1
  59. package/Meshes/abstractMesh.d.ts +0 -5
  60. package/Meshes/abstractMesh.js +1 -13
  61. package/Meshes/abstractMesh.js.map +1 -1
  62. package/Meshes/instancedMesh.js +2 -0
  63. package/Meshes/instancedMesh.js.map +1 -1
  64. package/Meshes/mesh.d.ts +1 -1
  65. package/Meshes/mesh.js +60 -32
  66. package/Meshes/mesh.js.map +1 -1
  67. package/Navigation/Plugins/recastJSPlugin.js +1 -1
  68. package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
  69. package/Particles/pointsCloudSystem.d.ts +12 -0
  70. package/Particles/pointsCloudSystem.js +30 -0
  71. package/Particles/pointsCloudSystem.js.map +1 -1
  72. package/PostProcesses/depthOfFieldBlurPostProcess.d.ts +1 -1
  73. package/PostProcesses/depthOfFieldBlurPostProcess.js +2 -4
  74. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  75. package/Rendering/geometryBufferRenderer.d.ts +6 -2
  76. package/Rendering/geometryBufferRenderer.js +209 -18
  77. package/Rendering/geometryBufferRenderer.js.map +1 -1
  78. package/Shaders/ShadersInclude/defaultFragmentDeclaration.js +1 -1
  79. package/Shaders/ShadersInclude/defaultFragmentDeclaration.js.map +1 -1
  80. package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js +1 -1
  81. package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js.map +1 -1
  82. package/Shaders/ShadersInclude/vertexColorMixing.js +1 -1
  83. package/Shaders/ShadersInclude/vertexColorMixing.js.map +1 -1
  84. package/Shaders/default.fragment.js +1 -1
  85. package/Shaders/default.fragment.js.map +1 -1
  86. package/Shaders/geometry.fragment.d.ts +1 -0
  87. package/Shaders/geometry.fragment.js +2 -1
  88. package/Shaders/geometry.fragment.js.map +1 -1
  89. package/Shaders/geometry.vertex.js +1 -1
  90. package/Shaders/geometry.vertex.js.map +1 -1
  91. package/Shaders/pbr.fragment.js +1 -1
  92. package/Shaders/pbr.fragment.js.map +1 -1
  93. package/XR/features/WebXRControllerPointerSelection.js +1 -1
  94. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  95. package/package.json +1 -1
  96. package/scene.d.ts +4 -0
  97. package/scene.js +4 -0
  98. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"math.vector.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Maths/math.vector.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,OAAO,E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C,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,6CAA6C;IACrG,iBAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,2CAA2C;IACjH,iBAAC;CAAA,AAND,IAMC;SANY,UAAU;AAQvB,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAExC,IAAM,yBAAyB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { Epsilon } from \"./math.constants\";\r\nimport type { Viewport } from \"./math.viewport\";\r\nimport type { DeepImmutable, Nullable, FloatArray, float } from \"../types\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport type { IPlaneLike } from \"./math.like\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { Plane } from \"./math.plane\";\r\nimport { PerformanceConfigurator } from \"../Engines/performanceConfigurator\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\ntype TransformNode = import(\"../Meshes/transformNode\").TransformNode;\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst _ExtractAsInt = (value: number) => {\r\n return parseInt(value.toString().replace(/\\W/g, \"\"));\r\n};\r\n\r\n/**\r\n * Class representing a vector containing 2 coordinates\r\n */\r\nexport class Vector2 {\r\n /**\r\n * Creates a new Vector2 from the given x and y coordinates\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n */\r\n constructor(\r\n /** defines the first coordinate */\r\n public x: number = 0,\r\n /** defines the second coordinate */\r\n public y: number = 0\r\n ) {}\r\n\r\n /**\r\n * Gets a string with the Vector2 coordinates\r\n * @returns a string with the Vector2 coordinates\r\n */\r\n public toString(): string {\r\n return `{X: ${this.x} Y: ${this.y}}`;\r\n }\r\n\r\n /**\r\n * Gets class name\r\n * @returns the string \"Vector2\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector2\";\r\n }\r\n\r\n /**\r\n * Gets current vector hash code\r\n * @returns the Vector2 hash code as a number\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this.x);\r\n const y = _ExtractAsInt(this.y);\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Sets the Vector2 coordinates in the given array or Float32Array from the given index.\r\n * @param array defines the source array\r\n * @param index defines the offset in source array\r\n * @returns the current Vector2\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Vector2 {\r\n array[index] = this.x;\r\n array[index + 1] = this.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector2 {\r\n Vector2.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Copy the current vector to an array\r\n * @returns a new array with 2 elements: the Vector2 coordinates.\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given Vector2 coordinates\r\n * @param source defines the source Vector2\r\n * @returns the current updated Vector2\r\n */\r\n public copyFrom(source: DeepImmutable<Vector2>): Vector2 {\r\n this.x = source.x;\r\n this.y = source.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns the current updated Vector2\r\n */\r\n public copyFromFloats(x: number, y: number): Vector2 {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns the current updated Vector2\r\n */\r\n public set(x: number, y: number): Vector2 {\r\n return this.copyFromFloats(x, y);\r\n }\r\n /**\r\n * Add another vector with the current one\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates\r\n */\r\n public add(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return new Vector2(this.x + otherVector.x, this.y + otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the addition of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x + otherVector.x;\r\n result.y = this.y + otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the Vector2 coordinates by adding the given Vector2 coordinates\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x += otherVector.x;\r\n this.y += otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public addVector3(otherVector: Vector3): Vector2 {\r\n return new Vector2(this.x + otherVector.x, this.y + otherVector.y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public subtract(otherVector: Vector2): Vector2 {\r\n return new Vector2(this.x - otherVector.x, this.y - otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the subtraction of the given one from the current Vector2 coordinates.\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x - otherVector.x;\r\n result.y = this.y - otherVector.y;\r\n return this;\r\n }\r\n /**\r\n * Sets the current Vector2 coordinates by subtracting from it the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x -= otherVector.x;\r\n this.y -= otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current Vector2 coordinates by the given ones\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public multiplyInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x *= otherVector.x;\r\n this.y *= otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return new Vector2(this.x * otherVector.x, this.y * otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets \"result\" coordinates with the multiplication of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x * otherVector.x;\r\n result.y = this.y * otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns a new Vector2\r\n */\r\n public multiplyByFloats(x: number, y: number): Vector2 {\r\n return new Vector2(this.x * x, this.y * y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public divide(otherVector: Vector2): Vector2 {\r\n return new Vector2(this.x / otherVector.x, this.y / otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the Vector2 divided by the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x / otherVector.x;\r\n result.y = this.y / otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Vector2 coordinates by the given ones\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public divideInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 with current Vector2 negated coordinates\r\n * @returns a new Vector2\r\n */\r\n public negate(): Vector2 {\r\n return new Vector2(-this.x, -this.y);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector2 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector2 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector2\r\n */\r\n public negateToRef(result: Vector2): Vector2 {\r\n return result.copyFromFloats(this.x * -1, this.y * -1);\r\n }\r\n\r\n /**\r\n * Multiply the Vector2 coordinates by scale\r\n * @param scale defines the scaling factor\r\n * @returns the current updated Vector2\r\n */\r\n public scaleInPlace(scale: number): Vector2 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 scaled by \"scale\" from the current Vector2\r\n * @param scale defines the scaling factor\r\n * @returns a new Vector2\r\n */\r\n public scale(scale: number): Vector2 {\r\n const result = new Vector2(0, 0);\r\n this.scaleToRef(scale, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Scale the current Vector2 values by a factor to a given Vector2\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector2 object where to store the result\r\n * @returns the unmodified current Vector2\r\n */\r\n public scaleToRef(scale: number, result: Vector2): Vector2 {\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Vector2 values by a factor and add the result to a given Vector2\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector2 object where to store the result\r\n * @returns the unmodified current Vector2\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector2): Vector2 {\r\n result.x += this.x * scale;\r\n result.y += this.y * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two vectors are equals\r\n * @param otherVector defines the other vector\r\n * @returns true if the given vector coordinates strictly equal the current Vector2 ones\r\n */\r\n public equals(otherVector: DeepImmutable<Vector2>): boolean {\r\n return otherVector && this.x === otherVector.x && this.y === otherVector.y;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two vectors are equals (using an epsilon value)\r\n * @param otherVector defines the other vector\r\n * @param epsilon defines the minimal distance to consider equality\r\n * @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector2>, epsilon: number = Epsilon): boolean {\r\n return otherVector && Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) && Scalar.WithinEpsilon(this.y, otherVector.y, epsilon);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 from current Vector2 floored values\r\n * eg (1.2, 2.31) returns (1, 2)\r\n * @returns a new Vector2\r\n */\r\n public floor(): Vector2 {\r\n return new Vector2(Math.floor(this.x), Math.floor(this.y));\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 from current Vector2 fractional values\r\n * eg (1.2, 2.31) returns (0.2, 0.31)\r\n * @returns a new Vector2\r\n */\r\n public fract(): Vector2 {\r\n return new Vector2(this.x - Math.floor(this.x), this.y - Math.floor(this.y));\r\n }\r\n\r\n /**\r\n * Rotate the current vector into a given result vector\r\n * @param angle defines the rotation angle\r\n * @param result defines the result vector where to store the rotated vector\r\n * @returns the current vector\r\n */\r\n public rotateToRef(angle: number, result: Vector2) {\r\n const cos = Math.cos(angle);\r\n const sin = Math.sin(angle);\r\n result.x = cos * this.x - sin * this.y;\r\n result.y = sin * this.x + cos * this.y;\r\n\r\n return this;\r\n }\r\n\r\n // Properties\r\n\r\n /**\r\n * Gets the length of the vector\r\n * @returns the vector length (float)\r\n */\r\n public length(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y);\r\n }\r\n\r\n /**\r\n * Gets the vector squared length\r\n * @returns the vector squared length (float)\r\n */\r\n public lengthSquared(): number {\r\n return this.x * this.x + this.y * this.y;\r\n }\r\n\r\n // Methods\r\n\r\n /**\r\n * Normalize the vector\r\n * @returns the current updated Vector2\r\n */\r\n public normalize(): Vector2 {\r\n Vector2.NormalizeToRef(this, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 copied from the Vector2\r\n * @returns a new Vector2\r\n */\r\n public clone(): Vector2 {\r\n return new Vector2(this.x, this.y);\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Gets a new Vector2(0, 0)\r\n * @returns a new Vector2\r\n */\r\n public static Zero(): Vector2 {\r\n return new Vector2(0, 0);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2(1, 1)\r\n * @returns a new Vector2\r\n */\r\n public static One(): Vector2 {\r\n return new Vector2(1, 1);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set from the given index element of the given array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the data source\r\n * @returns a new Vector2\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Vector2 {\r\n return new Vector2(array[offset], array[offset + 1]);\r\n }\r\n\r\n /**\r\n * Sets \"result\" from the given index element of the given array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the data source\r\n * @param result defines the target vector\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector2): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 located for \"amount\" (float) on the CatmullRom spline defined by the given four Vector2\r\n * @param value1 defines 1st point of control\r\n * @param value2 defines 2nd point of control\r\n * @param value3 defines 3rd point of control\r\n * @param value4 defines 4th point of control\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static CatmullRom(\r\n value1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n value3: DeepImmutable<Vector2>,\r\n value4: DeepImmutable<Vector2>,\r\n amount: number\r\n ): Vector2 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n\r\n const x =\r\n 0.5 *\r\n (2.0 * value2.x +\r\n (-value1.x + value3.x) * amount +\r\n (2.0 * value1.x - 5.0 * value2.x + 4.0 * value3.x - value4.x) * squared +\r\n (-value1.x + 3.0 * value2.x - 3.0 * value3.x + value4.x) * cubed);\r\n\r\n const y =\r\n 0.5 *\r\n (2.0 * value2.y +\r\n (-value1.y + value3.y) * amount +\r\n (2.0 * value1.y - 5.0 * value2.y + 4.0 * value3.y - value4.y) * squared +\r\n (-value1.y + 3.0 * value2.y - 3.0 * value3.y + value4.y) * cubed);\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with same the coordinates than \"value\" ones if the vector \"value\" is in the square defined by \"min\" and \"max\".\r\n * If a coordinate of \"value\" is lower than \"min\" coordinates, the returned Vector2 is given this \"min\" coordinate.\r\n * If a coordinate of \"value\" is greater than \"max\" coordinates, the returned Vector2 is given this \"max\" coordinate\r\n * @param value defines the value to clamp\r\n * @param min defines the lower limit\r\n * @param max defines the upper limit\r\n * @returns a new Vector2\r\n */\r\n public static Clamp(value: DeepImmutable<Vector2>, min: DeepImmutable<Vector2>, max: DeepImmutable<Vector2>): Vector2 {\r\n let x = value.x;\r\n x = x > max.x ? max.x : x;\r\n x = x < min.x ? min.x : x;\r\n\r\n let y = value.y;\r\n y = y > max.y ? max.y : y;\r\n y = y < min.y ? min.y : y;\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 located for \"amount\" (float) on the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\"\r\n * @param value1 defines the 1st control point\r\n * @param tangent1 defines the outgoing tangent\r\n * @param value2 defines the 2nd control point\r\n * @param tangent2 defines the incoming tangent\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n amount: number\r\n ): Vector2 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1.x * part1 + value2.x * part2 + tangent1.x * part3 + tangent2.x * part4;\r\n const y = value1.y * part1 + value2.y * part2 + tangent1.y * part3 + tangent2.y * part4;\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n time: number\r\n ): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where the derivative will be stored\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n time: number,\r\n result: Vector2\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 located for \"amount\" (float) on the linear interpolation between the vector \"start\" adn the vector \"end\".\r\n * @param start defines the start vector\r\n * @param end defines the end vector\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static Lerp(start: DeepImmutable<Vector2>, end: DeepImmutable<Vector2>, amount: number): Vector2 {\r\n const x = start.x + (end.x - start.x) * amount;\r\n const y = start.y + (end.y - start.y) * amount;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets the dot product of the vector \"left\" and the vector \"right\"\r\n * @param left defines first vector\r\n * @param right defines second vector\r\n * @returns the dot product (float)\r\n */\r\n public static Dot(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): number {\r\n return left.x * right.x + left.y * right.y;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 equal to the normalized given vector\r\n * @param vector defines the vector to normalize\r\n * @returns a new Vector2\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector2>): Vector2 {\r\n const newVector = Vector2.Zero();\r\n this.NormalizeToRef(vector, newVector);\r\n return newVector;\r\n }\r\n\r\n /**\r\n * Normalize a given vector into a second one\r\n * @param vector defines the vector to normalize\r\n * @param result defines the vector where to store the result\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector2>, result: Vector2) {\r\n const len = vector.length();\r\n\r\n if (len === 0) {\r\n return;\r\n }\r\n\r\n result.x = vector.x / len;\r\n result.y = vector.y / len;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the minimal coordinate values from the \"left\" and \"right\" vectors\r\n * @param left defines 1st vector\r\n * @param right defines 2nd vector\r\n * @returns a new Vector2\r\n */\r\n public static Minimize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2 {\r\n const x = left.x < right.x ? left.x : right.x;\r\n const y = left.y < right.y ? left.y : right.y;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the maximal coordinate values from the \"left\" and \"right\" vectors\r\n * @param left defines 1st vector\r\n * @param right defines 2nd vector\r\n * @returns a new Vector2\r\n */\r\n public static Maximize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2 {\r\n const x = left.x > right.x ? left.x : right.x;\r\n const y = left.y > right.y ? left.y : right.y;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix\r\n * @param vector defines the vector to transform\r\n * @param transformation defines the matrix to apply\r\n * @returns a new Vector2\r\n */\r\n public static Transform(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>): Vector2 {\r\n const r = Vector2.Zero();\r\n Vector2.TransformToRef(vector, transformation, r);\r\n return r;\r\n }\r\n\r\n /**\r\n * Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector \"result\" coordinates\r\n * @param vector defines the vector to transform\r\n * @param transformation defines the matrix to apply\r\n * @param result defines the target vector\r\n */\r\n public static TransformToRef(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>, result: Vector2) {\r\n const m = transformation.m;\r\n const x = vector.x * m[0] + vector.y * m[4] + m[12];\r\n const y = vector.x * m[1] + vector.y * m[5] + m[13];\r\n result.x = x;\r\n result.y = y;\r\n }\r\n\r\n /**\r\n * Determines if a given vector is included in a triangle\r\n * @param p defines the vector to test\r\n * @param p0 defines 1st triangle point\r\n * @param p1 defines 2nd triangle point\r\n * @param p2 defines 3rd triangle point\r\n * @returns true if the point \"p\" is in the triangle defined by the vectors \"p0\", \"p1\", \"p2\"\r\n */\r\n public static PointInTriangle(p: DeepImmutable<Vector2>, p0: DeepImmutable<Vector2>, p1: DeepImmutable<Vector2>, p2: DeepImmutable<Vector2>) {\r\n const a = (1 / 2) * (-p1.y * p2.x + p0.y * (-p1.x + p2.x) + p0.x * (p1.y - p2.y) + p1.x * p2.y);\r\n const sign = a < 0 ? -1 : 1;\r\n const s = (p0.y * p2.x - p0.x * p2.y + (p2.y - p0.y) * p.x + (p0.x - p2.x) * p.y) * sign;\r\n const t = (p0.x * p1.y - p0.y * p1.x + (p0.y - p1.y) * p.x + (p1.x - p0.x) * p.y) * sign;\r\n\r\n return s > 0 && t > 0 && s + t < 2 * a * sign;\r\n }\r\n\r\n /**\r\n * Gets the distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns the distance between vectors\r\n */\r\n public static Distance(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number {\r\n return Math.sqrt(Vector2.DistanceSquared(value1, value2));\r\n }\r\n\r\n /**\r\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns the squared distance between vectors\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number {\r\n const x = value1.x - value2.x;\r\n const y = value1.y - value2.y;\r\n return x * x + y * y;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 located at the center of the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns a new Vector2\r\n */\r\n public static Center(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): Vector2 {\r\n return Vector2.CenterToRef(value1, value2, Vector2.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, ref: DeepImmutable<Vector2>): Vector2 {\r\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2);\r\n }\r\n\r\n /**\r\n * Gets the shortest distance (float) between the point \"p\" and the segment defined by the two points \"segA\" and \"segB\".\r\n * @param p defines the middle point\r\n * @param segA defines one point of the segment\r\n * @param segB defines the other point of the segment\r\n * @returns the shortest distance\r\n */\r\n public static DistanceOfPointFromSegment(p: DeepImmutable<Vector2>, segA: DeepImmutable<Vector2>, segB: DeepImmutable<Vector2>): number {\r\n const l2 = Vector2.DistanceSquared(segA, segB);\r\n if (l2 === 0.0) {\r\n return Vector2.Distance(p, segA);\r\n }\r\n const v = segB.subtract(segA);\r\n const t = Math.max(0, Math.min(1, Vector2.Dot(p.subtract(segA), v) / l2));\r\n const proj = segA.add(v.multiplyByFloats(t, t));\r\n return Vector2.Distance(p, proj);\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store (x,y,z) vector representation\r\n * A Vector3 is the main object used in 3D geometry\r\n * It can represent either the coordinates of a point the space, either a direction\r\n * Reminder: js uses a left handed forward facing system\r\n */\r\nexport class Vector3 {\r\n private static _UpReadOnly = Vector3.Up() as DeepImmutable<Vector3>;\r\n private static _LeftHandedForwardReadOnly = Vector3.Forward(false) as DeepImmutable<Vector3>;\r\n private static _RightHandedForwardReadOnly = Vector3.Forward(true) as DeepImmutable<Vector3>;\r\n private static _RightReadOnly = Vector3.Right() as DeepImmutable<Vector3>;\r\n private static _LeftReadOnly = Vector3.Left() as DeepImmutable<Vector3>;\r\n private static _ZeroReadOnly = Vector3.Zero() as DeepImmutable<Vector3>;\r\n\r\n /** @hidden */\r\n public _x: number;\r\n\r\n /** @hidden */\r\n public _y: number;\r\n\r\n /** @hidden */\r\n public _z: number;\r\n\r\n /** @hidden */\r\n public _isDirty = true;\r\n\r\n /** Gets or sets the x coordinate */\r\n public get x() {\r\n return this._x;\r\n }\r\n\r\n public set x(value: number) {\r\n this._x = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the y coordinate */\r\n public get y() {\r\n return this._y;\r\n }\r\n\r\n public set y(value: number) {\r\n this._y = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the z coordinate */\r\n public get z() {\r\n return this._z;\r\n }\r\n\r\n public set z(value: number) {\r\n this._z = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /**\r\n * Creates a new Vector3 object from the given x, y, z (floats) coordinates.\r\n * @param x defines the first coordinates (on X axis)\r\n * @param y defines the second coordinates (on Y axis)\r\n * @param z defines the third coordinates (on Z axis)\r\n */\r\n constructor(x: number = 0, y: number = 0, z: number = 0) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n }\r\n\r\n /**\r\n * Creates a string representation of the Vector3\r\n * @returns a string with the Vector3 coordinates.\r\n */\r\n public toString(): string {\r\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z}}`;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Vector3\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector3\";\r\n }\r\n\r\n /**\r\n * Creates the Vector3 hash code\r\n * @returns a number which tends to be unique between Vector3 instances\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this._x);\r\n const y = _ExtractAsInt(this._y);\r\n const z = _ExtractAsInt(this._z);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Creates an array containing three elements : the coordinates of the Vector3\r\n * @returns a new array of numbers\r\n */\r\n public asArray(): number[] {\r\n const result: number[] = [];\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Populates the given array or Float32Array from the given index with the successive coordinates of the Vector3\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Vector3 {\r\n array[index] = this._x;\r\n array[index + 1] = this._y;\r\n array[index + 2] = this._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector3 {\r\n Vector3.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts the current Vector3 into a quaternion (considering that the Vector3 contains Euler angles representation of a rotation)\r\n * @returns a new Quaternion object, computed from the Vector3 coordinates\r\n */\r\n public toQuaternion(): Quaternion {\r\n return Quaternion.RotationYawPitchRoll(this._y, this._x, this._z);\r\n }\r\n\r\n /**\r\n * Adds the given vector to the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return this.addInPlaceFromFloats(otherVector._x, otherVector._y, otherVector._z);\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Vector3\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public addInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n this.x += x;\r\n this.y += y;\r\n this.z += z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector3, result of the addition the current Vector3 and the given vector\r\n * @param otherVector defines the second operand\r\n * @returns the resulting Vector3\r\n */\r\n public add(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\r\n }\r\n\r\n /**\r\n * Adds the current Vector3 to the given one and stores the result in the vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\r\n }\r\n\r\n /**\r\n * Subtract the given vector from the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n this.x -= otherVector._x;\r\n this.y -= otherVector._y;\r\n this.z -= otherVector._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3, result of the subtraction of the given vector from the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the resulting Vector3\r\n */\r\n public subtract(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x - otherVector._x, this._y - otherVector._y, this._z - otherVector._z);\r\n }\r\n\r\n /**\r\n * Subtracts the given vector from the current Vector3 and stores the result in the vector \"result\".\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return this.subtractFromFloatsToRef(otherVector._x, otherVector._y, otherVector._z, result);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the resulting Vector3\r\n */\r\n public subtractFromFloats(x: number, y: number, z: number): Vector3 {\r\n return new Vector3(this._x - x, this._y - y, this._z - z);\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current Vector3 coordinates and set the given vector \"result\" with this result\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public subtractFromFloatsToRef(x: number, y: number, z: number, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x - x, this._y - y, this._z - z);\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 set with the current Vector3 negated coordinates\r\n * @returns a new Vector3\r\n */\r\n public negate(): Vector3 {\r\n return new Vector3(-this._x, -this._y, -this._z);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector3 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector3 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public negateToRef(result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * -1, this._y * -1, this._z * -1);\r\n }\r\n\r\n /**\r\n * Multiplies the Vector3 coordinates by the float \"scale\"\r\n * @param scale defines the multiplier factor\r\n * @returns the current updated Vector3\r\n */\r\n public scaleInPlace(scale: number): Vector3 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\r\n * @param scale defines the multiplier factor\r\n * @returns a new Vector3\r\n */\r\n public scale(scale: number): Vector3 {\r\n return new Vector3(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 coordinates by the float \"scale\" and stores the result in the given vector \"result\" coordinates\r\n * @param scale defines the multiplier factor\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public scaleToRef(scale: number, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Scale the current Vector3 values by a factor and add the result to a given Vector3\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the unmodified current Vector3\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector3): Vector3 {\r\n return result.addInPlaceFromFloats(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.\r\n * @param plane defines the plane to project to\r\n * @param origin defines the origin of the projection ray\r\n * @returns the projected vector3\r\n */\r\n public projectOnPlane(plane: Plane, origin: Vector3): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.projectOnPlaneToRef(plane, origin, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.\r\n * @param plane defines the plane to project to\r\n * @param origin defines the origin of the projection ray\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public projectOnPlaneToRef(plane: Plane, origin: Vector3, result: Vector3): void {\r\n const n = plane.normal;\r\n const d = plane.d;\r\n\r\n const V = MathTmp.Vector3[0];\r\n\r\n // ray direction\r\n this.subtractToRef(origin, V);\r\n\r\n V.normalize();\r\n\r\n const denom = Vector3.Dot(V, n);\r\n const t = -(Vector3.Dot(origin, n) + d) / denom;\r\n\r\n // P = P0 + t*V\r\n const scaledV = V.scaleInPlace(t);\r\n origin.addToRef(scaledV, result);\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 and the given vector coordinates are strictly equal\r\n * @param otherVector defines the second operand\r\n * @returns true if both vectors are equals\r\n */\r\n public equals(otherVector: DeepImmutable<Vector3>): boolean {\r\n return otherVector && this._x === otherVector._x && this._y === otherVector._y && this._z === otherVector._z;\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon\r\n * @param otherVector defines the second operand\r\n * @param epsilon defines the minimal distance to define values as equals\r\n * @returns true if both vectors are distant less than epsilon\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector3>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherVector &&\r\n Scalar.WithinEpsilon(this._x, otherVector._x, epsilon) &&\r\n Scalar.WithinEpsilon(this._y, otherVector._y, epsilon) &&\r\n Scalar.WithinEpsilon(this._z, otherVector._z, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 coordinates equals the given floats\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns true if both vectors are equals\r\n */\r\n public equalsToFloats(x: number, y: number, z: number): boolean {\r\n return this._x === x && this._y === y && this._z === z;\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 coordinates by the given ones\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public multiplyInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n this.x *= otherVector._x;\r\n this.y *= otherVector._y;\r\n this.z *= otherVector._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector\r\n * @param otherVector defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return this.multiplyByFloats(otherVector._x, otherVector._y, otherVector._z);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 by the given one and stores the result in the given vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * otherVector._x, this._y * otherVector._y, this._z * otherVector._z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the new Vector3\r\n */\r\n public multiplyByFloats(x: number, y: number, z: number): Vector3 {\r\n return new Vector3(this._x * x, this._y * y, this._z * z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones\r\n * @param otherVector defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public divide(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones.\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public divideInPlace(otherVector: Vector3): Vector3 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public minimizeInPlace(other: DeepImmutable<Vector3>): Vector3 {\r\n return this.minimizeInPlaceFromFloats(other._x, other._y, other._z);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.\r\n * @param other defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public maximizeInPlace(other: DeepImmutable<Vector3>): Vector3 {\r\n return this.maximizeInPlaceFromFloats(other._x, other._y, other._z);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public minimizeInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n if (x < this._x) {\r\n this.x = x;\r\n }\r\n if (y < this._y) {\r\n this.y = y;\r\n }\r\n if (z < this._z) {\r\n this.z = z;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public maximizeInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n if (x > this._x) {\r\n this.x = x;\r\n }\r\n if (y > this._y) {\r\n this.y = y;\r\n }\r\n if (z > this._z) {\r\n this.z = z;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Due to float precision, scale of a mesh could be uniform but float values are off by a small fraction\r\n * Check if is non uniform within a certain amount of decimal places to account for this\r\n * @param epsilon the amount the values can differ\r\n * @returns if the the vector is non uniform to a certain number of decimal places\r\n */\r\n public isNonUniformWithinEpsilon(epsilon: number) {\r\n const absX = Math.abs(this._x);\r\n const absY = Math.abs(this._y);\r\n if (!Scalar.WithinEpsilon(absX, absY, epsilon)) {\r\n return true;\r\n }\r\n\r\n const absZ = Math.abs(this._z);\r\n if (!Scalar.WithinEpsilon(absX, absZ, epsilon)) {\r\n return true;\r\n }\r\n\r\n if (!Scalar.WithinEpsilon(absY, absZ, epsilon)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same\r\n */\r\n public get isNonUniform(): boolean {\r\n const absX = Math.abs(this._x);\r\n const absY = Math.abs(this._y);\r\n if (absX !== absY) {\r\n return true;\r\n }\r\n\r\n const absZ = Math.abs(this._z);\r\n if (absX !== absZ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 from current Vector3 floored values\r\n * @returns a new Vector3\r\n */\r\n public floor(): Vector3 {\r\n return new Vector3(Math.floor(this._x), Math.floor(this._y), Math.floor(this._z));\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 from current Vector3 floored values\r\n * @returns a new Vector3\r\n */\r\n public fract(): Vector3 {\r\n return new Vector3(this._x - Math.floor(this._x), this._y - Math.floor(this._y), this._z - Math.floor(this._z));\r\n }\r\n\r\n // Properties\r\n /**\r\n * Gets the length of the Vector3\r\n * @returns the length of the Vector3\r\n */\r\n public length(): number {\r\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z);\r\n }\r\n\r\n /**\r\n * Gets the squared length of the Vector3\r\n * @returns squared length of the Vector3\r\n */\r\n public lengthSquared(): number {\r\n return this._x * this._x + this._y * this._y + this._z * this._z;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the vector contains a zero in one of its components\r\n */\r\n public get hasAZeroComponent(): boolean {\r\n return this._x * this._y * this._z === 0;\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3.\r\n * Please note that this is an in place operation.\r\n * @returns the current updated Vector3\r\n */\r\n public normalize(): Vector3 {\r\n return this.normalizeFromLength(this.length());\r\n }\r\n\r\n /**\r\n * Reorders the x y z properties of the vector in place\r\n * @param order new ordering of the properties (eg. for vector 1,2,3 with \"ZYX\" will produce 3,2,1)\r\n * @returns the current updated vector\r\n */\r\n public reorderInPlace(order: string) {\r\n order = order.toLowerCase();\r\n if (order === \"xyz\") {\r\n return this;\r\n }\r\n MathTmp.Vector3[0].copyFrom(this);\r\n [\"x\", \"y\", \"z\"].forEach((val, i) => {\r\n (<any>this)[val] = (<any>MathTmp.Vector3[0])[order[i]];\r\n });\r\n return this;\r\n }\r\n\r\n /**\r\n * Rotates the vector around 0,0,0 by a quaternion\r\n * @param quaternion the rotation quaternion\r\n * @param result vector to store the result\r\n * @returns the resulting vector\r\n */\r\n public rotateByQuaternionToRef(quaternion: Quaternion, result: Vector3) {\r\n quaternion.toRotationMatrix(MathTmp.Matrix[0]);\r\n Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Rotates a vector around a given point\r\n * @param quaternion the rotation quaternion\r\n * @param point the point to rotate around\r\n * @param result vector to store the result\r\n * @returns the resulting vector\r\n */\r\n public rotateByQuaternionAroundPointToRef(quaternion: Quaternion, point: Vector3, result: Vector3) {\r\n this.subtractToRef(point, MathTmp.Vector3[0]);\r\n MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);\r\n point.addToRef(MathTmp.Vector3[0], result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the cross product of the current vector and the \"other\" one\r\n * The cross product is then orthogonal to both current and \"other\"\r\n * @param other defines the right operand\r\n * @returns the cross product\r\n */\r\n public cross(other: Vector3) {\r\n return Vector3.Cross(this, other);\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 with the given input length.\r\n * Please note that this is an in place operation.\r\n * @param len the length of the vector\r\n * @returns the current updated Vector3\r\n */\r\n public normalizeFromLength(len: number): Vector3 {\r\n if (len === 0 || len === 1.0) {\r\n return this;\r\n }\r\n\r\n return this.scaleInPlace(1.0 / len);\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 to a new vector\r\n * @returns the new Vector3\r\n */\r\n public normalizeToNew(): Vector3 {\r\n const normalized = new Vector3(0, 0, 0);\r\n this.normalizeToRef(normalized);\r\n return normalized;\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 to the reference\r\n * @param reference define the Vector3 to update\r\n * @returns the updated Vector3\r\n */\r\n public normalizeToRef(reference: Vector3): Vector3 {\r\n const len = this.length();\r\n if (len === 0 || len === 1.0) {\r\n return reference.copyFromFloats(this._x, this._y, this._z);\r\n }\r\n\r\n return this.scaleToRef(1.0 / len, reference);\r\n }\r\n\r\n /**\r\n * Creates a new Vector3 copied from the current Vector3\r\n * @returns the new Vector3\r\n */\r\n public clone(): Vector3 {\r\n return new Vector3(this._x, this._y, this._z);\r\n }\r\n\r\n /**\r\n * Copies the given vector coordinates to the current Vector3 ones\r\n * @param source defines the source Vector3\r\n * @returns the current updated Vector3\r\n */\r\n public copyFrom(source: DeepImmutable<Vector3>): Vector3 {\r\n return this.copyFromFloats(source._x, source._y, source._z);\r\n }\r\n\r\n /**\r\n * Copies the given floats to the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public copyFromFloats(x: number, y: number, z: number): Vector3 {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given floats to the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public set(x: number, y: number, z: number): Vector3 {\r\n return this.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector3 coordinates\r\n * @param v defines the x, y and z coordinates of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public setAll(v: number): Vector3 {\r\n this.x = this.y = this.z = v;\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Get the clip factor between two vectors\r\n * @param vector0 defines the first operand\r\n * @param vector1 defines the second operand\r\n * @param axis defines the axis to use\r\n * @param size defines the size along the axis\r\n * @returns the clip factor\r\n */\r\n public static GetClipFactor(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, axis: DeepImmutable<Vector3>, size: number) {\r\n const d0 = Vector3.Dot(vector0, axis) - size;\r\n const d1 = Vector3.Dot(vector1, axis) - size;\r\n\r\n const s = d0 / (d0 - d1);\r\n\r\n return s;\r\n }\r\n\r\n /**\r\n * Get angle between two vectors\r\n * @param vector0 angle between vector0 and vector1\r\n * @param vector1 angle between vector0 and vector1\r\n * @param normal direction of the normal\r\n * @return the angle between vector0 and vector1\r\n */\r\n public static GetAngleBetweenVectors(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): number {\r\n const v0: Vector3 = vector0.normalizeToRef(MathTmp.Vector3[1]);\r\n const v1: Vector3 = vector1.normalizeToRef(MathTmp.Vector3[2]);\r\n let dot: number = Vector3.Dot(v0, v1);\r\n // Vectors are normalized so dot will be in [-1, 1] (aside precision issues enough to break the result which explains the below clamp)\r\n dot = Scalar.Clamp(dot, -1, 1);\r\n\r\n const angle = Math.acos(dot);\r\n const n = MathTmp.Vector3[3];\r\n Vector3.CrossToRef(v0, v1, n);\r\n if (Vector3.Dot(n, normal) > 0) {\r\n return isNaN(angle) ? 0 : angle;\r\n }\r\n return isNaN(angle) ? -Math.PI : -Math.acos(dot);\r\n }\r\n\r\n /**\r\n * Get angle between two vectors projected on a plane\r\n * @param vector0 angle between vector0 and vector1\r\n * @param vector1 angle between vector0 and vector1\r\n * @param normal Normal of the projection plane\r\n * @returns the angle between vector0 and vector1 projected on the plane with the specified normal\r\n */\r\n public static GetAngleBetweenVectorsOnPlane(vector0: Vector3, vector1: Vector3, normal: Vector3) {\r\n MathTmp.Vector3[0].copyFrom(vector0);\r\n const v0 = MathTmp.Vector3[0];\r\n MathTmp.Vector3[1].copyFrom(vector1);\r\n const v1 = MathTmp.Vector3[1];\r\n MathTmp.Vector3[2].copyFrom(normal);\r\n const vNormal = MathTmp.Vector3[2];\r\n const right = MathTmp.Vector3[3];\r\n const forward = MathTmp.Vector3[4];\r\n\r\n v0.normalize();\r\n v1.normalize();\r\n vNormal.normalize();\r\n\r\n Vector3.CrossToRef(vNormal, v0, right);\r\n Vector3.CrossToRef(right, vNormal, forward);\r\n\r\n const angle = Math.atan2(Vector3.Dot(v1, right), Vector3.Dot(v1, forward));\r\n\r\n return Scalar.NormalizeRadians(angle);\r\n }\r\n\r\n /**\r\n * Slerp between two vectors. See also `SmoothToRef`\r\n * @param vector0 Start vector\r\n * @param vector1 End vector\r\n * @param slerp amount (will be clamped between 0 and 1)\r\n * @param result The slerped vector\r\n */\r\n public static SlerpToRef(vector0: Vector3, vector1: Vector3, slerp: number, result: Vector3) {\r\n slerp = Scalar.Clamp(slerp, 0, 1);\r\n const vector0Dir = MathTmp.Vector3[0];\r\n const vector1Dir = MathTmp.Vector3[1];\r\n\r\n vector0Dir.copyFrom(vector0);\r\n const vector0Length = vector0Dir.length();\r\n vector0Dir.normalizeFromLength(vector0Length);\r\n\r\n vector1Dir.copyFrom(vector1);\r\n const vector1Length = vector1Dir.length();\r\n vector1Dir.normalizeFromLength(vector1Length);\r\n\r\n const dot = Vector3.Dot(vector0Dir, vector1Dir);\r\n\r\n let scale0;\r\n let scale1;\r\n\r\n if (dot < 1 - Epsilon) {\r\n const omega = Math.acos(dot);\r\n const invSin = 1 / Math.sin(omega);\r\n scale0 = Math.sin((1 - slerp) * omega) * invSin;\r\n scale1 = Math.sin(slerp * omega) * invSin;\r\n } else {\r\n // Use linear interpolation\r\n scale0 = 1 - slerp;\r\n scale1 = slerp;\r\n }\r\n\r\n vector0Dir.scaleInPlace(scale0);\r\n vector1Dir.scaleInPlace(scale1);\r\n result.copyFrom(vector0Dir).addInPlace(vector1Dir);\r\n result.scaleInPlace(Scalar.Lerp(vector0Length, vector1Length, slerp));\r\n }\r\n\r\n /**\r\n * Smooth interpolation between two vectors using Slerp\r\n * @param source source vector\r\n * @param goal goal vector\r\n * @param deltaTime current interpolation frame\r\n * @param lerpTime total interpolation time\r\n * @param result the smoothed vector\r\n */\r\n public static SmoothToRef(source: Vector3, goal: Vector3, deltaTime: number, lerpTime: number, result: Vector3) {\r\n Vector3.SlerpToRef(source, goal, lerpTime === 0 ? 1 : deltaTime / lerpTime, result);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set from the index \"offset\" of the given array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @returns the new Vector3\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Vector3 {\r\n return new Vector3(array[offset], array[offset + 1], array[offset + 2]);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set from the index \"offset\" of the given Float32Array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @returns the new Vector3\r\n * @deprecated Please use FromArray instead.\r\n */\r\n public static FromFloatArray(array: DeepImmutable<Float32Array>, offset?: number): Vector3 {\r\n return Vector3.FromArray(array, offset);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector3): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given Float32Array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param result defines the Vector3 where to store the result\r\n * @deprecated Please use FromArrayToRef instead.\r\n */\r\n public static FromFloatArrayToRef(array: DeepImmutable<Float32Array>, offset: number, result: Vector3): void {\r\n return Vector3.FromArrayToRef(array, offset, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the given floats.\r\n * @param x defines the x coordinate of the source\r\n * @param y defines the y coordinate of the source\r\n * @param z defines the z coordinate of the source\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static FromFloatsToRef(x: number, y: number, z: number, result: Vector3): void {\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, 0.0)\r\n * @returns a new empty Vector3\r\n */\r\n public static Zero(): Vector3 {\r\n return new Vector3(0.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (1.0, 1.0, 1.0)\r\n * @returns a new unit Vector3\r\n */\r\n public static One(): Vector3 {\r\n return new Vector3(1.0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 1.0, 0.0)\r\n * @returns a new up Vector3\r\n */\r\n public static Up(): Vector3 {\r\n return new Vector3(0.0, 1.0, 0.0);\r\n }\r\n\r\n /**\r\n * Gets a up Vector3 that must not be updated\r\n */\r\n public static get UpReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._UpReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a right Vector3 that must not be updated\r\n */\r\n public static get RightReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._RightReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a left Vector3 that must not be updated\r\n */\r\n public static get LeftReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._LeftReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a forward Vector3 that must not be updated\r\n */\r\n public static get LeftHandedForwardReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._LeftHandedForwardReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a forward Vector3 that must not be updated\r\n */\r\n public static get RightHandedForwardReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._RightHandedForwardReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a zero Vector3 that must not be updated\r\n */\r\n public static get ZeroReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._ZeroReadOnly;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set to (0.0, -1.0, 0.0)\r\n * @returns a new down Vector3\r\n */\r\n public static Down(): Vector3 {\r\n return new Vector3(0.0, -1.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, 1.0)\r\n * @param rightHandedSystem is the scene right-handed (negative z)\r\n * @returns a new forward Vector3\r\n */\r\n public static Forward(rightHandedSystem: boolean = false): Vector3 {\r\n return new Vector3(0.0, 0.0, rightHandedSystem ? -1.0 : 1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, -1.0)\r\n * @param rightHandedSystem is the scene right-handed (negative-z)\r\n * @returns a new forward Vector3\r\n */\r\n public static Backward(rightHandedSystem: boolean = false): Vector3 {\r\n return new Vector3(0.0, 0.0, rightHandedSystem ? 1.0 : -1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (1.0, 0.0, 0.0)\r\n * @returns a new right Vector3\r\n */\r\n public static Right(): Vector3 {\r\n return new Vector3(1.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (-1.0, 0.0, 0.0)\r\n * @returns a new left Vector3\r\n */\r\n public static Left(): Vector3 {\r\n return new Vector3(-1.0, 0.0, 0.0);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.\r\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the transformed Vector3\r\n */\r\n public static TransformCoordinates(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.TransformCoordinatesToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\r\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformCoordinatesToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n Vector3.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\r\n * This method computes transformed coordinates only, not transformed direction vectors\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformCoordinatesFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n const m = transformation.m;\r\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\r\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\r\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\r\n const rw = 1 / (x * m[3] + y * m[7] + z * m[11] + m[15]);\r\n\r\n result.x = rx * rw;\r\n result.y = ry * rw;\r\n result.z = rz * rw;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the new Vector3\r\n */\r\n public static TransformNormal(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.TransformNormalToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformNormalToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n this.TransformNormalFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z)\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformNormalFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n const m = transformation.m;\r\n result.x = x * m[0] + y * m[4] + z * m[8];\r\n result.y = x * m[1] + y * m[5] + z * m[9];\r\n result.z = x * m[2] + y * m[6] + z * m[10];\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" on the CatmullRom interpolation spline defined by the vectors \"value1\", \"value2\", \"value3\", \"value4\"\r\n * @param value1 defines the first control point\r\n * @param value2 defines the second control point\r\n * @param value3 defines the third control point\r\n * @param value4 defines the fourth control point\r\n * @param amount defines the amount on the spline to use\r\n * @returns the new Vector3\r\n */\r\n public static CatmullRom(\r\n value1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n value3: DeepImmutable<Vector3>,\r\n value4: DeepImmutable<Vector3>,\r\n amount: number\r\n ): Vector3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n\r\n const x =\r\n 0.5 *\r\n (2.0 * value2._x +\r\n (-value1._x + value3._x) * amount +\r\n (2.0 * value1._x - 5.0 * value2._x + 4.0 * value3._x - value4._x) * squared +\r\n (-value1._x + 3.0 * value2._x - 3.0 * value3._x + value4._x) * cubed);\r\n\r\n const y =\r\n 0.5 *\r\n (2.0 * value2._y +\r\n (-value1._y + value3._y) * amount +\r\n (2.0 * value1._y - 5.0 * value2._y + 4.0 * value3._y - value4._y) * squared +\r\n (-value1._y + 3.0 * value2._y - 3.0 * value3._y + value4._y) * cubed);\r\n\r\n const z =\r\n 0.5 *\r\n (2.0 * value2._z +\r\n (-value1._z + value3._z) * amount +\r\n (2.0 * value1._z - 5.0 * value2._z + 4.0 * value3._z - value4._z) * squared +\r\n (-value1._z + 3.0 * value2._z - 3.0 * value3._z + value4._z) * cubed);\r\n\r\n return new Vector3(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\r\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\r\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\r\n * @param value defines the current value\r\n * @param min defines the lower range value\r\n * @param max defines the upper range value\r\n * @returns the new Vector3\r\n */\r\n public static Clamp(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>): Vector3 {\r\n const v = new Vector3();\r\n Vector3.ClampToRef(value, min, max, v);\r\n return v;\r\n }\r\n /**\r\n * Sets the given vector \"result\" with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\r\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\r\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\r\n * @param value defines the current value\r\n * @param min defines the lower range value\r\n * @param max defines the upper range value\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static ClampToRef(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>, result: Vector3): void {\r\n let x = value._x;\r\n x = x > max._x ? max._x : x;\r\n x = x < min._x ? min._x : x;\r\n\r\n let y = value._y;\r\n y = y > max._y ? max._y : y;\r\n y = y < min._y ? min._y : y;\r\n\r\n let z = value._z;\r\n z = z > max._z ? max._z : z;\r\n z = z < min._z ? min._z : z;\r\n\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Checks if a given vector is inside a specific range\r\n * @param v defines the vector to test\r\n * @param min defines the minimum range\r\n * @param max defines the maximum range\r\n */\r\n public static CheckExtends(v: Vector3, min: Vector3, max: Vector3): void {\r\n min.minimizeInPlace(v);\r\n max.maximizeInPlace(v);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent vector\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent vector\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns the new Vector3\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n amount: number\r\n ): Vector3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\r\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\r\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\r\n return new Vector3(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n time: number\r\n ): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Vector3 with the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n time: number,\r\n result: Vector3\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n result.z = (t2 - time) * 6 * value1.z + (3 * t2 - 4 * time + 1) * tangent1.z + (-t2 + time) * 6 * value2.z + (3 * t2 - 2 * time) * tangent2.z;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" (float) on the linear interpolation between the vectors \"start\" and \"end\"\r\n * @param start defines the start value\r\n * @param end defines the end value\r\n * @param amount max defines amount between both (between 0 and 1)\r\n * @returns the new Vector3\r\n */\r\n public static Lerp(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number): Vector3 {\r\n const result = new Vector3(0, 0, 0);\r\n Vector3.LerpToRef(start, end, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the linear interpolation from the vector \"start\" for \"amount\" to the vector \"end\"\r\n * @param start defines the start value\r\n * @param end defines the end value\r\n * @param amount max defines amount between both (between 0 and 1)\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static LerpToRef(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number, result: Vector3): void {\r\n result.x = start._x + (end._x - start._x) * amount;\r\n result.y = start._y + (end._y - start._y) * amount;\r\n result.z = start._z + (end._z - start._z) * amount;\r\n }\r\n\r\n /**\r\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the dot product\r\n */\r\n public static Dot(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): number {\r\n return left._x * right._x + left._y * right._y + left._z * right._z;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the cross product of the vectors \"left\" and \"right\"\r\n * The cross product is then orthogonal to both \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the cross product\r\n */\r\n public static Cross(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.CrossToRef(left, right, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the cross product of \"left\" and \"right\"\r\n * The cross product is then orthogonal to both \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static CrossToRef(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>, result: Vector3): void {\r\n const x = left._y * right._z - left._z * right._y;\r\n const y = left._z * right._x - left._x * right._z;\r\n const z = left._x * right._y - left._y * right._x;\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the normalization of the given vector\r\n * @param vector defines the Vector3 to normalize\r\n * @returns the new Vector3\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector3>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.NormalizeToRef(vector, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the normalization of the given first vector\r\n * @param vector defines the Vector3 to normalize\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector3>, result: Vector3): void {\r\n vector.normalizeToRef(result);\r\n }\r\n\r\n /**\r\n * Project a Vector3 onto screen space\r\n * @param vector defines the Vector3 to project\r\n * @param world defines the world matrix to use\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @param viewport defines the screen viewport to use\r\n * @returns the new Vector3\r\n */\r\n public static Project(vector: DeepImmutable<Vector3>, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>, viewport: DeepImmutable<Viewport>): Vector3 {\r\n const result = new Vector3();\r\n Vector3.ProjectToRef(vector, world, transform, viewport, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Project a Vector3 onto screen space to reference\r\n * @param vector defines the Vector3 to project\r\n * @param world defines the world matrix to use\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @param viewport defines the screen viewport to use\r\n * @param result the vector in which the screen space will be stored\r\n * @returns the new Vector3\r\n */\r\n public static ProjectToRef(\r\n vector: DeepImmutable<Vector3>,\r\n world: DeepImmutable<Matrix>,\r\n transform: DeepImmutable<Matrix>,\r\n viewport: DeepImmutable<Viewport>,\r\n result: DeepImmutable<Vector3>\r\n ): Vector3 {\r\n const cw = viewport.width;\r\n const ch = viewport.height;\r\n const cx = viewport.x;\r\n const cy = viewport.y;\r\n\r\n const viewportMatrix = MathTmp.Matrix[1];\r\n\r\n Matrix.FromValuesToRef(cw / 2.0, 0, 0, 0, 0, -ch / 2.0, 0, 0, 0, 0, 0.5, 0, cx + cw / 2.0, ch / 2.0 + cy, 0.5, 1, viewportMatrix);\r\n\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(transform, matrix);\r\n matrix.multiplyToRef(viewportMatrix, matrix);\r\n\r\n Vector3.TransformCoordinatesToRef(vector, matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * @param source\r\n * @param matrix\r\n * @param result\r\n * @hidden\r\n */\r\n public static _UnprojectFromInvertedMatrixToRef(source: DeepImmutable<Vector3>, matrix: DeepImmutable<Matrix>, result: Vector3) {\r\n Vector3.TransformCoordinatesToRef(source, matrix, result);\r\n const m = matrix.m;\r\n const num = source._x * m[3] + source._y * m[7] + source._z * m[11] + m[15];\r\n if (Scalar.WithinEpsilon(num, 1.0)) {\r\n result.scaleInPlace(1.0 / num);\r\n }\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @returns the new Vector3\r\n */\r\n public static UnprojectFromTransform(source: Vector3, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>): Vector3 {\r\n return this.Unproject(source, viewportWidth, viewportHeight, world, transform, Matrix.IdentityReadOnly);\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @returns the new Vector3\r\n */\r\n public static Unproject(\r\n source: DeepImmutable<Vector3>,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>\r\n ): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n Vector3.UnprojectToRef(source, viewportWidth, viewportHeight, world, view, projection, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static UnprojectToRef(\r\n source: DeepImmutable<Vector3>,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n result: Vector3\r\n ): void {\r\n Vector3.UnprojectFloatsToRef(source._x, source._y, source._z, viewportWidth, viewportHeight, world, view, projection, result);\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param sourceX defines the screen space x coordinate to use\r\n * @param sourceY defines the screen space y coordinate to use\r\n * @param sourceZ defines the screen space z coordinate to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static UnprojectFloatsToRef(\r\n sourceX: float,\r\n sourceY: float,\r\n sourceZ: float,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n result: Vector3\r\n ): void {\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(view, matrix);\r\n matrix.multiplyToRef(projection, matrix);\r\n matrix.invert();\r\n\r\n const screenSource = MathTmp.Vector3[0];\r\n screenSource.x = (sourceX / viewportWidth) * 2 - 1;\r\n screenSource.y = -((sourceY / viewportHeight) * 2 - 1);\r\n if (EngineStore.LastCreatedEngine?.isNDCHalfZRange) {\r\n screenSource.z = sourceZ;\r\n } else {\r\n screenSource.z = 2 * sourceZ - 1.0;\r\n }\r\n\r\n Vector3._UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);\r\n }\r\n\r\n /**\r\n * Gets the minimal coordinate values between two Vector3\r\n * @param left defines the first operand\r\n * @param right defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Minimize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const min = left.clone();\r\n min.minimizeInPlace(right);\r\n return min;\r\n }\r\n\r\n /**\r\n * Gets the maximal coordinate values between two Vector3\r\n * @param left defines the first operand\r\n * @param right defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Maximize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const max = left.clone();\r\n max.maximizeInPlace(right);\r\n return max;\r\n }\r\n\r\n /**\r\n * Returns the distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the distance\r\n */\r\n public static Distance(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): number {\r\n return Math.sqrt(Vector3.DistanceSquared(value1, value2));\r\n }\r\n\r\n /**\r\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the squared distance\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): number {\r\n const x = value1._x - value2._x;\r\n const y = value1._y - value2._y;\r\n const z = value1._z - value2._z;\r\n\r\n return x * x + y * y + z * z;\r\n }\r\n\r\n /**\r\n * Projects \"vector\" on the triangle determined by its extremities \"p0\", \"p1\" and \"p2\", stores the result in \"ref\"\r\n * and returns the distance to the projected point.\r\n * From http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.4264&rep=rep1&type=pdf\r\n *\r\n * @param vector the vector to get distance from\r\n * @param p0 extremity of the triangle\r\n * @param p1 extremity of the triangle\r\n * @param p2 extremity of the triangle\r\n * @param ref variable to store the result to\r\n * @returns The distance between \"ref\" and \"vector\"\r\n */\r\n public static ProjectOnTriangleToRef(vector: DeepImmutable<Vector3>, p0: DeepImmutable<Vector3>, p1: DeepImmutable<Vector3>, p2: DeepImmutable<Vector3>, ref: Vector3): number {\r\n const p1p0 = MathTmp.Vector3[0];\r\n const p2p0 = MathTmp.Vector3[1];\r\n const p2p1 = MathTmp.Vector3[2];\r\n const normal = MathTmp.Vector3[3];\r\n const vectorp0 = MathTmp.Vector3[4];\r\n\r\n // Triangle vectors\r\n p1.subtractToRef(p0, p1p0);\r\n p2.subtractToRef(p0, p2p0);\r\n p2.subtractToRef(p1, p2p1);\r\n\r\n const p1p0L = p1p0.length();\r\n const p2p0L = p2p0.length();\r\n const p2p1L = p2p1.length();\r\n\r\n if (p1p0L < Epsilon || p2p0L < Epsilon || p2p1L < Epsilon) {\r\n // This is a degenerate triangle. As we assume this is part of a non-degenerate mesh,\r\n // we will find a better intersection later.\r\n // Let's just return one of the extremities\r\n ref.copyFrom(p0);\r\n return Vector3.Distance(vector, p0);\r\n }\r\n\r\n // Compute normal and vector to p0\r\n vector.subtractToRef(p0, vectorp0);\r\n Vector3.CrossToRef(p1p0, p2p0, normal);\r\n const nl = normal.length();\r\n if (nl < Epsilon) {\r\n // Extremities are aligned, we are back on the case of a degenerate triangle\r\n ref.copyFrom(p0);\r\n return Vector3.Distance(vector, p0);\r\n }\r\n normal.normalizeFromLength(nl);\r\n let l = vectorp0.length();\r\n if (l < Epsilon) {\r\n // Vector is p0\r\n ref.copyFrom(p0);\r\n return 0;\r\n }\r\n vectorp0.normalizeFromLength(l);\r\n\r\n // Project to \"proj\" that lies on the triangle plane\r\n const cosA = Vector3.Dot(normal, vectorp0);\r\n const projVector = MathTmp.Vector3[5];\r\n const proj = MathTmp.Vector3[6];\r\n projVector.copyFrom(normal).scaleInPlace(-l * cosA);\r\n proj.copyFrom(vector).addInPlace(projVector);\r\n\r\n // Compute barycentric coordinates (v0, v1 and v2 are axis from barycenter to extremities)\r\n const v0 = MathTmp.Vector3[4];\r\n const v1 = MathTmp.Vector3[5];\r\n const v2 = MathTmp.Vector3[7];\r\n const tmp = MathTmp.Vector3[8];\r\n\r\n v0.copyFrom(p1p0).scaleInPlace(1 / p1p0L);\r\n tmp.copyFrom(p2p0).scaleInPlace(1 / p2p0L);\r\n v0.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n v1.copyFrom(p1p0).scaleInPlace(-1 / p1p0L);\r\n tmp.copyFrom(p2p1).scaleInPlace(1 / p2p1L);\r\n v1.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n v2.copyFrom(p2p1).scaleInPlace(-1 / p2p1L);\r\n tmp.copyFrom(p2p0).scaleInPlace(-1 / p2p0L);\r\n v2.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n // Determines which edge of the triangle is closest to \"proj\"\r\n const projP = MathTmp.Vector3[9];\r\n let dot;\r\n projP.copyFrom(proj).subtractInPlace(p0);\r\n Vector3.CrossToRef(v0, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s0 = dot;\r\n\r\n projP.copyFrom(proj).subtractInPlace(p1);\r\n Vector3.CrossToRef(v1, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s1 = dot;\r\n\r\n projP.copyFrom(proj).subtractInPlace(p2);\r\n Vector3.CrossToRef(v2, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s2 = dot;\r\n\r\n const edge = MathTmp.Vector3[10];\r\n let e0, e1;\r\n if (s0 > 0 && s1 < 0) {\r\n edge.copyFrom(p1p0);\r\n e0 = p0;\r\n e1 = p1;\r\n } else if (s1 > 0 && s2 < 0) {\r\n edge.copyFrom(p2p1);\r\n e0 = p1;\r\n e1 = p2;\r\n } else {\r\n edge.copyFrom(p2p0).scaleInPlace(-1);\r\n e0 = p2;\r\n e1 = p0;\r\n }\r\n\r\n // Determines if \"proj\" lies inside the triangle\r\n const tmp2 = MathTmp.Vector3[9];\r\n const tmp3 = MathTmp.Vector3[4];\r\n e0.subtractToRef(proj, tmp);\r\n e1.subtractToRef(proj, tmp2);\r\n Vector3.CrossToRef(tmp, tmp2, tmp3);\r\n const isOutside = Vector3.Dot(tmp3, normal) < 0;\r\n\r\n // If inside, we already found the projected point, \"proj\"\r\n if (!isOutside) {\r\n ref.copyFrom(proj);\r\n return Math.abs(l * cosA);\r\n }\r\n\r\n // If outside, we find \"triProj\", the closest point from \"proj\" on the closest edge\r\n const r = MathTmp.Vector3[5];\r\n Vector3.CrossToRef(edge, tmp3, r);\r\n r.normalize();\r\n const e0proj = MathTmp.Vector3[9];\r\n e0proj.copyFrom(e0).subtractInPlace(proj);\r\n const e0projL = e0proj.length();\r\n if (e0projL < Epsilon) {\r\n // Proj is e0\r\n ref.copyFrom(e0);\r\n return Vector3.Distance(vector, e0);\r\n }\r\n e0proj.normalizeFromLength(e0projL);\r\n const cosG = Vector3.Dot(r, e0proj);\r\n const triProj = MathTmp.Vector3[7];\r\n triProj.copyFrom(proj).addInPlace(r.scaleInPlace(e0projL * cosG));\r\n\r\n // Now we clamp \"triProj\" so it lies between e0 and e1\r\n tmp.copyFrom(triProj).subtractInPlace(e0);\r\n l = edge.length();\r\n edge.normalizeFromLength(l);\r\n let t = Vector3.Dot(tmp, edge) / Math.max(l, Epsilon);\r\n t = Scalar.Clamp(t, 0, 1);\r\n triProj.copyFrom(e0).addInPlace(edge.scaleInPlace(t * l));\r\n ref.copyFrom(triProj);\r\n\r\n return Vector3.Distance(vector, triProj);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located at the center between \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Center(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): Vector3 {\r\n return Vector3.CenterToRef(value1, value2, Vector3.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, ref: DeepImmutable<Vector3>): Vector3 {\r\n return ref.copyFromFloats((value1._x + value2._x) / 2, (value1._y + value2._y) / 2, (value1._z + value2._z) / 2);\r\n }\r\n\r\n /**\r\n * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),\r\n * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply\r\n * to something in order to rotate it from its local system to the given target system\r\n * Note: axis1, axis2 and axis3 are normalized during this operation\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @returns a new Vector3\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/target_align\r\n */\r\n public static RotationFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Vector3 {\r\n const rotation = Vector3.Zero();\r\n Vector3.RotationFromAxisToRef(axis1, axis2, axis3, rotation);\r\n return rotation;\r\n }\r\n\r\n /**\r\n * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @param ref defines the Vector3 where to store the result\r\n */\r\n public static RotationFromAxisToRef(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>, ref: Vector3): void {\r\n const quat = MathTmp.Quaternion[0];\r\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\r\n quat.toEulerAnglesToRef(ref);\r\n }\r\n}\r\n\r\n/**\r\n * Vector4 class created for EulerAngle class conversion to Quaternion\r\n */\r\nexport class Vector4 {\r\n /**\r\n * Creates a Vector4 object from the given floats.\r\n * @param x x value of the vector\r\n * @param y y value of the vector\r\n * @param z z value of the vector\r\n * @param w w value of the vector\r\n */\r\n constructor(\r\n /** x value of the vector */\r\n public x: number,\r\n /** y value of the vector */\r\n public y: number,\r\n /** z value of the vector */\r\n public z: number,\r\n /** w value of the vector */\r\n public w: number\r\n ) {}\r\n\r\n /**\r\n * Returns the string with the Vector4 coordinates.\r\n * @returns a string containing all the vector values\r\n */\r\n public toString(): string {\r\n return `{X: ${this.x} Y: ${this.y} Z: ${this.z} W: ${this.w}}`;\r\n }\r\n\r\n /**\r\n * Returns the string \"Vector4\".\r\n * @returns \"Vector4\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector4\";\r\n }\r\n\r\n /**\r\n * Returns the Vector4 hash code.\r\n * @returns a unique hash code\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this.x);\r\n const y = _ExtractAsInt(this.y);\r\n const z = _ExtractAsInt(this.z);\r\n const w = _ExtractAsInt(this.w);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n hash = (hash * 397) ^ w;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n /**\r\n * Returns a new array populated with 4 elements : the Vector4 coordinates.\r\n * @returns the resulting array\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n\r\n this.toArray(result, 0);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Populates the given array from the given index with the Vector4 coordinates.\r\n * @param array array to populate\r\n * @param index index of the array to start at (default: 0)\r\n * @returns the Vector4.\r\n */\r\n public toArray(array: FloatArray, index?: number): Vector4 {\r\n if (index === undefined) {\r\n index = 0;\r\n }\r\n array[index] = this.x;\r\n array[index + 1] = this.y;\r\n array[index + 2] = this.z;\r\n array[index + 3] = this.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector4 {\r\n Vector4.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given vector to the current Vector4.\r\n * @param otherVector the vector to add\r\n * @returns the updated Vector4.\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n this.x += otherVector.x;\r\n this.y += otherVector.y;\r\n this.z += otherVector.z;\r\n this.w += otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one.\r\n * @param otherVector the vector to add\r\n * @returns the resulting vector\r\n */\r\n public add(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x + otherVector.x, this.y + otherVector.y, this.z + otherVector.z, this.w + otherVector.w);\r\n }\r\n\r\n /**\r\n * Updates the given vector \"result\" with the result of the addition of the current Vector4 and the given one.\r\n * @param otherVector the vector to add\r\n * @param result the vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x + otherVector.x;\r\n result.y = this.y + otherVector.y;\r\n result.z = this.z + otherVector.z;\r\n result.w = this.w + otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtract in place the given vector from the current Vector4.\r\n * @param otherVector the vector to subtract\r\n * @returns the updated Vector4.\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n this.x -= otherVector.x;\r\n this.y -= otherVector.y;\r\n this.z -= otherVector.z;\r\n this.w -= otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 with the result of the subtraction of the given vector from the current Vector4.\r\n * @param otherVector the vector to add\r\n * @returns the new vector with the result\r\n */\r\n public subtract(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x - otherVector.x, this.y - otherVector.y, this.z - otherVector.z, this.w - otherVector.w);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the subtraction of the given vector from the current Vector4.\r\n * @param otherVector the vector to subtract\r\n * @param result the vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x - otherVector.x;\r\n result.y = this.y - otherVector.y;\r\n result.z = this.z - otherVector.z;\r\n result.w = this.w - otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n */\r\n /**\r\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n * @param x value to subtract\r\n * @param y value to subtract\r\n * @param z value to subtract\r\n * @param w value to subtract\r\n * @returns new vector containing the result\r\n */\r\n public subtractFromFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n return new Vector4(this.x - x, this.y - y, this.z - z, this.w - w);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n * @param x value to subtract\r\n * @param y value to subtract\r\n * @param z value to subtract\r\n * @param w value to subtract\r\n * @param result the vector to store the result in\r\n * @returns the current Vector4.\r\n */\r\n public subtractFromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): Vector4 {\r\n result.x = this.x - x;\r\n result.y = this.y - y;\r\n result.z = this.z - z;\r\n result.w = this.w - w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the current Vector4 negated coordinates.\r\n * @returns a new vector with the negated values\r\n */\r\n public negate(): Vector4 {\r\n return new Vector4(-this.x, -this.y, -this.z, -this.w);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector4 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n this.w *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector4 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector4\r\n */\r\n public negateToRef(result: Vector4): Vector4 {\r\n return result.copyFromFloats(this.x * -1, this.y * -1, this.z * -1, this.w * -1);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector4 coordinates by scale (float).\r\n * @param scale the number to scale with\r\n * @returns the updated Vector4.\r\n */\r\n public scaleInPlace(scale: number): Vector4 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the current Vector4 coordinates multiplied by scale (float).\r\n * @param scale the number to scale with\r\n * @returns a new vector with the result\r\n */\r\n public scale(scale: number): Vector4 {\r\n return new Vector4(this.x * scale, this.y * scale, this.z * scale, this.w * scale);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the current Vector4 coordinates multiplied by scale (float).\r\n * @param scale the number to scale with\r\n * @param result a vector to store the result in\r\n * @returns the current Vector4.\r\n */\r\n public scaleToRef(scale: number, result: Vector4): Vector4 {\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n result.z = this.z * scale;\r\n result.w = this.w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Vector4 values by a factor and add the result to a given Vector4\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector4 object where to store the result\r\n * @returns the unmodified current Vector4\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector4): Vector4 {\r\n result.x += this.x * scale;\r\n result.y += this.y * scale;\r\n result.z += this.z * scale;\r\n result.w += this.w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Vector4 coordinates are stricly equal to the given ones.\r\n * @param otherVector the vector to compare against\r\n * @returns true if they are equal\r\n */\r\n public equals(otherVector: DeepImmutable<Vector4>): boolean {\r\n return otherVector && this.x === otherVector.x && this.y === otherVector.y && this.z === otherVector.z && this.w === otherVector.w;\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Vector4 coordinates are each beneath the distance \"epsilon\" from the given vector ones.\r\n * @param otherVector vector to compare against\r\n * @param epsilon (Default: very small number)\r\n * @returns true if they are equal\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector4>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherVector &&\r\n Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) &&\r\n Scalar.WithinEpsilon(this.y, otherVector.y, epsilon) &&\r\n Scalar.WithinEpsilon(this.z, otherVector.z, epsilon) &&\r\n Scalar.WithinEpsilon(this.w, otherVector.w, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Boolean : True if the given floats are strictly equal to the current Vector4 coordinates.\r\n * @param x x value to compare against\r\n * @param y y value to compare against\r\n * @param z z value to compare against\r\n * @param w w value to compare against\r\n * @returns true if equal\r\n */\r\n public equalsToFloats(x: number, y: number, z: number, w: number): boolean {\r\n return this.x === x && this.y === y && this.z === z && this.w === w;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current Vector4 by the given one.\r\n * @param otherVector vector to multiple with\r\n * @returns the updated Vector4.\r\n */\r\n public multiplyInPlace(otherVector: Vector4): Vector4 {\r\n this.x *= otherVector.x;\r\n this.y *= otherVector.y;\r\n this.z *= otherVector.z;\r\n this.w *= otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one.\r\n * @param otherVector vector to multiple with\r\n * @returns resulting new vector\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x * otherVector.x, this.y * otherVector.y, this.z * otherVector.z, this.w * otherVector.w);\r\n }\r\n /**\r\n * Updates the given vector \"result\" with the multiplication result of the current Vector4 and the given one.\r\n * @param otherVector vector to multiple with\r\n * @param result vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x * otherVector.x;\r\n result.y = this.y * otherVector.y;\r\n result.z = this.z * otherVector.z;\r\n result.w = this.w * otherVector.w;\r\n return this;\r\n }\r\n /**\r\n * Returns a new Vector4 set with the multiplication result of the given floats and the current Vector4 coordinates.\r\n * @param x x value multiply with\r\n * @param y y value multiply with\r\n * @param z z value multiply with\r\n * @param w w value multiply with\r\n * @returns resulting new vector\r\n */\r\n public multiplyByFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n return new Vector4(this.x * x, this.y * y, this.z * z, this.w * w);\r\n }\r\n /**\r\n * Returns a new Vector4 set with the division result of the current Vector4 by the given one.\r\n * @param otherVector vector to devide with\r\n * @returns resulting new vector\r\n */\r\n public divide(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x / otherVector.x, this.y / otherVector.y, this.z / otherVector.z, this.w / otherVector.w);\r\n }\r\n /**\r\n * Updates the given vector \"result\" with the division result of the current Vector4 by the given one.\r\n * @param otherVector vector to devide with\r\n * @param result vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x / otherVector.x;\r\n result.y = this.y / otherVector.y;\r\n result.z = this.z / otherVector.z;\r\n result.w = this.w / otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones.\r\n * @param otherVector vector to devide with\r\n * @returns the updated Vector3.\r\n */\r\n public divideInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Updates the Vector4 coordinates with the minimum values between its own and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector4\r\n */\r\n public minimizeInPlace(other: DeepImmutable<Vector4>): Vector4 {\r\n if (other.x < this.x) {\r\n this.x = other.x;\r\n }\r\n if (other.y < this.y) {\r\n this.y = other.y;\r\n }\r\n if (other.z < this.z) {\r\n this.z = other.z;\r\n }\r\n if (other.w < this.w) {\r\n this.w = other.w;\r\n }\r\n return this;\r\n }\r\n /**\r\n * Updates the Vector4 coordinates with the maximum values between its own and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector4\r\n */\r\n public maximizeInPlace(other: DeepImmutable<Vector4>): Vector4 {\r\n if (other.x > this.x) {\r\n this.x = other.x;\r\n }\r\n if (other.y > this.y) {\r\n this.y = other.y;\r\n }\r\n if (other.z > this.z) {\r\n this.z = other.z;\r\n }\r\n if (other.w > this.w) {\r\n this.w = other.w;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector4 from current Vector4 floored values\r\n * @returns a new Vector4\r\n */\r\n public floor(): Vector4 {\r\n return new Vector4(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z), Math.floor(this.w));\r\n }\r\n\r\n /**\r\n * Gets a new Vector4 from current Vector3 floored values\r\n * @returns a new Vector4\r\n */\r\n public fract(): Vector4 {\r\n return new Vector4(this.x - Math.floor(this.x), this.y - Math.floor(this.y), this.z - Math.floor(this.z), this.w - Math.floor(this.w));\r\n }\r\n\r\n // Properties\r\n /**\r\n * Returns the Vector4 length (float).\r\n * @returns the length\r\n */\r\n public length(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\r\n }\r\n /**\r\n * Returns the Vector4 squared length (float).\r\n * @returns the length squared\r\n */\r\n public lengthSquared(): number {\r\n return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\r\n }\r\n\r\n // Methods\r\n /**\r\n * Normalizes in place the Vector4.\r\n * @returns the updated Vector4.\r\n */\r\n public normalize(): Vector4 {\r\n const len = this.length();\r\n\r\n if (len === 0) {\r\n return this;\r\n }\r\n\r\n return this.scaleInPlace(1.0 / len);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 from the Vector4 (x, y, z) coordinates.\r\n * @returns this converted to a new vector3\r\n */\r\n public toVector3(): Vector3 {\r\n return new Vector3(this.x, this.y, this.z);\r\n }\r\n /**\r\n * Returns a new Vector4 copied from the current one.\r\n * @returns the new cloned vector\r\n */\r\n public clone(): Vector4 {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n }\r\n /**\r\n * Updates the current Vector4 with the given one coordinates.\r\n * @param source the source vector to copy from\r\n * @returns the updated Vector4.\r\n */\r\n public copyFrom(source: DeepImmutable<Vector4>): Vector4 {\r\n this.x = source.x;\r\n this.y = source.y;\r\n this.z = source.z;\r\n this.w = source.w;\r\n return this;\r\n }\r\n /**\r\n * Updates the current Vector4 coordinates with the given floats.\r\n * @param x float to copy from\r\n * @param y float to copy from\r\n * @param z float to copy from\r\n * @param w float to copy from\r\n * @returns the updated Vector4.\r\n */\r\n public copyFromFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n return this;\r\n }\r\n /**\r\n * Updates the current Vector4 coordinates with the given floats.\r\n * @param x float to set from\r\n * @param y float to set from\r\n * @param z float to set from\r\n * @param w float to set from\r\n * @returns the updated Vector4.\r\n */\r\n public set(x: number, y: number, z: number, w: number): Vector4 {\r\n return this.copyFromFloats(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector3 coordinates\r\n * @param v defines the x, y, z and w coordinates of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public setAll(v: number): Vector4 {\r\n this.x = this.y = this.z = this.w = v;\r\n return this;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new Vector4 set from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @returns the new vector\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Vector4 {\r\n if (!offset) {\r\n offset = 0;\r\n }\r\n return new Vector4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the vector to store the result in\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector4): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n result.w = array[offset + 3];\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the starting index of the given Float32Array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the vector to store the result in\r\n */\r\n public static FromFloatArrayToRef(array: DeepImmutable<Float32Array>, offset: number, result: Vector4): void {\r\n Vector4.FromArrayToRef(array, offset, result);\r\n }\r\n /**\r\n * Updates the given vector \"result\" coordinates from the given floats.\r\n * @param x float to set from\r\n * @param y float to set from\r\n * @param z float to set from\r\n * @param w float to set from\r\n * @param result the vector to the floats in\r\n */\r\n public static FromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): void {\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n result.w = w;\r\n }\r\n /**\r\n * Returns a new Vector4 set to (0.0, 0.0, 0.0, 0.0)\r\n * @returns the new vector\r\n */\r\n public static Zero(): Vector4 {\r\n return new Vector4(0.0, 0.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector4 set to (1.0, 1.0, 1.0, 1.0)\r\n * @returns the new vector\r\n */\r\n public static One(): Vector4 {\r\n return new Vector4(1.0, 1.0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a new normalized Vector4 from the given one.\r\n * @param vector the vector to normalize\r\n * @returns the vector\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector4>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.NormalizeToRef(vector, result);\r\n return result;\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the normalization of the given one.\r\n * @param vector the vector to normalize\r\n * @param result the vector to store the result in\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector4>, result: Vector4): void {\r\n result.copyFrom(vector);\r\n result.normalize();\r\n }\r\n\r\n /**\r\n * Returns a vector with the minimum values from the left and right vectors\r\n * @param left left vector to minimize\r\n * @param right right vector to minimize\r\n * @returns a new vector with the minimum of the left and right vector values\r\n */\r\n public static Minimize(left: DeepImmutable<Vector4>, right: DeepImmutable<Vector4>): Vector4 {\r\n const min = left.clone();\r\n min.minimizeInPlace(right);\r\n return min;\r\n }\r\n\r\n /**\r\n * Returns a vector with the maximum values from the left and right vectors\r\n * @param left left vector to maximize\r\n * @param right right vector to maximize\r\n * @returns a new vector with the maximum of the left and right vector values\r\n */\r\n public static Maximize(left: DeepImmutable<Vector4>, right: DeepImmutable<Vector4>): Vector4 {\r\n const max = left.clone();\r\n max.maximizeInPlace(right);\r\n return max;\r\n }\r\n /**\r\n * Returns the distance (float) between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the distance between\r\n * @param value2 value to calulate the distance between\r\n * @return the distance between the two vectors\r\n */\r\n public static Distance(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): number {\r\n return Math.sqrt(Vector4.DistanceSquared(value1, value2));\r\n }\r\n /**\r\n * Returns the squared distance (float) between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the distance between\r\n * @param value2 value to calulate the distance between\r\n * @return the distance between the two vectors squared\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): number {\r\n const x = value1.x - value2.x;\r\n const y = value1.y - value2.y;\r\n const z = value1.z - value2.z;\r\n const w = value1.w - value2.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n }\r\n /**\r\n * Returns a new Vector4 located at the center between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the center between\r\n * @param value2 value to calulate the center between\r\n * @return the center between the two vectors\r\n */\r\n public static Center(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): Vector4 {\r\n return Vector4.CenterToRef(value1, value2, Vector4.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>, ref: DeepImmutable<Vector4>): Vector4 {\r\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2, (value1.z + value2.z) / 2, (value1.w + value2.w) / 2);\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the transformation by the given matrix of the given vector.\r\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * The difference with Vector3.TransformCoordinates is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the transformed Vector4\r\n */\r\n public static TransformCoordinates(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.TransformCoordinatesToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\r\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * The difference with Vector3.TransformCoordinatesToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector4 where to store the result\r\n */\r\n public static TransformCoordinatesToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n Vector4.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\r\n * This method computes tranformed coordinates only, not transformed direction vectors\r\n * The difference with Vector3.TransformCoordinatesFromFloatsToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector4 where to store the result\r\n */\r\n public static TransformCoordinatesFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\r\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\r\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\r\n const rw = x * m[3] + y * m[7] + z * m[11] + m[15];\r\n\r\n result.x = rx;\r\n result.y = ry;\r\n result.z = rz;\r\n result.w = rw;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the normal transformation by the given matrix of the given vector.\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param vector the vector to transform\r\n * @param transformation the transformation matrix to apply\r\n * @returns the new vector\r\n */\r\n public static TransformNormal(vector: DeepImmutable<Vector4>, transformation: DeepImmutable<Matrix>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.TransformNormalToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector.\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param vector the vector to transform\r\n * @param transformation the transformation matrix to apply\r\n * @param result the vector to store the result in\r\n */\r\n public static TransformNormalToRef(vector: DeepImmutable<Vector4>, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n const x = vector.x * m[0] + vector.y * m[4] + vector.z * m[8];\r\n const y = vector.x * m[1] + vector.y * m[5] + vector.z * m[9];\r\n const z = vector.x * m[2] + vector.y * m[6] + vector.z * m[10];\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n result.w = vector.w;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z, w).\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param x value to transform\r\n * @param y value to transform\r\n * @param z value to transform\r\n * @param w value to transform\r\n * @param transformation the transformation matrix to apply\r\n * @param result the vector to store the results in\r\n */\r\n public static TransformNormalFromFloatsToRef(x: number, y: number, z: number, w: number, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n result.x = x * m[0] + y * m[4] + z * m[8];\r\n result.y = x * m[1] + y * m[5] + z * m[9];\r\n result.z = x * m[2] + y * m[6] + z * m[10];\r\n result.w = w;\r\n }\r\n\r\n /**\r\n * Creates a new Vector4 from a Vector3\r\n * @param source defines the source data\r\n * @param w defines the 4th component (default is 0)\r\n * @returns a new Vector4\r\n */\r\n public static FromVector3(source: Vector3, w: number = 0) {\r\n return new Vector4(source._x, source._y, source._z, w);\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store quaternion data\r\n * @see https://en.wikipedia.org/wiki/Quaternion\r\n * @see https://doc.babylonjs.com/features/position,_rotation,_scaling\r\n */\r\nexport class Quaternion {\r\n /** @hidden */\r\n public _x: number;\r\n\r\n /** @hidden */\r\n public _y: number;\r\n\r\n /** @hidden */\r\n public _z: number;\r\n\r\n /** @hidden */\r\n public _w: number;\r\n\r\n /** @hidden */\r\n public _isDirty = true;\r\n\r\n /** Gets or sets the x coordinate */\r\n public get x() {\r\n return this._x;\r\n }\r\n\r\n public set x(value: number) {\r\n this._x = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the y coordinate */\r\n public get y() {\r\n return this._y;\r\n }\r\n\r\n public set y(value: number) {\r\n this._y = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the z coordinate */\r\n public get z() {\r\n return this._z;\r\n }\r\n\r\n public set z(value: number) {\r\n this._z = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the w coordinate */\r\n public get w() {\r\n return this._w;\r\n }\r\n\r\n public set w(value: number) {\r\n this._w = value;\r\n this._isDirty = true;\r\n }\r\n /**\r\n * Creates a new Quaternion from the given floats\r\n * @param x defines the first component (0 by default)\r\n * @param y defines the second component (0 by default)\r\n * @param z defines the third component (0 by default)\r\n * @param w defines the fourth component (1.0 by default)\r\n */\r\n constructor(x: number = 0.0, y: number = 0.0, z: number = 0.0, w: number = 1.0) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._w = w;\r\n }\r\n\r\n /**\r\n * Gets a string representation for the current quaternion\r\n * @returns a string with the Quaternion coordinates\r\n */\r\n public toString(): string {\r\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z} W: ${this._w}}`;\r\n }\r\n\r\n /**\r\n * Gets the class name of the quaternion\r\n * @returns the string \"Quaternion\"\r\n */\r\n public getClassName(): string {\r\n return \"Quaternion\";\r\n }\r\n\r\n /**\r\n * Gets a hash code for this quaternion\r\n * @returns the quaternion hash code\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this._x);\r\n const y = _ExtractAsInt(this._y);\r\n const z = _ExtractAsInt(this._z);\r\n const w = _ExtractAsInt(this._w);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n hash = (hash * 397) ^ w;\r\n return hash;\r\n }\r\n\r\n /**\r\n * Copy the quaternion to an array\r\n * @returns a new array populated with 4 elements from the quaternion coordinates\r\n */\r\n public asArray(): number[] {\r\n return [this._x, this._y, this._z, this._w];\r\n }\r\n /**\r\n * Check if two quaternions are equals\r\n * @param otherQuaternion defines the second operand\r\n * @return true if the current quaternion and the given one coordinates are strictly equals\r\n */\r\n public equals(otherQuaternion: DeepImmutable<Quaternion>): boolean {\r\n return otherQuaternion && this._x === otherQuaternion._x && this._y === otherQuaternion._y && this._z === otherQuaternion._z && this._w === otherQuaternion._w;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two quaternions are equals (using an epsilon value)\r\n * @param otherQuaternion defines the other quaternion\r\n * @param epsilon defines the minimal distance to consider equality\r\n * @returns true if the given quaternion coordinates are close to the current ones by a distance of epsilon.\r\n */\r\n public equalsWithEpsilon(otherQuaternion: DeepImmutable<Quaternion>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherQuaternion &&\r\n Scalar.WithinEpsilon(this._x, otherQuaternion._x, epsilon) &&\r\n Scalar.WithinEpsilon(this._y, otherQuaternion._y, epsilon) &&\r\n Scalar.WithinEpsilon(this._z, otherQuaternion._z, epsilon) &&\r\n Scalar.WithinEpsilon(this._w, otherQuaternion._w, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Clone the current quaternion\r\n * @returns a new quaternion copied from the current one\r\n */\r\n public clone(): Quaternion {\r\n return new Quaternion(this._x, this._y, this._z, this._w);\r\n }\r\n\r\n /**\r\n * Copy a quaternion to the current one\r\n * @param other defines the other quaternion\r\n * @returns the updated current quaternion\r\n */\r\n public copyFrom(other: DeepImmutable<Quaternion>): Quaternion {\r\n this.x = other._x;\r\n this.y = other._y;\r\n this.z = other._z;\r\n this.w = other._w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion with the given float coordinates\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param w defines the w coordinate\r\n * @returns the updated current quaternion\r\n */\r\n public copyFromFloats(x: number, y: number, z: number, w: number): Quaternion {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion from the given float coordinates\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param w defines the w coordinate\r\n * @returns the updated current quaternion\r\n */\r\n public set(x: number, y: number, z: number, w: number): Quaternion {\r\n return this.copyFromFloats(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Adds two quaternions\r\n * @param other defines the second operand\r\n * @returns a new quaternion as the addition result of the given one and the current quaternion\r\n */\r\n public add(other: DeepImmutable<Quaternion>): Quaternion {\r\n return new Quaternion(this._x + other._x, this._y + other._y, this._z + other._z, this._w + other._w);\r\n }\r\n\r\n /**\r\n * Add a quaternion to the current one\r\n * @param other defines the quaternion to add\r\n * @returns the current quaternion\r\n */\r\n public addInPlace(other: DeepImmutable<Quaternion>): Quaternion {\r\n this._x += other._x;\r\n this._y += other._y;\r\n this._z += other._z;\r\n this._w += other._w;\r\n return this;\r\n }\r\n /**\r\n * Subtract two quaternions\r\n * @param other defines the second operand\r\n * @returns a new quaternion as the subtraction result of the given one from the current one\r\n */\r\n public subtract(other: Quaternion): Quaternion {\r\n return new Quaternion(this._x - other._x, this._y - other._y, this._z - other._z, this._w - other._w);\r\n }\r\n\r\n /**\r\n * Multiplies the current quaternion by a scale factor\r\n * @param value defines the scale factor\r\n * @returns a new quaternion set by multiplying the current quaternion coordinates by the float \"scale\"\r\n */\r\n public scale(value: number): Quaternion {\r\n return new Quaternion(this._x * value, this._y * value, this._z * value, this._w * value);\r\n }\r\n\r\n /**\r\n * Scale the current quaternion values by a factor and stores the result to a given quaternion\r\n * @param scale defines the scale factor\r\n * @param result defines the Quaternion object where to store the result\r\n * @returns the unmodified current quaternion\r\n */\r\n public scaleToRef(scale: number, result: Quaternion): Quaternion {\r\n result.x = this._x * scale;\r\n result.y = this._y * scale;\r\n result.z = this._z * scale;\r\n result.w = this._w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current quaternion by a scale factor\r\n * @param value defines the scale factor\r\n * @returns the current modified quaternion\r\n */\r\n public scaleInPlace(value: number): Quaternion {\r\n this.x *= value;\r\n this.y *= value;\r\n this.z *= value;\r\n this.w *= value;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current quaternion values by a factor and add the result to a given quaternion\r\n * @param scale defines the scale factor\r\n * @param result defines the Quaternion object where to store the result\r\n * @returns the unmodified current quaternion\r\n */\r\n public scaleAndAddToRef(scale: number, result: Quaternion): Quaternion {\r\n result.x += this._x * scale;\r\n result.y += this._y * scale;\r\n result.z += this._z * scale;\r\n result.w += this._w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies two quaternions\r\n * @param q1 defines the second operand\r\n * @returns a new quaternion set as the multiplication result of the current one with the given one \"q1\"\r\n */\r\n public multiply(q1: DeepImmutable<Quaternion>): Quaternion {\r\n const result = new Quaternion(0, 0, 0, 1.0);\r\n this.multiplyToRef(q1, result);\r\n return result;\r\n }\r\n /**\r\n * Sets the given \"result\" as the the multiplication result of the current one with the given one \"q1\"\r\n * @param q1 defines the second operand\r\n * @param result defines the target quaternion\r\n * @returns the current quaternion\r\n */\r\n public multiplyToRef(q1: DeepImmutable<Quaternion>, result: Quaternion): Quaternion {\r\n const x = this._x * q1._w + this._y * q1._z - this._z * q1._y + this._w * q1._x;\r\n const y = -this._x * q1._z + this._y * q1._w + this._z * q1._x + this._w * q1._y;\r\n const z = this._x * q1._y - this._y * q1._x + this._z * q1._w + this._w * q1._z;\r\n const w = -this._x * q1._x - this._y * q1._y - this._z * q1._z + this._w * q1._w;\r\n result.copyFromFloats(x, y, z, w);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion with the multiplication of itself with the given one \"q1\"\r\n * @param q1 defines the second operand\r\n * @returns the currentupdated quaternion\r\n */\r\n public multiplyInPlace(q1: DeepImmutable<Quaternion>): Quaternion {\r\n this.multiplyToRef(q1, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates (1-q) the current quaternion and stores the result in the given quaternion\r\n * @param ref defines the target quaternion\r\n * @returns the current quaternion\r\n */\r\n public conjugateToRef(ref: Quaternion): Quaternion {\r\n ref.copyFromFloats(-this._x, -this._y, -this._z, this._w);\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates in place (1-q) the current quaternion\r\n * @returns the current updated quaternion\r\n */\r\n public conjugateInPlace(): Quaternion {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates in place (1-q) the current quaternion\r\n * @returns a new quaternion\r\n */\r\n public conjugate(): Quaternion {\r\n const result = new Quaternion(-this._x, -this._y, -this._z, this._w);\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets length of current quaternion\r\n * @returns the quaternion length (float)\r\n */\r\n public length(): number {\r\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\r\n }\r\n\r\n /**\r\n * Normalize in place the current quaternion\r\n * @returns the current updated quaternion\r\n */\r\n public normalize(): Quaternion {\r\n const len = this.length();\r\n\r\n if (len === 0) {\r\n return this;\r\n }\r\n\r\n const inv = 1.0 / len;\r\n this.x *= inv;\r\n this.y *= inv;\r\n this.z *= inv;\r\n this.w *= inv;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the Euler angles translated from the current quaternion\r\n * @returns a new Vector3 containing the Euler angles\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions\r\n */\r\n public toEulerAngles(): Vector3 {\r\n const result = Vector3.Zero();\r\n this.toEulerAnglesToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector3 \"result\" with the Euler angles translated from the current quaternion\r\n * @param result defines the vector which will be filled with the Euler angles\r\n * @returns the current unchanged quaternion\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions\r\n */\r\n public toEulerAnglesToRef(result: Vector3): Quaternion {\r\n const qz = this._z;\r\n const qx = this._x;\r\n const qy = this._y;\r\n const qw = this._w;\r\n\r\n const sqw = qw * qw;\r\n const sqz = qz * qz;\r\n const sqx = qx * qx;\r\n const sqy = qy * qy;\r\n\r\n const zAxisY = qy * qz - qx * qw;\r\n const limit = 0.4999999;\r\n\r\n if (zAxisY < -limit) {\r\n result.y = 2 * Math.atan2(qy, qw);\r\n result.x = Math.PI / 2;\r\n result.z = 0;\r\n } else if (zAxisY > limit) {\r\n result.y = 2 * Math.atan2(qy, qw);\r\n result.x = -Math.PI / 2;\r\n result.z = 0;\r\n } else {\r\n result.z = Math.atan2(2.0 * (qx * qy + qz * qw), -sqz - sqx + sqy + sqw);\r\n result.x = Math.asin(-2.0 * (qz * qy - qx * qw));\r\n result.y = Math.atan2(2.0 * (qz * qx + qy * qw), sqz - sqx - sqy + sqw);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the given rotation matrix with the current quaternion values\r\n * @param result defines the target matrix\r\n * @returns the current unchanged quaternion\r\n */\r\n public toRotationMatrix(result: Matrix): Quaternion {\r\n Matrix.FromQuaternionToRef(this, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion from the given rotation matrix values\r\n * @param matrix defines the source matrix\r\n * @returns the current updated quaternion\r\n */\r\n public fromRotationMatrix(matrix: DeepImmutable<Matrix>): Quaternion {\r\n Quaternion.FromRotationMatrixToRef(matrix, this);\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Creates a new quaternion from a rotation matrix\r\n * @param matrix defines the source matrix\r\n * @returns a new quaternion created from the given rotation matrix values\r\n */\r\n public static FromRotationMatrix(matrix: DeepImmutable<Matrix>): Quaternion {\r\n const result = new Quaternion();\r\n Quaternion.FromRotationMatrixToRef(matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Updates the given quaternion with the given rotation matrix values\r\n * @param matrix defines the source matrix\r\n * @param result defines the target quaternion\r\n */\r\n public static FromRotationMatrixToRef(matrix: DeepImmutable<Matrix>, result: Quaternion): void {\r\n const data = matrix.m;\r\n const m11 = data[0],\r\n m12 = data[4],\r\n m13 = data[8];\r\n const m21 = data[1],\r\n m22 = data[5],\r\n m23 = data[9];\r\n const m31 = data[2],\r\n m32 = data[6],\r\n m33 = data[10];\r\n const trace = m11 + m22 + m33;\r\n let s;\r\n\r\n if (trace > 0) {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n result.w = 0.25 / s;\r\n result.x = (m32 - m23) * s;\r\n result.y = (m13 - m31) * s;\r\n result.z = (m21 - m12) * s;\r\n } else if (m11 > m22 && m11 > m33) {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n result.w = (m32 - m23) / s;\r\n result.x = 0.25 * s;\r\n result.y = (m12 + m21) / s;\r\n result.z = (m13 + m31) / s;\r\n } else if (m22 > m33) {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n result.w = (m13 - m31) / s;\r\n result.x = (m12 + m21) / s;\r\n result.y = 0.25 * s;\r\n result.z = (m23 + m32) / s;\r\n } else {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n result.w = (m21 - m12) / s;\r\n result.x = (m13 + m31) / s;\r\n result.y = (m23 + m32) / s;\r\n result.z = 0.25 * s;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the dot product (float) between the quaternions \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the dot product\r\n */\r\n public static Dot(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>): number {\r\n return left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\r\n }\r\n\r\n /**\r\n * Checks if the two quaternions are close to each other\r\n * @param quat0 defines the first quaternion to check\r\n * @param quat1 defines the second quaternion to check\r\n * @returns true if the two quaternions are close to each other\r\n */\r\n public static AreClose(quat0: DeepImmutable<Quaternion>, quat1: DeepImmutable<Quaternion>): boolean {\r\n const dot = Quaternion.Dot(quat0, quat1);\r\n\r\n return dot >= 0;\r\n }\r\n\r\n /**\r\n * Smooth interpolation between two quaternions using Slerp\r\n *\r\n * @param source source quaternion\r\n * @param goal goal quaternion\r\n * @param deltaTime current interpolation frame\r\n * @param lerpTime total interpolation time\r\n * @param result the smoothed quaternion\r\n */\r\n public static SmoothToRef(source: Quaternion, goal: Quaternion, deltaTime: number, lerpTime: number, result: Quaternion) {\r\n let slerp = lerpTime === 0 ? 1 : deltaTime / lerpTime;\r\n slerp = Scalar.Clamp(slerp, 0, 1);\r\n\r\n Quaternion.SlerpToRef(source, goal, slerp, result);\r\n }\r\n\r\n /**\r\n * Creates an empty quaternion\r\n * @returns a new quaternion set to (0.0, 0.0, 0.0)\r\n */\r\n public static Zero(): Quaternion {\r\n return new Quaternion(0.0, 0.0, 0.0, 0.0);\r\n }\r\n\r\n /**\r\n * Inverse a given quaternion\r\n * @param q defines the source quaternion\r\n * @returns a new quaternion as the inverted current quaternion\r\n */\r\n public static Inverse(q: DeepImmutable<Quaternion>): Quaternion {\r\n return new Quaternion(-q._x, -q._y, -q._z, q._w);\r\n }\r\n\r\n /**\r\n * Inverse a given quaternion\r\n * @param q defines the source quaternion\r\n * @param result the quaternion the result will be stored in\r\n * @returns the result quaternion\r\n */\r\n public static InverseToRef(q: Quaternion, result: Quaternion): Quaternion {\r\n result.set(-q._x, -q._y, -q._z, q._w);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an identity quaternion\r\n * @returns the identity quaternion\r\n */\r\n public static Identity(): Quaternion {\r\n return new Quaternion(0.0, 0.0, 0.0, 1.0);\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the given quaternion is identity\r\n * @param quaternion defines the quaternion to check\r\n * @returns true if the quaternion is identity\r\n */\r\n public static IsIdentity(quaternion: DeepImmutable<Quaternion>): boolean {\r\n return quaternion && quaternion._x === 0 && quaternion._y === 0 && quaternion._z === 0 && quaternion._w === 1;\r\n }\r\n\r\n /**\r\n * Creates a quaternion from a rotation around an axis\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle to use\r\n * @returns a new quaternion created from the given axis (Vector3) and angle in radians (float)\r\n */\r\n public static RotationAxis(axis: DeepImmutable<Vector3>, angle: number): Quaternion {\r\n return Quaternion.RotationAxisToRef(axis, angle, new Quaternion());\r\n }\r\n\r\n /**\r\n * Creates a rotation around an axis and stores it into the given quaternion\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle to use\r\n * @param result defines the target quaternion\r\n * @returns the target quaternion\r\n */\r\n public static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Quaternion): Quaternion {\r\n const sin = Math.sin(angle / 2);\r\n axis.normalize();\r\n result.w = Math.cos(angle / 2);\r\n result.x = axis._x * sin;\r\n result.y = axis._y * sin;\r\n result.z = axis._z * sin;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from data stored into an array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the source array where the data starts\r\n * @returns a new quaternion\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Quaternion {\r\n if (!offset) {\r\n offset = 0;\r\n }\r\n return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n\r\n /**\r\n * Updates the given quaternion \"result\" from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the quaternion to store the result in\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Quaternion): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n result.w = array[offset + 3];\r\n }\r\n\r\n /**\r\n * Create a quaternion from Euler rotation angles\r\n * @param x Pitch\r\n * @param y Yaw\r\n * @param z Roll\r\n * @returns the new Quaternion\r\n */\r\n public static FromEulerAngles(x: number, y: number, z: number): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(y, x, z, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Updates a quaternion from Euler rotation angles\r\n * @param x Pitch\r\n * @param y Yaw\r\n * @param z Roll\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromEulerAnglesToRef(x: number, y: number, z: number, result: Quaternion): Quaternion {\r\n Quaternion.RotationYawPitchRollToRef(y, x, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a quaternion from Euler rotation vector\r\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\r\n * @returns the new Quaternion\r\n */\r\n public static FromEulerVector(vec: DeepImmutable<Vector3>): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Updates a quaternion from Euler rotation vector\r\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromEulerVectorToRef(vec: DeepImmutable<Vector3>, result: Quaternion): Quaternion {\r\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Updates a quaternion so that it rotates vector vecFrom to vector vecTo\r\n * @param vecFrom defines the direction vector from which to rotate\r\n * @param vecTo defines the direction vector to which to rotate\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromUnitVectorsToRef(vecFrom: DeepImmutable<Vector3>, vecTo: DeepImmutable<Vector3>, result: Quaternion): Quaternion {\r\n const r = Vector3.Dot(vecFrom, vecTo) + 1;\r\n\r\n if (r < Epsilon) {\r\n if (Math.abs(vecFrom.x) > Math.abs(vecFrom.z)) {\r\n result.set(-vecFrom.y, vecFrom.x, 0, 0);\r\n } else {\r\n result.set(0, -vecFrom.z, vecFrom.y, 0);\r\n }\r\n } else {\r\n Vector3.CrossToRef(vecFrom, vecTo, TmpVectors.Vector3[0]);\r\n result.set(TmpVectors.Vector3[0].x, TmpVectors.Vector3[0].y, TmpVectors.Vector3[0].z, r);\r\n }\r\n\r\n return result.normalize();\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles (y, x, z)\r\n * @param yaw defines the rotation around Y axis\r\n * @param pitch defines the rotation around X axis\r\n * @param roll defines the rotation around Z axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\r\n * @param yaw defines the rotation around Y axis\r\n * @param pitch defines the rotation around X axis\r\n * @param roll defines the rotation around Z axis\r\n * @param result defines the target quaternion\r\n */\r\n public static RotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: Quaternion): void {\r\n // Produces a quaternion from Euler angles in the z-y-x orientation (Tait-Bryan angles)\r\n const halfRoll = roll * 0.5;\r\n const halfPitch = pitch * 0.5;\r\n const halfYaw = yaw * 0.5;\r\n\r\n const sinRoll = Math.sin(halfRoll);\r\n const cosRoll = Math.cos(halfRoll);\r\n const sinPitch = Math.sin(halfPitch);\r\n const cosPitch = Math.cos(halfPitch);\r\n const sinYaw = Math.sin(halfYaw);\r\n const cosYaw = Math.cos(halfYaw);\r\n\r\n result.x = cosYaw * sinPitch * cosRoll + sinYaw * cosPitch * sinRoll;\r\n result.y = sinYaw * cosPitch * cosRoll - cosYaw * sinPitch * sinRoll;\r\n result.z = cosYaw * cosPitch * sinRoll - sinYaw * sinPitch * cosRoll;\r\n result.w = cosYaw * cosPitch * cosRoll + sinYaw * sinPitch * sinRoll;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation\r\n * @param alpha defines the rotation around first axis\r\n * @param beta defines the rotation around second axis\r\n * @param gamma defines the rotation around third axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationAlphaBetaGamma(alpha: number, beta: number, gamma: number): Quaternion {\r\n const result = new Quaternion();\r\n Quaternion.RotationAlphaBetaGammaToRef(alpha, beta, gamma, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation and stores it in the target quaternion\r\n * @param alpha defines the rotation around first axis\r\n * @param beta defines the rotation around second axis\r\n * @param gamma defines the rotation around third axis\r\n * @param result defines the target quaternion\r\n */\r\n public static RotationAlphaBetaGammaToRef(alpha: number, beta: number, gamma: number, result: Quaternion): void {\r\n // Produces a quaternion from Euler angles in the z-x-z orientation\r\n const halfGammaPlusAlpha = (gamma + alpha) * 0.5;\r\n const halfGammaMinusAlpha = (gamma - alpha) * 0.5;\r\n const halfBeta = beta * 0.5;\r\n\r\n result.x = Math.cos(halfGammaMinusAlpha) * Math.sin(halfBeta);\r\n result.y = Math.sin(halfGammaMinusAlpha) * Math.sin(halfBeta);\r\n result.z = Math.sin(halfGammaPlusAlpha) * Math.cos(halfBeta);\r\n result.w = Math.cos(halfGammaPlusAlpha) * Math.cos(halfBeta);\r\n }\r\n\r\n /**\r\n * Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationQuaternionFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion(0.0, 0.0, 0.0, 0.0);\r\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @param ref defines the target quaternion\r\n */\r\n public static RotationQuaternionFromAxisToRef(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.FromXYZAxesToRef(axis1.normalize(), axis2.normalize(), axis3.normalize(), rotMat);\r\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns A new quaternion oriented toward the specified forward and up.\r\n */\r\n public static FromLookDirectionLH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion();\r\n Quaternion.FromLookDirectionLHToRef(forward, up, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param ref defines the target quaternion.\r\n */\r\n public static FromLookDirectionLHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.LookDirectionLHToRef(forward, up, rotMat);\r\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns A new quaternion oriented toward the specified forward and up.\r\n */\r\n public static FromLookDirectionRH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion();\r\n Quaternion.FromLookDirectionRHToRef(forward, up, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param ref defines the target quaternion.\r\n */\r\n public static FromLookDirectionRHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.LookDirectionRHToRef(forward, up, rotMat);\r\n return Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Interpolates between two quaternions\r\n * @param left defines first quaternion\r\n * @param right defines second quaternion\r\n * @param amount defines the gradient to use\r\n * @returns the new interpolated quaternion\r\n */\r\n public static Slerp(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number): Quaternion {\r\n const result = Quaternion.Identity();\r\n\r\n Quaternion.SlerpToRef(left, right, amount, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Interpolates between two quaternions and stores it into a target quaternion\r\n * @param left defines first quaternion\r\n * @param right defines second quaternion\r\n * @param amount defines the gradient to use\r\n * @param result defines the target quaternion\r\n */\r\n public static SlerpToRef(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number, result: Quaternion): void {\r\n let num2;\r\n let num3;\r\n let num4 = left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\r\n let flag = false;\r\n\r\n if (num4 < 0) {\r\n flag = true;\r\n num4 = -num4;\r\n }\r\n\r\n if (num4 > 0.999999) {\r\n num3 = 1 - amount;\r\n num2 = flag ? -amount : amount;\r\n } else {\r\n const num5 = Math.acos(num4);\r\n const num6 = 1.0 / Math.sin(num5);\r\n num3 = Math.sin((1.0 - amount) * num5) * num6;\r\n num2 = flag ? -Math.sin(amount * num5) * num6 : Math.sin(amount * num5) * num6;\r\n }\r\n\r\n result.x = num3 * left._x + num2 * right._x;\r\n result.y = num3 * left._y + num2 * right._y;\r\n result.z = num3 * left._z + num2 * right._z;\r\n result.w = num3 * left._w + num2 * right._w;\r\n }\r\n\r\n /**\r\n * Interpolate between two quaternions using Hermite interpolation\r\n * @param value1 defines first quaternion\r\n * @param tangent1 defines the incoming tangent\r\n * @param value2 defines second quaternion\r\n * @param tangent2 defines the outgoing tangent\r\n * @param amount defines the target quaternion\r\n * @returns the new interpolated quaternion\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n amount: number\r\n ): Quaternion {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\r\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\r\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\r\n const w = value1._w * part1 + value2._w * part2 + tangent1._w * part3 + tangent2._w * part4;\r\n return new Quaternion(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n time: number\r\n ): Quaternion {\r\n const result = Quaternion.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Quaternion with the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n time: number,\r\n result: Quaternion\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n result.z = (t2 - time) * 6 * value1.z + (3 * t2 - 4 * time + 1) * tangent1.z + (-t2 + time) * 6 * value2.z + (3 * t2 - 2 * time) * tangent2.z;\r\n result.w = (t2 - time) * 6 * value1.w + (3 * t2 - 4 * time + 1) * tangent1.w + (-t2 + time) * 6 * value2.w + (3 * t2 - 2 * time) * tangent2.w;\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store matrix data (4x4)\r\n */\r\nexport class Matrix {\r\n /**\r\n * Gets the precision of matrix computations\r\n */\r\n public static get Use64Bits(): boolean {\r\n return PerformanceConfigurator.MatrixUse64Bits;\r\n }\r\n\r\n private static _UpdateFlagSeed = 0;\r\n private static _IdentityReadOnly = Matrix.Identity() as DeepImmutable<Matrix>;\r\n\r\n private _isIdentity = false;\r\n private _isIdentityDirty = true;\r\n private _isIdentity3x2 = true;\r\n private _isIdentity3x2Dirty = true;\r\n /**\r\n * Gets the update flag of the matrix which is an unique number for the matrix.\r\n * It will be incremented every time the matrix data change.\r\n * You can use it to speed the comparison between two versions of the same matrix.\r\n */\r\n public updateFlag: number = -1;\r\n\r\n private readonly _m: Float32Array | Array<number>;\r\n\r\n /**\r\n * Gets the internal data of the matrix\r\n */\r\n public get m(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n\r\n /**\r\n * Update the updateFlag to indicate that the matrix has been updated\r\n */\r\n public markAsUpdated() {\r\n this.updateFlag = Matrix._UpdateFlagSeed++;\r\n this._isIdentity = false;\r\n this._isIdentity3x2 = false;\r\n this._isIdentityDirty = true;\r\n this._isIdentity3x2Dirty = true;\r\n }\r\n\r\n private _updateIdentityStatus(isIdentity: boolean, isIdentityDirty: boolean = false, isIdentity3x2: boolean = false, isIdentity3x2Dirty: boolean = true) {\r\n this._isIdentity = isIdentity;\r\n this._isIdentity3x2 = isIdentity || isIdentity3x2;\r\n this._isIdentityDirty = this._isIdentity ? false : isIdentityDirty;\r\n this._isIdentity3x2Dirty = this._isIdentity3x2 ? false : isIdentity3x2Dirty;\r\n }\r\n\r\n /**\r\n * Creates an empty matrix (filled with zeros)\r\n */\r\n public constructor() {\r\n if (PerformanceConfigurator.MatrixTrackPrecisionChange) {\r\n PerformanceConfigurator.MatrixTrackedMatrices!.push(this);\r\n }\r\n\r\n this._m = new PerformanceConfigurator.MatrixCurrentType(16);\r\n\r\n this.markAsUpdated();\r\n }\r\n\r\n // Properties\r\n\r\n /**\r\n * Check if the current matrix is identity\r\n * @returns true is the matrix is the identity matrix\r\n */\r\n public isIdentity(): boolean {\r\n if (this._isIdentityDirty) {\r\n this._isIdentityDirty = false;\r\n const m = this._m;\r\n this._isIdentity =\r\n m[0] === 1.0 &&\r\n m[1] === 0.0 &&\r\n m[2] === 0.0 &&\r\n m[3] === 0.0 &&\r\n m[4] === 0.0 &&\r\n m[5] === 1.0 &&\r\n m[6] === 0.0 &&\r\n m[7] === 0.0 &&\r\n m[8] === 0.0 &&\r\n m[9] === 0.0 &&\r\n m[10] === 1.0 &&\r\n m[11] === 0.0 &&\r\n m[12] === 0.0 &&\r\n m[13] === 0.0 &&\r\n m[14] === 0.0 &&\r\n m[15] === 1.0;\r\n }\r\n\r\n return this._isIdentity;\r\n }\r\n\r\n /**\r\n * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)\r\n * @returns true is the matrix is the identity matrix\r\n */\r\n public isIdentityAs3x2(): boolean {\r\n if (this._isIdentity3x2Dirty) {\r\n this._isIdentity3x2Dirty = false;\r\n if (this._m[0] !== 1.0 || this._m[5] !== 1.0 || this._m[15] !== 1.0) {\r\n this._isIdentity3x2 = false;\r\n } else if (\r\n this._m[1] !== 0.0 ||\r\n this._m[2] !== 0.0 ||\r\n this._m[3] !== 0.0 ||\r\n this._m[4] !== 0.0 ||\r\n this._m[6] !== 0.0 ||\r\n this._m[7] !== 0.0 ||\r\n this._m[8] !== 0.0 ||\r\n this._m[9] !== 0.0 ||\r\n this._m[10] !== 0.0 ||\r\n this._m[11] !== 0.0 ||\r\n this._m[12] !== 0.0 ||\r\n this._m[13] !== 0.0 ||\r\n this._m[14] !== 0.0\r\n ) {\r\n this._isIdentity3x2 = false;\r\n } else {\r\n this._isIdentity3x2 = true;\r\n }\r\n }\r\n\r\n return this._isIdentity3x2;\r\n }\r\n\r\n /**\r\n * Gets the determinant of the matrix\r\n * @returns the matrix determinant\r\n */\r\n public determinant(): number {\r\n if (this._isIdentity === true) {\r\n return 1;\r\n }\r\n\r\n const m = this._m;\r\n const m00 = m[0],\r\n m01 = m[1],\r\n m02 = m[2],\r\n m03 = m[3];\r\n const m10 = m[4],\r\n m11 = m[5],\r\n m12 = m[6],\r\n m13 = m[7];\r\n const m20 = m[8],\r\n m21 = m[9],\r\n m22 = m[10],\r\n m23 = m[11];\r\n const m30 = m[12],\r\n m31 = m[13],\r\n m32 = m[14],\r\n m33 = m[15];\r\n // https://en.wikipedia.org/wiki/Laplace_expansion\r\n // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column,\r\n // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant\r\n // Cofactor(i, j) = sign(i,j) * det(Minor(i, j))\r\n // where\r\n // - sign(i,j) = (i+j) % 2 === 0 ? 1 : -1\r\n // - Minor(i, j) is the 3x3 matrix we get by removing row i and column j from current Matrix\r\n //\r\n // Here we do that for the 1st row.\r\n\r\n const det_22_33 = m22 * m33 - m32 * m23;\r\n const det_21_33 = m21 * m33 - m31 * m23;\r\n const det_21_32 = m21 * m32 - m31 * m22;\r\n const det_20_33 = m20 * m33 - m30 * m23;\r\n const det_20_32 = m20 * m32 - m22 * m30;\r\n const det_20_31 = m20 * m31 - m30 * m21;\r\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\r\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\r\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\r\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\r\n return m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\r\n }\r\n\r\n // Methods\r\n\r\n /**\r\n * Returns the matrix as a Float32Array or Array<number>\r\n * @returns the matrix underlying array\r\n */\r\n public toArray(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n /**\r\n * Returns the matrix as a Float32Array or Array<number>\r\n * @returns the matrix underlying array.\r\n */\r\n public asArray(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n\r\n /**\r\n * Inverts the current matrix in place\r\n * @returns the current inverted matrix\r\n */\r\n public invert(): Matrix {\r\n this.invertToRef(this);\r\n return this;\r\n }\r\n /**\r\n * Sets all the matrix elements to zero\r\n * @returns the current matrix\r\n */\r\n public reset(): Matrix {\r\n Matrix.FromValuesToRef(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, this);\r\n this._updateIdentityStatus(false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the current matrix with a second one\r\n * @param other defines the matrix to add\r\n * @returns a new matrix as the addition of the current matrix and the given one\r\n */\r\n public add(other: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n this.addToRef(other, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given matrix \"result\" to the addition of the current matrix and the given one\r\n * @param other defines the matrix to add\r\n * @param result defines the target matrix\r\n * @returns the current matrix\r\n */\r\n public addToRef(other: DeepImmutable<Matrix>, result: Matrix): Matrix {\r\n const m = this._m;\r\n const resultM = result._m;\r\n const otherM = other.m;\r\n for (let index = 0; index < 16; index++) {\r\n resultM[index] = m[index] + otherM[index];\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds in place the given matrix to the current matrix\r\n * @param other defines the second operand\r\n * @returns the current updated matrix\r\n */\r\n public addToSelf(other: DeepImmutable<Matrix>): Matrix {\r\n const m = this._m;\r\n const otherM = other.m;\r\n for (let index = 0; index < 16; index++) {\r\n m[index] += otherM[index];\r\n }\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the given matrix to the current inverted Matrix\r\n * @param other defines the target matrix\r\n * @returns the unmodified current matrix\r\n */\r\n public invertToRef(other: Matrix): Matrix {\r\n if (this._isIdentity === true) {\r\n Matrix.IdentityToRef(other);\r\n return this;\r\n }\r\n\r\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\r\n const m = this._m;\r\n const m00 = m[0],\r\n m01 = m[1],\r\n m02 = m[2],\r\n m03 = m[3];\r\n const m10 = m[4],\r\n m11 = m[5],\r\n m12 = m[6],\r\n m13 = m[7];\r\n const m20 = m[8],\r\n m21 = m[9],\r\n m22 = m[10],\r\n m23 = m[11];\r\n const m30 = m[12],\r\n m31 = m[13],\r\n m32 = m[14],\r\n m33 = m[15];\r\n\r\n const det_22_33 = m22 * m33 - m32 * m23;\r\n const det_21_33 = m21 * m33 - m31 * m23;\r\n const det_21_32 = m21 * m32 - m31 * m22;\r\n const det_20_33 = m20 * m33 - m30 * m23;\r\n const det_20_32 = m20 * m32 - m22 * m30;\r\n const det_20_31 = m20 * m31 - m30 * m21;\r\n\r\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\r\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\r\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\r\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\r\n\r\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\r\n\r\n if (det === 0) {\r\n // not invertible\r\n other.copyFrom(this);\r\n return this;\r\n }\r\n\r\n const detInv = 1 / det;\r\n const det_12_33 = m12 * m33 - m32 * m13;\r\n const det_11_33 = m11 * m33 - m31 * m13;\r\n const det_11_32 = m11 * m32 - m31 * m12;\r\n const det_10_33 = m10 * m33 - m30 * m13;\r\n const det_10_32 = m10 * m32 - m30 * m12;\r\n const det_10_31 = m10 * m31 - m30 * m11;\r\n const det_12_23 = m12 * m23 - m22 * m13;\r\n const det_11_23 = m11 * m23 - m21 * m13;\r\n const det_11_22 = m11 * m22 - m21 * m12;\r\n const det_10_23 = m10 * m23 - m20 * m13;\r\n const det_10_22 = m10 * m22 - m20 * m12;\r\n const det_10_21 = m10 * m21 - m20 * m11;\r\n\r\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\r\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\r\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\r\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\r\n\r\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\r\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\r\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\r\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\r\n\r\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\r\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\r\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\r\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\r\n\r\n Matrix.FromValuesToRef(\r\n cofact_00 * detInv,\r\n cofact_10 * detInv,\r\n cofact_20 * detInv,\r\n cofact_30 * detInv,\r\n cofact_01 * detInv,\r\n cofact_11 * detInv,\r\n cofact_21 * detInv,\r\n cofact_31 * detInv,\r\n cofact_02 * detInv,\r\n cofact_12 * detInv,\r\n cofact_22 * detInv,\r\n cofact_32 * detInv,\r\n cofact_03 * detInv,\r\n cofact_13 * detInv,\r\n cofact_23 * detInv,\r\n cofact_33 * detInv,\r\n other\r\n );\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * add a value at the specified position in the current Matrix\r\n * @param index the index of the value within the matrix. between 0 and 15.\r\n * @param value the value to be added\r\n * @returns the current updated matrix\r\n */\r\n public addAtIndex(index: number, value: number): Matrix {\r\n this._m[index] += value;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * mutiply the specified position in the current Matrix by a value\r\n * @param index the index of the value within the matrix. between 0 and 15.\r\n * @param value the value to be added\r\n * @returns the current updated matrix\r\n */\r\n public multiplyAtIndex(index: number, value: number): Matrix {\r\n this._m[index] *= value;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Inserts the translation vector (using 3 floats) in the current matrix\r\n * @param x defines the 1st component of the translation\r\n * @param y defines the 2nd component of the translation\r\n * @param z defines the 3rd component of the translation\r\n * @returns the current updated matrix\r\n */\r\n public setTranslationFromFloats(x: number, y: number, z: number): Matrix {\r\n this._m[12] = x;\r\n this._m[13] = y;\r\n this._m[14] = z;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the translation vector (using 3 floats) in the current matrix\r\n * @param x defines the 1st component of the translation\r\n * @param y defines the 2nd component of the translation\r\n * @param z defines the 3rd component of the translation\r\n * @returns the current updated matrix\r\n */\r\n public addTranslationFromFloats(x: number, y: number, z: number): Matrix {\r\n this._m[12] += x;\r\n this._m[13] += y;\r\n this._m[14] += z;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Inserts the translation vector in the current matrix\r\n * @param vector3 defines the translation to insert\r\n * @returns the current updated matrix\r\n */\r\n public setTranslation(vector3: DeepImmutable<Vector3>): Matrix {\r\n return this.setTranslationFromFloats(vector3._x, vector3._y, vector3._z);\r\n }\r\n\r\n /**\r\n * Gets the translation value of the current matrix\r\n * @returns a new Vector3 as the extracted translation from the matrix\r\n */\r\n public getTranslation(): Vector3 {\r\n return new Vector3(this._m[12], this._m[13], this._m[14]);\r\n }\r\n\r\n /**\r\n * Fill a Vector3 with the extracted translation from the matrix\r\n * @param result defines the Vector3 where to store the translation\r\n * @returns the current matrix\r\n */\r\n public getTranslationToRef(result: Vector3): Matrix {\r\n result.x = this._m[12];\r\n result.y = this._m[13];\r\n result.z = this._m[14];\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove rotation and scaling part from the matrix\r\n * @returns the updated matrix\r\n */\r\n public removeRotationAndScaling(): Matrix {\r\n const m = this.m;\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, m[12], m[13], m[14], m[15], this);\r\n this._updateIdentityStatus(m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1);\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiply two matrices\r\n * @param other defines the second operand\r\n * @returns a new matrix set with the multiplication result of the current Matrix and the given one\r\n */\r\n public multiply(other: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n this.multiplyToRef(other, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the current matrix from the given one\r\n * @param other defines the source matrix\r\n * @returns the current updated matrix\r\n */\r\n public copyFrom(other: DeepImmutable<Matrix>): Matrix {\r\n other.copyToArray(this._m);\r\n const o = other as Matrix;\r\n this.updateFlag = o.updateFlag;\r\n this._updateIdentityStatus(o._isIdentity, o._isIdentityDirty, o._isIdentity3x2, o._isIdentity3x2Dirty);\r\n return this;\r\n }\r\n\r\n /**\r\n * Populates the given array from the starting index with the current matrix values\r\n * @param array defines the target array\r\n * @param offset defines the offset in the target array where to start storing values\r\n * @returns the current matrix\r\n */\r\n public copyToArray(array: Float32Array | Array<number>, offset: number = 0): Matrix {\r\n const source = this._m;\r\n array[offset] = source[0];\r\n array[offset + 1] = source[1];\r\n array[offset + 2] = source[2];\r\n array[offset + 3] = source[3];\r\n array[offset + 4] = source[4];\r\n array[offset + 5] = source[5];\r\n array[offset + 6] = source[6];\r\n array[offset + 7] = source[7];\r\n array[offset + 8] = source[8];\r\n array[offset + 9] = source[9];\r\n array[offset + 10] = source[10];\r\n array[offset + 11] = source[11];\r\n array[offset + 12] = source[12];\r\n array[offset + 13] = source[13];\r\n array[offset + 14] = source[14];\r\n array[offset + 15] = source[15];\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the given matrix \"result\" with the multiplication result of the current Matrix and the given one\r\n * @param other defines the second operand\r\n * @param result defines the matrix where to store the multiplication\r\n * @returns the current matrix\r\n */\r\n public multiplyToRef(other: DeepImmutable<Matrix>, result: Matrix): Matrix {\r\n if (this._isIdentity) {\r\n result.copyFrom(other);\r\n return this;\r\n }\r\n if ((other as Matrix)._isIdentity) {\r\n result.copyFrom(this);\r\n return this;\r\n }\r\n\r\n this.multiplyToArray(other, result._m, 0);\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Float32Array \"result\" from the given index \"offset\" with the multiplication of the current matrix and the given one\r\n * @param other defines the second operand\r\n * @param result defines the array where to store the multiplication\r\n * @param offset defines the offset in the target array where to start storing values\r\n * @returns the current matrix\r\n */\r\n public multiplyToArray(other: DeepImmutable<Matrix>, result: Float32Array | Array<number>, offset: number): Matrix {\r\n const m = this._m;\r\n const otherM = other.m;\r\n const tm0 = m[0],\r\n tm1 = m[1],\r\n tm2 = m[2],\r\n tm3 = m[3];\r\n const tm4 = m[4],\r\n tm5 = m[5],\r\n tm6 = m[6],\r\n tm7 = m[7];\r\n const tm8 = m[8],\r\n tm9 = m[9],\r\n tm10 = m[10],\r\n tm11 = m[11];\r\n const tm12 = m[12],\r\n tm13 = m[13],\r\n tm14 = m[14],\r\n tm15 = m[15];\r\n\r\n const om0 = otherM[0],\r\n om1 = otherM[1],\r\n om2 = otherM[2],\r\n om3 = otherM[3];\r\n const om4 = otherM[4],\r\n om5 = otherM[5],\r\n om6 = otherM[6],\r\n om7 = otherM[7];\r\n const om8 = otherM[8],\r\n om9 = otherM[9],\r\n om10 = otherM[10],\r\n om11 = otherM[11];\r\n const om12 = otherM[12],\r\n om13 = otherM[13],\r\n om14 = otherM[14],\r\n om15 = otherM[15];\r\n\r\n result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\r\n result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\r\n result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\r\n result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\r\n\r\n result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\r\n result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\r\n result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\r\n result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\r\n\r\n result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\r\n result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\r\n result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\r\n result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\r\n\r\n result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\r\n result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\r\n result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\r\n result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\r\n return this;\r\n }\r\n\r\n /**\r\n * Check equality between this matrix and a second one\r\n * @param value defines the second matrix to compare\r\n * @returns true is the current matrix and the given one values are strictly equal\r\n */\r\n public equals(value: DeepImmutable<Matrix>): boolean {\r\n const other = value as Matrix;\r\n if (!other) {\r\n return false;\r\n }\r\n\r\n if (this._isIdentity || other._isIdentity) {\r\n if (!this._isIdentityDirty && !other._isIdentityDirty) {\r\n return this._isIdentity && other._isIdentity;\r\n }\r\n }\r\n\r\n const m = this.m;\r\n const om = other.m;\r\n return (\r\n m[0] === om[0] &&\r\n m[1] === om[1] &&\r\n m[2] === om[2] &&\r\n m[3] === om[3] &&\r\n m[4] === om[4] &&\r\n m[5] === om[5] &&\r\n m[6] === om[6] &&\r\n m[7] === om[7] &&\r\n m[8] === om[8] &&\r\n m[9] === om[9] &&\r\n m[10] === om[10] &&\r\n m[11] === om[11] &&\r\n m[12] === om[12] &&\r\n m[13] === om[13] &&\r\n m[14] === om[14] &&\r\n m[15] === om[15]\r\n );\r\n }\r\n\r\n /**\r\n * Clone the current matrix\r\n * @returns a new matrix from the current matrix\r\n */\r\n public clone(): Matrix {\r\n const matrix = new Matrix();\r\n matrix.copyFrom(this);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Returns the name of the current matrix class\r\n * @returns the string \"Matrix\"\r\n */\r\n public getClassName(): string {\r\n return \"Matrix\";\r\n }\r\n\r\n /**\r\n * Gets the hash code of the current matrix\r\n * @returns the hash code\r\n */\r\n public getHashCode(): number {\r\n let hash = _ExtractAsInt(this._m[0]);\r\n for (let i = 1; i < 16; i++) {\r\n hash = (hash * 397) ^ _ExtractAsInt(this._m[i]);\r\n }\r\n return hash;\r\n }\r\n\r\n /**\r\n * Decomposes the current Matrix into a translation, rotation and scaling components of the provided node\r\n * @param node the node to decompose the matrix to\r\n * @returns true if operation was successful\r\n */\r\n public decomposeToTransformNode(node: TransformNode): boolean {\r\n node.rotationQuaternion = node.rotationQuaternion || new Quaternion();\r\n return this.decompose(node.scaling, node.rotationQuaternion, node.position);\r\n }\r\n\r\n /**\r\n * Decomposes the current Matrix into a translation, rotation and scaling components\r\n * @param scale defines the scale vector3 given as a reference to update\r\n * @param rotation defines the rotation quaternion given as a reference to update\r\n * @param translation defines the translation vector3 given as a reference to update\r\n * @param preserveScalingNode Use scaling sign coming from this node. Otherwise scaling sign might change.\r\n * @returns true if operation was successful\r\n */\r\n public decompose(scale?: Vector3, rotation?: Quaternion, translation?: Vector3, preserveScalingNode?: TransformNode): boolean {\r\n if (this._isIdentity) {\r\n if (translation) {\r\n translation.setAll(0);\r\n }\r\n if (scale) {\r\n scale.setAll(1);\r\n }\r\n if (rotation) {\r\n rotation.copyFromFloats(0, 0, 0, 1);\r\n }\r\n return true;\r\n }\r\n\r\n const m = this._m;\r\n if (translation) {\r\n translation.copyFromFloats(m[12], m[13], m[14]);\r\n }\r\n\r\n scale = scale || MathTmp.Vector3[0];\r\n\r\n scale.x = Math.sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);\r\n scale.y = Math.sqrt(m[4] * m[4] + m[5] * m[5] + m[6] * m[6]);\r\n scale.z = Math.sqrt(m[8] * m[8] + m[9] * m[9] + m[10] * m[10]);\r\n\r\n if (preserveScalingNode) {\r\n const signX = preserveScalingNode.scaling.x < 0 ? -1 : 1;\r\n const signY = preserveScalingNode.scaling.y < 0 ? -1 : 1;\r\n const signZ = preserveScalingNode.scaling.z < 0 ? -1 : 1;\r\n\r\n scale.x *= signX;\r\n scale.y *= signY;\r\n scale.z *= signZ;\r\n } else {\r\n if (this.determinant() <= 0) {\r\n scale.y *= -1;\r\n }\r\n }\r\n\r\n if (scale._x === 0 || scale._y === 0 || scale._z === 0) {\r\n if (rotation) {\r\n rotation.copyFromFloats(0.0, 0.0, 0.0, 1.0);\r\n }\r\n return false;\r\n }\r\n\r\n if (rotation) {\r\n const sx = 1 / scale._x,\r\n sy = 1 / scale._y,\r\n sz = 1 / scale._z;\r\n Matrix.FromValuesToRef(\r\n m[0] * sx,\r\n m[1] * sx,\r\n m[2] * sx,\r\n 0.0,\r\n m[4] * sy,\r\n m[5] * sy,\r\n m[6] * sy,\r\n 0.0,\r\n m[8] * sz,\r\n m[9] * sz,\r\n m[10] * sz,\r\n 0.0,\r\n 0.0,\r\n 0.0,\r\n 0.0,\r\n 1.0,\r\n MathTmp.Matrix[0]\r\n );\r\n\r\n Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0], rotation);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets specific row of the matrix\r\n * @param index defines the number of the row to get\r\n * @returns the index-th row of the current matrix as a new Vector4\r\n */\r\n public getRow(index: number): Nullable<Vector4> {\r\n if (index < 0 || index > 3) {\r\n return null;\r\n }\r\n const i = index * 4;\r\n return new Vector4(this._m[i + 0], this._m[i + 1], this._m[i + 2], this._m[i + 3]);\r\n }\r\n\r\n /**\r\n * Sets the index-th row of the current matrix to the vector4 values\r\n * @param index defines the number of the row to set\r\n * @param row defines the target vector4\r\n * @returns the updated current matrix\r\n */\r\n public setRow(index: number, row: Vector4): Matrix {\r\n return this.setRowFromFloats(index, row.x, row.y, row.z, row.w);\r\n }\r\n\r\n /**\r\n * Compute the transpose of the matrix\r\n * @returns the new transposed matrix\r\n */\r\n public transpose(): Matrix {\r\n return Matrix.Transpose(this);\r\n }\r\n\r\n /**\r\n * Compute the transpose of the matrix and store it in a given matrix\r\n * @param result defines the target matrix\r\n * @returns the current matrix\r\n */\r\n public transposeToRef(result: Matrix): Matrix {\r\n Matrix.TransposeToRef(this, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the index-th row of the current matrix with the given 4 x float values\r\n * @param index defines the row index\r\n * @param x defines the x component to set\r\n * @param y defines the y component to set\r\n * @param z defines the z component to set\r\n * @param w defines the w component to set\r\n * @returns the updated current matrix\r\n */\r\n public setRowFromFloats(index: number, x: number, y: number, z: number, w: number): Matrix {\r\n if (index < 0 || index > 3) {\r\n return this;\r\n }\r\n const i = index * 4;\r\n this._m[i + 0] = x;\r\n this._m[i + 1] = y;\r\n this._m[i + 2] = z;\r\n this._m[i + 3] = w;\r\n\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Compute a new matrix set with the current matrix values multiplied by scale (float)\r\n * @param scale defines the scale factor\r\n * @returns a new matrix\r\n */\r\n public scale(scale: number): Matrix {\r\n const result = new Matrix();\r\n this.scaleToRef(scale, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Scale the current matrix values by a factor to a given result matrix\r\n * @param scale defines the scale factor\r\n * @param result defines the matrix to store the result\r\n * @returns the current matrix\r\n */\r\n public scaleToRef(scale: number, result: Matrix): Matrix {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = this._m[index] * scale;\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current matrix values by a factor and add the result to a given matrix\r\n * @param scale defines the scale factor\r\n * @param result defines the Matrix to store the result\r\n * @returns the current matrix\r\n */\r\n public scaleAndAddToRef(scale: number, result: Matrix): Matrix {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] += this._m[index] * scale;\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).\r\n * @param ref matrix to store the result\r\n */\r\n public toNormalMatrix(ref: Matrix): void {\r\n const tmp = MathTmp.Matrix[0];\r\n this.invertToRef(tmp);\r\n tmp.transposeToRef(ref);\r\n const m = ref._m;\r\n Matrix.FromValuesToRef(m[0], m[1], m[2], 0.0, m[4], m[5], m[6], 0.0, m[8], m[9], m[10], 0.0, 0.0, 0.0, 0.0, 1.0, ref);\r\n }\r\n\r\n /**\r\n * Gets only rotation part of the current matrix\r\n * @returns a new matrix sets to the extracted rotation matrix from the current one\r\n */\r\n public getRotationMatrix(): Matrix {\r\n const result = new Matrix();\r\n this.getRotationMatrixToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the rotation matrix from the current one and sets it as the given \"result\"\r\n * @param result defines the target matrix to store data to\r\n * @returns the current matrix\r\n */\r\n public getRotationMatrixToRef(result: Matrix): Matrix {\r\n const scale = MathTmp.Vector3[0];\r\n if (!this.decompose(scale)) {\r\n Matrix.IdentityToRef(result);\r\n return this;\r\n }\r\n\r\n const m = this._m;\r\n const sx = 1 / scale._x,\r\n sy = 1 / scale._y,\r\n sz = 1 / scale._z;\r\n Matrix.FromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Toggles model matrix from being right handed to left handed in place and vice versa\r\n */\r\n public toggleModelMatrixHandInPlace() {\r\n const m = this._m;\r\n m[2] *= -1;\r\n m[6] *= -1;\r\n m[8] *= -1;\r\n m[9] *= -1;\r\n m[14] *= -1;\r\n this.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Toggles projection matrix from being right handed to left handed in place and vice versa\r\n */\r\n public toggleProjectionMatrixHandInPlace() {\r\n const m = this._m;\r\n m[8] *= -1;\r\n m[9] *= -1;\r\n m[10] *= -1;\r\n m[11] *= -1;\r\n this.markAsUpdated();\r\n }\r\n\r\n // Statics\r\n /**\r\n * Creates a matrix from an array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns a new Matrix set from the starting index of the given array\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Matrix {\r\n const result = new Matrix();\r\n Matrix.FromArrayToRef(array, offset, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the content of an array into a given matrix\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @param result defines the target matrix\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Matrix) {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = array[index + offset];\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Stores an array into a matrix after having multiplied each component by a given factor\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param scale defines the scaling factor\r\n * @param result defines the target matrix\r\n */\r\n public static FromFloat32ArrayToRefScaled(array: DeepImmutable<Float32Array | Array<number>>, offset: number, scale: number, result: Matrix) {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = array[index + offset] * scale;\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Gets an identity matrix that must not be updated\r\n */\r\n public static get IdentityReadOnly(): DeepImmutable<Matrix> {\r\n return Matrix._IdentityReadOnly;\r\n }\r\n\r\n /**\r\n * Stores a list of values (16) inside a given matrix\r\n * @param initialM11 defines 1st value of 1st row\r\n * @param initialM12 defines 2nd value of 1st row\r\n * @param initialM13 defines 3rd value of 1st row\r\n * @param initialM14 defines 4th value of 1st row\r\n * @param initialM21 defines 1st value of 2nd row\r\n * @param initialM22 defines 2nd value of 2nd row\r\n * @param initialM23 defines 3rd value of 2nd row\r\n * @param initialM24 defines 4th value of 2nd row\r\n * @param initialM31 defines 1st value of 3rd row\r\n * @param initialM32 defines 2nd value of 3rd row\r\n * @param initialM33 defines 3rd value of 3rd row\r\n * @param initialM34 defines 4th value of 3rd row\r\n * @param initialM41 defines 1st value of 4th row\r\n * @param initialM42 defines 2nd value of 4th row\r\n * @param initialM43 defines 3rd value of 4th row\r\n * @param initialM44 defines 4th value of 4th row\r\n * @param result defines the target matrix\r\n */\r\n public static FromValuesToRef(\r\n initialM11: number,\r\n initialM12: number,\r\n initialM13: number,\r\n initialM14: number,\r\n initialM21: number,\r\n initialM22: number,\r\n initialM23: number,\r\n initialM24: number,\r\n initialM31: number,\r\n initialM32: number,\r\n initialM33: number,\r\n initialM34: number,\r\n initialM41: number,\r\n initialM42: number,\r\n initialM43: number,\r\n initialM44: number,\r\n result: Matrix\r\n ): void {\r\n const m = result._m;\r\n m[0] = initialM11;\r\n m[1] = initialM12;\r\n m[2] = initialM13;\r\n m[3] = initialM14;\r\n m[4] = initialM21;\r\n m[5] = initialM22;\r\n m[6] = initialM23;\r\n m[7] = initialM24;\r\n m[8] = initialM31;\r\n m[9] = initialM32;\r\n m[10] = initialM33;\r\n m[11] = initialM34;\r\n m[12] = initialM41;\r\n m[13] = initialM42;\r\n m[14] = initialM43;\r\n m[15] = initialM44;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates new matrix from a list of values (16)\r\n * @param initialM11 defines 1st value of 1st row\r\n * @param initialM12 defines 2nd value of 1st row\r\n * @param initialM13 defines 3rd value of 1st row\r\n * @param initialM14 defines 4th value of 1st row\r\n * @param initialM21 defines 1st value of 2nd row\r\n * @param initialM22 defines 2nd value of 2nd row\r\n * @param initialM23 defines 3rd value of 2nd row\r\n * @param initialM24 defines 4th value of 2nd row\r\n * @param initialM31 defines 1st value of 3rd row\r\n * @param initialM32 defines 2nd value of 3rd row\r\n * @param initialM33 defines 3rd value of 3rd row\r\n * @param initialM34 defines 4th value of 3rd row\r\n * @param initialM41 defines 1st value of 4th row\r\n * @param initialM42 defines 2nd value of 4th row\r\n * @param initialM43 defines 3rd value of 4th row\r\n * @param initialM44 defines 4th value of 4th row\r\n * @returns the new matrix\r\n */\r\n public static FromValues(\r\n initialM11: number,\r\n initialM12: number,\r\n initialM13: number,\r\n initialM14: number,\r\n initialM21: number,\r\n initialM22: number,\r\n initialM23: number,\r\n initialM24: number,\r\n initialM31: number,\r\n initialM32: number,\r\n initialM33: number,\r\n initialM34: number,\r\n initialM41: number,\r\n initialM42: number,\r\n initialM43: number,\r\n initialM44: number\r\n ): Matrix {\r\n const result = new Matrix();\r\n const m = result._m;\r\n m[0] = initialM11;\r\n m[1] = initialM12;\r\n m[2] = initialM13;\r\n m[3] = initialM14;\r\n m[4] = initialM21;\r\n m[5] = initialM22;\r\n m[6] = initialM23;\r\n m[7] = initialM24;\r\n m[8] = initialM31;\r\n m[9] = initialM32;\r\n m[10] = initialM33;\r\n m[11] = initialM34;\r\n m[12] = initialM41;\r\n m[13] = initialM42;\r\n m[14] = initialM43;\r\n m[15] = initialM44;\r\n result.markAsUpdated();\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\r\n * @param scale defines the scale vector3\r\n * @param rotation defines the rotation quaternion\r\n * @param translation defines the translation vector3\r\n * @returns a new matrix\r\n */\r\n public static Compose(scale: DeepImmutable<Vector3>, rotation: DeepImmutable<Quaternion>, translation: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.ComposeToRef(scale, rotation, translation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\r\n * @param scale defines the scale vector3\r\n * @param rotation defines the rotation quaternion\r\n * @param translation defines the translation vector3\r\n * @param result defines the target matrix\r\n */\r\n public static ComposeToRef(scale: DeepImmutable<Vector3>, rotation: DeepImmutable<Quaternion>, translation: DeepImmutable<Vector3>, result: Matrix): void {\r\n const m = result._m;\r\n const x = rotation._x,\r\n y = rotation._y,\r\n z = rotation._z,\r\n w = rotation._w;\r\n const x2 = x + x,\r\n y2 = y + y,\r\n z2 = z + z;\r\n const xx = x * x2,\r\n xy = x * y2,\r\n xz = x * z2;\r\n const yy = y * y2,\r\n yz = y * z2,\r\n zz = z * z2;\r\n const wx = w * x2,\r\n wy = w * y2,\r\n wz = w * z2;\r\n\r\n const sx = scale._x,\r\n sy = scale._y,\r\n sz = scale._z;\r\n\r\n m[0] = (1 - (yy + zz)) * sx;\r\n m[1] = (xy + wz) * sx;\r\n m[2] = (xz - wy) * sx;\r\n m[3] = 0;\r\n\r\n m[4] = (xy - wz) * sy;\r\n m[5] = (1 - (xx + zz)) * sy;\r\n m[6] = (yz + wx) * sy;\r\n m[7] = 0;\r\n\r\n m[8] = (xz + wy) * sz;\r\n m[9] = (yz - wx) * sz;\r\n m[10] = (1 - (xx + yy)) * sz;\r\n m[11] = 0;\r\n\r\n m[12] = translation._x;\r\n m[13] = translation._y;\r\n m[14] = translation._z;\r\n m[15] = 1;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a new identity matrix\r\n * @returns a new identity matrix\r\n */\r\n public static Identity(): Matrix {\r\n const identity = Matrix.FromValues(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\r\n identity._updateIdentityStatus(true);\r\n return identity;\r\n }\r\n\r\n /**\r\n * Creates a new identity matrix and stores the result in a given matrix\r\n * @param result defines the target matrix\r\n */\r\n public static IdentityToRef(result: Matrix): void {\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n result._updateIdentityStatus(true);\r\n }\r\n\r\n /**\r\n * Creates a new zero matrix\r\n * @returns a new zero matrix\r\n */\r\n public static Zero(): Matrix {\r\n const zero = Matrix.FromValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n zero._updateIdentityStatus(false);\r\n return zero;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the X axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationX(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationXToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new matrix as the invert of a given matrix\r\n * @param source defines the source matrix\r\n * @returns the new matrix\r\n */\r\n public static Invert(source: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n source.invertToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the X axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationXToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Y axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationY(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationYToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Y axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationYToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(c, 0.0, -s, 0.0, 0.0, 1.0, 0.0, 0.0, s, 0.0, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Z axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationZ(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationZToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Z axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationZToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the given axis\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationAxis(axis: DeepImmutable<Vector3>, angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationAxisToRef(axis, angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the given axis and stores it in a given matrix\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Matrix): void {\r\n const s = Math.sin(-angle);\r\n const c = Math.cos(-angle);\r\n const c1 = 1 - c;\r\n\r\n axis.normalize();\r\n const m = result._m;\r\n m[0] = axis._x * axis._x * c1 + c;\r\n m[1] = axis._x * axis._y * c1 - axis._z * s;\r\n m[2] = axis._x * axis._z * c1 + axis._y * s;\r\n m[3] = 0.0;\r\n\r\n m[4] = axis._y * axis._x * c1 + axis._z * s;\r\n m[5] = axis._y * axis._y * c1 + c;\r\n m[6] = axis._y * axis._z * c1 - axis._x * s;\r\n m[7] = 0.0;\r\n\r\n m[8] = axis._z * axis._x * c1 - axis._y * s;\r\n m[9] = axis._z * axis._y * c1 + axis._x * s;\r\n m[10] = axis._z * axis._z * c1 + c;\r\n m[11] = 0.0;\r\n\r\n m[12] = 0.0;\r\n m[13] = 0.0;\r\n m[14] = 0.0;\r\n m[15] = 1.0;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Takes normalised vectors and returns a rotation matrix to align \"from\" with \"to\".\r\n * Taken from http://www.iquilezles.org/www/articles/noacos/noacos.htm\r\n * @param from defines the vector to align\r\n * @param to defines the vector to align to\r\n * @param result defines the target matrix\r\n */\r\n public static RotationAlignToRef(from: DeepImmutable<Vector3>, to: DeepImmutable<Vector3>, result: Matrix): void {\r\n const c = Vector3.Dot(to, from);\r\n const m = result._m;\r\n if (c < -1 + Epsilon) {\r\n // from and to are colinear and opposite direction.\r\n // compute a PI rotation on Z axis\r\n m[0] = -1;\r\n m[1] = 0;\r\n m[2] = 0;\r\n m[3] = 0;\r\n m[4] = 0;\r\n m[5] = -1;\r\n m[6] = 0;\r\n m[7] = 0;\r\n m[8] = 0;\r\n m[9] = 0;\r\n m[10] = 1;\r\n m[11] = 0;\r\n } else {\r\n const v = Vector3.Cross(to, from);\r\n const k = 1 / (1 + c);\r\n\r\n m[0] = v._x * v._x * k + c;\r\n m[1] = v._y * v._x * k - v._z;\r\n m[2] = v._z * v._x * k + v._y;\r\n m[3] = 0;\r\n m[4] = v._x * v._y * k + v._z;\r\n m[5] = v._y * v._y * k + c;\r\n m[6] = v._z * v._y * k - v._x;\r\n m[7] = 0;\r\n m[8] = v._x * v._z * k - v._y;\r\n m[9] = v._y * v._z * k + v._x;\r\n m[10] = v._z * v._z * k + c;\r\n m[11] = 0;\r\n }\r\n m[12] = 0;\r\n m[13] = 0;\r\n m[14] = 0;\r\n m[15] = 1;\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix\r\n * @param yaw defines the yaw angle in radians (Y axis)\r\n * @param pitch defines the pitch angle in radians (X axis)\r\n * @param roll defines the roll angle in radians (Z axis)\r\n * @returns the new rotation matrix\r\n */\r\n public static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix and stores it in a given matrix\r\n * @param yaw defines the yaw angle in radians (Y axis)\r\n * @param pitch defines the pitch angle in radians (X axis)\r\n * @param roll defines the roll angle in radians (Z axis)\r\n * @param result defines the target matrix\r\n */\r\n public static RotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: Matrix): void {\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);\r\n MathTmp.Quaternion[0].toRotationMatrix(result);\r\n }\r\n\r\n /**\r\n * Creates a scaling matrix\r\n * @param x defines the scale factor on X axis\r\n * @param y defines the scale factor on Y axis\r\n * @param z defines the scale factor on Z axis\r\n * @returns the new matrix\r\n */\r\n public static Scaling(x: number, y: number, z: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.ScalingToRef(x, y, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a scaling matrix and stores it in a given matrix\r\n * @param x defines the scale factor on X axis\r\n * @param y defines the scale factor on Y axis\r\n * @param z defines the scale factor on Z axis\r\n * @param result defines the target matrix\r\n */\r\n public static ScalingToRef(x: number, y: number, z: number, result: Matrix): void {\r\n Matrix.FromValuesToRef(x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(x === 1 && y === 1 && z === 1);\r\n }\r\n\r\n /**\r\n * Creates a translation matrix\r\n * @param x defines the translation on X axis\r\n * @param y defines the translation on Y axis\r\n * @param z defines the translationon Z axis\r\n * @returns the new matrix\r\n */\r\n public static Translation(x: number, y: number, z: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.TranslationToRef(x, y, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a translation matrix and stores it in a given matrix\r\n * @param x defines the translation on X axis\r\n * @param y defines the translation on Y axis\r\n * @param z defines the translationon Z axis\r\n * @param result defines the target matrix\r\n */\r\n public static TranslationToRef(x: number, y: number, z: number, result: Matrix): void {\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0, result);\r\n result._updateIdentityStatus(x === 0 && y === 0 && z === 0);\r\n }\r\n\r\n /**\r\n * Returns a new Matrix whose values are the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\r\n * @param startValue defines the start value\r\n * @param endValue defines the end value\r\n * @param gradient defines the gradient factor\r\n * @returns the new matrix\r\n */\r\n public static Lerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.LerpToRef(startValue, endValue, gradient, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the given matrix \"result\" as the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\r\n * @param startValue defines the start value\r\n * @param endValue defines the end value\r\n * @param gradient defines the gradient factor\r\n * @param result defines the Matrix object where to store data\r\n */\r\n public static LerpToRef(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number, result: Matrix): void {\r\n const resultM = result._m;\r\n const startM = startValue.m;\r\n const endM = endValue.m;\r\n for (let index = 0; index < 16; index++) {\r\n resultM[index] = startM[index] * (1.0 - gradient) + endM[index] * gradient;\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Builds a new matrix whose values are computed by:\r\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\r\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\r\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\r\n * @param startValue defines the first matrix\r\n * @param endValue defines the second matrix\r\n * @param gradient defines the gradient between the two matrices\r\n * @returns the new matrix\r\n */\r\n public static DecomposeLerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.DecomposeLerpToRef(startValue, endValue, gradient, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a matrix to values which are computed by:\r\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\r\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\r\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\r\n * @param startValue defines the first matrix\r\n * @param endValue defines the second matrix\r\n * @param gradient defines the gradient between the two matrices\r\n * @param result defines the target matrix\r\n */\r\n public static DecomposeLerpToRef(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number, result: Matrix) {\r\n const startScale = MathTmp.Vector3[0];\r\n const startRotation = MathTmp.Quaternion[0];\r\n const startTranslation = MathTmp.Vector3[1];\r\n startValue.decompose(startScale, startRotation, startTranslation);\r\n\r\n const endScale = MathTmp.Vector3[2];\r\n const endRotation = MathTmp.Quaternion[1];\r\n const endTranslation = MathTmp.Vector3[3];\r\n endValue.decompose(endScale, endRotation, endTranslation);\r\n\r\n const resultScale = MathTmp.Vector3[4];\r\n Vector3.LerpToRef(startScale, endScale, gradient, resultScale);\r\n const resultRotation = MathTmp.Quaternion[2];\r\n Quaternion.SlerpToRef(startRotation, endRotation, gradient, resultRotation);\r\n\r\n const resultTranslation = MathTmp.Vector3[5];\r\n Vector3.LerpToRef(startTranslation, endTranslation, gradient, resultTranslation);\r\n\r\n Matrix.ComposeToRef(resultScale, resultRotation, resultTranslation, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\r\n * This function works in left handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @returns the new matrix\r\n */\r\n public static LookAtLH(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookAtLHToRef(eye, target, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @param result defines the target matrix\r\n */\r\n public static LookAtLHToRef(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const xAxis = MathTmp.Vector3[0];\r\n const yAxis = MathTmp.Vector3[1];\r\n const zAxis = MathTmp.Vector3[2];\r\n\r\n // Z axis\r\n target.subtractToRef(eye, zAxis);\r\n zAxis.normalize();\r\n\r\n // X axis\r\n Vector3.CrossToRef(up, zAxis, xAxis);\r\n\r\n const xSquareLength = xAxis.lengthSquared();\r\n if (xSquareLength === 0) {\r\n xAxis.x = 1.0;\r\n } else {\r\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\r\n }\r\n\r\n // Y axis\r\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\r\n yAxis.normalize();\r\n\r\n // Eye angles\r\n const ex = -Vector3.Dot(xAxis, eye);\r\n const ey = -Vector3.Dot(yAxis, eye);\r\n const ez = -Vector3.Dot(zAxis, eye);\r\n\r\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\r\n * This function works in right handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @returns the new matrix\r\n */\r\n public static LookAtRH(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookAtRHToRef(eye, target, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @param result defines the target matrix\r\n */\r\n public static LookAtRHToRef(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const xAxis = MathTmp.Vector3[0];\r\n const yAxis = MathTmp.Vector3[1];\r\n const zAxis = MathTmp.Vector3[2];\r\n\r\n // Z axis\r\n eye.subtractToRef(target, zAxis);\r\n zAxis.normalize();\r\n\r\n // X axis\r\n Vector3.CrossToRef(up, zAxis, xAxis);\r\n\r\n const xSquareLength = xAxis.lengthSquared();\r\n if (xSquareLength === 0) {\r\n xAxis.x = 1.0;\r\n } else {\r\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\r\n }\r\n\r\n // Y axis\r\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\r\n yAxis.normalize();\r\n\r\n // Eye angles\r\n const ex = -Vector3.Dot(xAxis, eye);\r\n const ey = -Vector3.Dot(yAxis, eye);\r\n const ez = -Vector3.Dot(zAxis, eye);\r\n\r\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks in the direction specified by forward from the eye position, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns the new matrix\r\n */\r\n public static LookDirectionLH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookDirectionLHToRef(forward, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks in the direction of forward, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param result defines the target matrix\r\n */\r\n public static LookDirectionLHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const back = MathTmp.Vector3[0];\r\n back.copyFrom(forward);\r\n back.scaleInPlace(-1);\r\n const left = MathTmp.Vector3[1];\r\n Vector3.CrossToRef(up, back, left);\r\n\r\n // Generate the rotation matrix.\r\n Matrix.FromValuesToRef(left._x, left._y, left._z, 0.0, up._x, up._y, up._z, 0.0, back._x, back._y, back._z, 0.0, 0, 0, 0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks in the direction specified by forward from the eye position, the up Vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns the new matrix\r\n */\r\n public static LookDirectionRH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookDirectionRHToRef(forward, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks in the direction of forward, the up vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param result defines the target matrix\r\n */\r\n public static LookDirectionRHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const right = MathTmp.Vector3[2];\r\n Vector3.CrossToRef(up, forward, right);\r\n\r\n // Generate the rotation matrix.\r\n Matrix.FromValuesToRef(right._x, right._y, right._z, 0.0, up._x, up._y, up._z, 0.0, forward._x, forward._y, forward._z, 0.0, 0, 0, 0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Create a left-handed orthographic projection matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a left-handed orthographic projection matrix\r\n */\r\n public static OrthoLH(width: number, height: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoLHToRef(width, height, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Store a left-handed orthographic projection to a given matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoLHToRef(width: number, height: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = 2.0 / width;\r\n const b = 2.0 / height;\r\n const c = 2.0 / (f - n);\r\n const d = -(f + n) / (f - n);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, 0.0, 0.0, d, 1.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(a === 1 && b === 1 && c === 1 && d === 0);\r\n }\r\n\r\n /**\r\n * Create a left-handed orthographic projection matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a left-handed orthographic projection matrix\r\n */\r\n public static OrthoOffCenterLH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a left-handed orthographic projection into a given matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = 2.0 / (right - left);\r\n const b = 2.0 / (top - bottom);\r\n const c = 2.0 / (f - n);\r\n const d = -(f + n) / (f - n);\r\n const i0 = (left + right) / (left - right);\r\n const i1 = (top + bottom) / (bottom - top);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, i0, i1, d, 1.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a right-handed orthographic projection matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a right-handed orthographic projection matrix\r\n */\r\n public static OrthoOffCenterRH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a right-handed orthographic projection into a given matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoOffCenterRHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result, halfZRange);\r\n result._m[10] *= -1; // No need to call markAsUpdated as previous function already called it and let _isIdentityDirty to true\r\n }\r\n\r\n /**\r\n * Creates a left-handed perspective projection matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @returns a new matrix as a left-handed perspective projection matrix\r\n */\r\n public static PerspectiveLH(width: number, height: number, znear: number, zfar: number, halfZRange?: boolean, projectionPlaneTilt: number = 0): Matrix {\r\n const matrix = new Matrix();\r\n\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = (2.0 * n) / width;\r\n const b = (2.0 * n) / height;\r\n const c = (f + n) / (f - n);\r\n const d = (-2.0 * f * n) / (f - n);\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, matrix);\r\n\r\n if (halfZRange) {\r\n matrix.multiplyToRef(mtxConvertNDCToHalfZRange, matrix);\r\n }\r\n\r\n matrix._updateIdentityStatus(false);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Creates a left-handed perspective projection matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n * @returns a new matrix as a left-handed perspective projection matrix\r\n */\r\n public static PerspectiveFovLH(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.PerspectiveFovLHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a left-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n */\r\n public static PerspectiveFovLHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const c = reverseDepthBufferMode && n === 0 ? -1 : f !== 0 ? (f + n) / (f - n) : 1;\r\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2.0 * f * n) / (f - n) : -2 * n;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a left-handed perspective projection into a given matrix with depth reversed\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar not used as infinity is used as far clip\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovReverseLHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, 1.0, 0.0, 0.0, 1.0, 0.0, result);\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Creates a right-handed perspective projection matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n * @returns a new matrix as a right-handed perspective projection matrix\r\n */\r\n public static PerspectiveFovRH(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.PerspectiveFovRHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a right-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n */\r\n public static PerspectiveFovRHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): void {\r\n //alternatively this could be expressed as:\r\n // m = PerspectiveFovLHToRef\r\n // m[10] *= -1.0;\r\n // m[11] *= -1.0;\r\n\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const c = reverseDepthBufferMode && n === 0 ? 1 : f !== 0 ? -(f + n) / (f - n) : -1;\r\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2 * f * n) / (f - n) : -2 * n;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, -1.0, 0.0, 0.0, d, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a right-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar not used as infinity is used as far clip\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovReverseRHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, -1.0, 0.0, 0.0, -1.0, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a perspective projection for WebVR info a given matrix\r\n * @param fov defines the field of view\r\n * @param fov.upDegrees\r\n * @param fov.downDegrees\r\n * @param fov.leftDegrees\r\n * @param fov.rightDegrees\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param rightHanded defines if the matrix must be in right-handed mode (false by default)\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovWebVRToRef(\r\n fov: { upDegrees: number; downDegrees: number; leftDegrees: number; rightDegrees: number },\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n rightHanded = false,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const rightHandedFactor = rightHanded ? -1 : 1;\r\n\r\n const upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);\r\n const downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);\r\n const leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);\r\n const rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);\r\n const xScale = 2.0 / (leftTan + rightTan);\r\n const yScale = 2.0 / (upTan + downTan);\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n const m = result._m;\r\n m[0] = xScale;\r\n m[1] = m[2] = m[3] = m[4] = 0.0;\r\n m[5] = yScale;\r\n m[6] = 0.0;\r\n m[7] = rot;\r\n m[8] = (leftTan - rightTan) * xScale * 0.5;\r\n m[9] = -((upTan - downTan) * yScale * 0.5);\r\n m[10] = -zfar / (znear - zfar);\r\n m[11] = 1.0 * rightHandedFactor;\r\n m[12] = m[13] = m[15] = 0.0;\r\n m[14] = -(2.0 * zfar * znear) / (zfar - znear);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Computes a complete transformation matrix\r\n * @param viewport defines the viewport to use\r\n * @param world defines the world matrix\r\n * @param view defines the view matrix\r\n * @param projection defines the projection matrix\r\n * @param zmin defines the near clip plane\r\n * @param zmax defines the far clip plane\r\n * @returns the transformation matrix\r\n */\r\n public static GetFinalMatrix(\r\n viewport: DeepImmutable<Viewport>,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n zmin: number,\r\n zmax: number\r\n ): Matrix {\r\n const cw = viewport.width;\r\n const ch = viewport.height;\r\n const cx = viewport.x;\r\n const cy = viewport.y;\r\n\r\n const viewportMatrix = Matrix.FromValues(cw / 2.0, 0.0, 0.0, 0.0, 0.0, -ch / 2.0, 0.0, 0.0, 0.0, 0.0, zmax - zmin, 0.0, cx + cw / 2.0, ch / 2.0 + cy, zmin, 1.0);\r\n\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(view, matrix);\r\n matrix.multiplyToRef(projection, matrix);\r\n return matrix.multiply(viewportMatrix);\r\n }\r\n\r\n /**\r\n * Extracts a 2x2 matrix from a given matrix and store the result in a Float32Array\r\n * @param matrix defines the matrix to use\r\n * @returns a new Float32Array array with 4 elements : the 2x2 matrix extracted from the given matrix\r\n */\r\n public static GetAsMatrix2x2(matrix: DeepImmutable<Matrix>): Float32Array | Array<number> {\r\n const m = matrix.m;\r\n const arr = [m[0], m[1], m[4], m[5]];\r\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\r\n }\r\n /**\r\n * Extracts a 3x3 matrix from a given matrix and store the result in a Float32Array\r\n * @param matrix defines the matrix to use\r\n * @returns a new Float32Array array with 9 elements : the 3x3 matrix extracted from the given matrix\r\n */\r\n public static GetAsMatrix3x3(matrix: DeepImmutable<Matrix>): Float32Array | Array<number> {\r\n const m = matrix.m;\r\n const arr = [m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]];\r\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\r\n }\r\n\r\n /**\r\n * Compute the transpose of a given matrix\r\n * @param matrix defines the matrix to transpose\r\n * @returns the new matrix\r\n */\r\n public static Transpose(matrix: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n Matrix.TransposeToRef(matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Compute the transpose of a matrix and store it in a target matrix\r\n * @param matrix defines the matrix to transpose\r\n * @param result defines the target matrix\r\n */\r\n public static TransposeToRef(matrix: DeepImmutable<Matrix>, result: Matrix): void {\r\n const rm = result._m;\r\n const mm = matrix.m;\r\n rm[0] = mm[0];\r\n rm[1] = mm[4];\r\n rm[2] = mm[8];\r\n rm[3] = mm[12];\r\n\r\n rm[4] = mm[1];\r\n rm[5] = mm[5];\r\n rm[6] = mm[9];\r\n rm[7] = mm[13];\r\n\r\n rm[8] = mm[2];\r\n rm[9] = mm[6];\r\n rm[10] = mm[10];\r\n rm[11] = mm[14];\r\n\r\n rm[12] = mm[3];\r\n rm[13] = mm[7];\r\n rm[14] = mm[11];\r\n rm[15] = mm[15];\r\n\r\n result.markAsUpdated();\r\n\r\n // identity-ness does not change when transposing\r\n result._updateIdentityStatus((matrix as Matrix)._isIdentity, (matrix as Matrix)._isIdentityDirty);\r\n }\r\n\r\n /**\r\n * Computes a reflection matrix from a plane\r\n * @param plane defines the reflection plane\r\n * @returns a new matrix\r\n */\r\n public static Reflection(plane: DeepImmutable<IPlaneLike>): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.ReflectionToRef(plane, matrix);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Computes a reflection matrix from a plane\r\n * @param plane defines the reflection plane\r\n * @param result defines the target matrix\r\n */\r\n public static ReflectionToRef(plane: DeepImmutable<IPlaneLike>, result: Matrix): void {\r\n plane.normalize();\r\n const x = plane.normal.x;\r\n const y = plane.normal.y;\r\n const z = plane.normal.z;\r\n const temp = -2 * x;\r\n const temp2 = -2 * y;\r\n const temp3 = -2 * z;\r\n Matrix.FromValuesToRef(\r\n temp * x + 1,\r\n temp2 * x,\r\n temp3 * x,\r\n 0.0,\r\n temp * y,\r\n temp2 * y + 1,\r\n temp3 * y,\r\n 0.0,\r\n temp * z,\r\n temp2 * z,\r\n temp3 * z + 1,\r\n 0.0,\r\n temp * plane.d,\r\n temp2 * plane.d,\r\n temp3 * plane.d,\r\n 1.0,\r\n result\r\n );\r\n }\r\n\r\n /**\r\n * Sets the given matrix as a rotation matrix composed from the 3 left handed axes\r\n * @param xaxis defines the value of the 1st axis\r\n * @param yaxis defines the value of the 2nd axis\r\n * @param zaxis defines the value of the 3rd axis\r\n * @param result defines the target matrix\r\n */\r\n public static FromXYZAxesToRef(xaxis: DeepImmutable<Vector3>, yaxis: DeepImmutable<Vector3>, zaxis: DeepImmutable<Vector3>, result: Matrix) {\r\n Matrix.FromValuesToRef(xaxis._x, xaxis._y, xaxis._z, 0.0, yaxis._x, yaxis._y, yaxis._z, 0.0, zaxis._x, zaxis._y, zaxis._z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix from a quaternion and stores it in a target matrix\r\n * @param quat defines the quaternion to use\r\n * @param result defines the target matrix\r\n */\r\n public static FromQuaternionToRef(quat: DeepImmutable<Quaternion>, result: Matrix) {\r\n const xx = quat._x * quat._x;\r\n const yy = quat._y * quat._y;\r\n const zz = quat._z * quat._z;\r\n const xy = quat._x * quat._y;\r\n const zw = quat._z * quat._w;\r\n const zx = quat._z * quat._x;\r\n const yw = quat._y * quat._w;\r\n const yz = quat._y * quat._z;\r\n const xw = quat._x * quat._w;\r\n\r\n result._m[0] = 1.0 - 2.0 * (yy + zz);\r\n result._m[1] = 2.0 * (xy + zw);\r\n result._m[2] = 2.0 * (zx - yw);\r\n result._m[3] = 0.0;\r\n\r\n result._m[4] = 2.0 * (xy - zw);\r\n result._m[5] = 1.0 - 2.0 * (zz + xx);\r\n result._m[6] = 2.0 * (yz + xw);\r\n result._m[7] = 0.0;\r\n\r\n result._m[8] = 2.0 * (zx + yw);\r\n result._m[9] = 2.0 * (yz - xw);\r\n result._m[10] = 1.0 - 2.0 * (yy + xx);\r\n result._m[11] = 0.0;\r\n\r\n result._m[12] = 0.0;\r\n result._m[13] = 0.0;\r\n result._m[14] = 0.0;\r\n result._m[15] = 1.0;\r\n\r\n result.markAsUpdated();\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n * Same as Tmp but not exported to keep it only for math functions to avoid conflicts\r\n */\r\nclass MathTmp {\r\n public static Vector3 = ArrayTools.BuildTuple(11, Vector3.Zero);\r\n public static Matrix = ArrayTools.BuildTuple(2, Matrix.Identity);\r\n public static Quaternion = ArrayTools.BuildTuple(3, Quaternion.Zero);\r\n}\r\n\r\n/**\r\n * @hidden\r\n */\r\nexport class TmpVectors {\r\n public static Vector2 = ArrayTools.BuildTuple(3, Vector2.Zero); // 3 temp Vector2 at once should be enough\r\n public static Vector3 = ArrayTools.BuildTuple(13, Vector3.Zero); // 13 temp Vector3 at once should be enough\r\n public static Vector4 = ArrayTools.BuildTuple(3, Vector4.Zero); // 3 temp Vector4 at once should be enough\r\n public static Quaternion = ArrayTools.BuildTuple(2, Quaternion.Zero); // 2 temp Quaternion at once should be enough\r\n public static Matrix = ArrayTools.BuildTuple(8, Matrix.Identity); // 8 temp Matrices at once should be enough\r\n}\r\n\r\nRegisterClass(\"BABYLON.Vector2\", Vector2);\r\nRegisterClass(\"BABYLON.Vector3\", Vector3);\r\nRegisterClass(\"BABYLON.Vector4\", Vector4);\r\nRegisterClass(\"BABYLON.Matrix\", Matrix);\r\n\r\nconst mtxConvertNDCToHalfZRange = Matrix.FromValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1);\r\n"]}
1
+ {"version":3,"file":"math.vector.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Maths/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C,CAAC,CAAC,0CAA0C;IAC5F,qBAAU,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,6CAA6C;IACrG,iBAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,2CAA2C;IACjH,iBAAC;CAAA,AAND,IAMC;SANY,UAAU;AAQvB,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC1C,aAAa,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAExC,IAAM,yBAAyB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { Epsilon } from \"./math.constants\";\r\nimport type { Viewport } from \"./math.viewport\";\r\nimport type { DeepImmutable, Nullable, FloatArray, float } from \"../types\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport type { IPlaneLike } from \"./math.like\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\nimport type { Plane } from \"./math.plane\";\r\nimport { PerformanceConfigurator } from \"../Engines/performanceConfigurator\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\n\r\ntype TransformNode = import(\"../Meshes/transformNode\").TransformNode;\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst _ExtractAsInt = (value: number) => {\r\n return parseInt(value.toString().replace(/\\W/g, \"\"));\r\n};\r\n\r\n/**\r\n * Class representing a vector containing 2 coordinates\r\n */\r\nexport class Vector2 {\r\n /**\r\n * Creates a new Vector2 from the given x and y coordinates\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n */\r\n constructor(\r\n /** defines the first coordinate */\r\n public x: number = 0,\r\n /** defines the second coordinate */\r\n public y: number = 0\r\n ) {}\r\n\r\n /**\r\n * Gets a string with the Vector2 coordinates\r\n * @returns a string with the Vector2 coordinates\r\n */\r\n public toString(): string {\r\n return `{X: ${this.x} Y: ${this.y}}`;\r\n }\r\n\r\n /**\r\n * Gets class name\r\n * @returns the string \"Vector2\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector2\";\r\n }\r\n\r\n /**\r\n * Gets current vector hash code\r\n * @returns the Vector2 hash code as a number\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this.x);\r\n const y = _ExtractAsInt(this.y);\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Sets the Vector2 coordinates in the given array or Float32Array from the given index.\r\n * @param array defines the source array\r\n * @param index defines the offset in source array\r\n * @returns the current Vector2\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Vector2 {\r\n array[index] = this.x;\r\n array[index + 1] = this.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector2 {\r\n Vector2.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Copy the current vector to an array\r\n * @returns a new array with 2 elements: the Vector2 coordinates.\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given Vector2 coordinates\r\n * @param source defines the source Vector2\r\n * @returns the current updated Vector2\r\n */\r\n public copyFrom(source: DeepImmutable<Vector2>): Vector2 {\r\n this.x = source.x;\r\n this.y = source.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns the current updated Vector2\r\n */\r\n public copyFromFloats(x: number, y: number): Vector2 {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Vector2 coordinates with the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns the current updated Vector2\r\n */\r\n public set(x: number, y: number): Vector2 {\r\n return this.copyFromFloats(x, y);\r\n }\r\n /**\r\n * Add another vector with the current one\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates\r\n */\r\n public add(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return new Vector2(this.x + otherVector.x, this.y + otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the addition of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x + otherVector.x;\r\n result.y = this.y + otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the Vector2 coordinates by adding the given Vector2 coordinates\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x += otherVector.x;\r\n this.y += otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public addVector3(otherVector: Vector3): Vector2 {\r\n return new Vector2(this.x + otherVector.x, this.y + otherVector.y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public subtract(otherVector: Vector2): Vector2 {\r\n return new Vector2(this.x - otherVector.x, this.y - otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the subtraction of the given one from the current Vector2 coordinates.\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x - otherVector.x;\r\n result.y = this.y - otherVector.y;\r\n return this;\r\n }\r\n /**\r\n * Sets the current Vector2 coordinates by subtracting from it the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x -= otherVector.x;\r\n this.y -= otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current Vector2 coordinates by the given ones\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public multiplyInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n this.x *= otherVector.x;\r\n this.y *= otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return new Vector2(this.x * otherVector.x, this.y * otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets \"result\" coordinates with the multiplication of the current Vector2 and the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x * otherVector.x;\r\n result.y = this.y * otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats\r\n * @param x defines the first coordinate\r\n * @param y defines the second coordinate\r\n * @returns a new Vector2\r\n */\r\n public multiplyByFloats(x: number, y: number): Vector2 {\r\n return new Vector2(this.x * x, this.y * y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @returns a new Vector2\r\n */\r\n public divide(otherVector: Vector2): Vector2 {\r\n return new Vector2(this.x / otherVector.x, this.y / otherVector.y);\r\n }\r\n\r\n /**\r\n * Sets the \"result\" coordinates with the Vector2 divided by the given one coordinates\r\n * @param otherVector defines the other vector\r\n * @param result defines the target vector\r\n * @returns the unmodified current Vector2\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2 {\r\n result.x = this.x / otherVector.x;\r\n result.y = this.y / otherVector.y;\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Vector2 coordinates by the given ones\r\n * @param otherVector defines the other vector\r\n * @returns the current updated Vector2\r\n */\r\n public divideInPlace(otherVector: DeepImmutable<Vector2>): Vector2 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 with current Vector2 negated coordinates\r\n * @returns a new Vector2\r\n */\r\n public negate(): Vector2 {\r\n return new Vector2(-this.x, -this.y);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector2 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector2 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector2\r\n */\r\n public negateToRef(result: Vector2): Vector2 {\r\n return result.copyFromFloats(this.x * -1, this.y * -1);\r\n }\r\n\r\n /**\r\n * Multiply the Vector2 coordinates by scale\r\n * @param scale defines the scaling factor\r\n * @returns the current updated Vector2\r\n */\r\n public scaleInPlace(scale: number): Vector2 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 scaled by \"scale\" from the current Vector2\r\n * @param scale defines the scaling factor\r\n * @returns a new Vector2\r\n */\r\n public scale(scale: number): Vector2 {\r\n const result = new Vector2(0, 0);\r\n this.scaleToRef(scale, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Scale the current Vector2 values by a factor to a given Vector2\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector2 object where to store the result\r\n * @returns the unmodified current Vector2\r\n */\r\n public scaleToRef(scale: number, result: Vector2): Vector2 {\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Vector2 values by a factor and add the result to a given Vector2\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector2 object where to store the result\r\n * @returns the unmodified current Vector2\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector2): Vector2 {\r\n result.x += this.x * scale;\r\n result.y += this.y * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two vectors are equals\r\n * @param otherVector defines the other vector\r\n * @returns true if the given vector coordinates strictly equal the current Vector2 ones\r\n */\r\n public equals(otherVector: DeepImmutable<Vector2>): boolean {\r\n return otherVector && this.x === otherVector.x && this.y === otherVector.y;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two vectors are equals (using an epsilon value)\r\n * @param otherVector defines the other vector\r\n * @param epsilon defines the minimal distance to consider equality\r\n * @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector2>, epsilon: number = Epsilon): boolean {\r\n return otherVector && Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) && Scalar.WithinEpsilon(this.y, otherVector.y, epsilon);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 from current Vector2 floored values\r\n * eg (1.2, 2.31) returns (1, 2)\r\n * @returns a new Vector2\r\n */\r\n public floor(): Vector2 {\r\n return new Vector2(Math.floor(this.x), Math.floor(this.y));\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 from current Vector2 fractional values\r\n * eg (1.2, 2.31) returns (0.2, 0.31)\r\n * @returns a new Vector2\r\n */\r\n public fract(): Vector2 {\r\n return new Vector2(this.x - Math.floor(this.x), this.y - Math.floor(this.y));\r\n }\r\n\r\n /**\r\n * Rotate the current vector into a given result vector\r\n * @param angle defines the rotation angle\r\n * @param result defines the result vector where to store the rotated vector\r\n * @returns the current vector\r\n */\r\n public rotateToRef(angle: number, result: Vector2) {\r\n const cos = Math.cos(angle);\r\n const sin = Math.sin(angle);\r\n result.x = cos * this.x - sin * this.y;\r\n result.y = sin * this.x + cos * this.y;\r\n\r\n return this;\r\n }\r\n\r\n // Properties\r\n\r\n /**\r\n * Gets the length of the vector\r\n * @returns the vector length (float)\r\n */\r\n public length(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y);\r\n }\r\n\r\n /**\r\n * Gets the vector squared length\r\n * @returns the vector squared length (float)\r\n */\r\n public lengthSquared(): number {\r\n return this.x * this.x + this.y * this.y;\r\n }\r\n\r\n // Methods\r\n\r\n /**\r\n * Normalize the vector\r\n * @returns the current updated Vector2\r\n */\r\n public normalize(): Vector2 {\r\n Vector2.NormalizeToRef(this, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 copied from the Vector2\r\n * @returns a new Vector2\r\n */\r\n public clone(): Vector2 {\r\n return new Vector2(this.x, this.y);\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Gets a new Vector2(0, 0)\r\n * @returns a new Vector2\r\n */\r\n public static Zero(): Vector2 {\r\n return new Vector2(0, 0);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2(1, 1)\r\n * @returns a new Vector2\r\n */\r\n public static One(): Vector2 {\r\n return new Vector2(1, 1);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set from the given index element of the given array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the data source\r\n * @returns a new Vector2\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Vector2 {\r\n return new Vector2(array[offset], array[offset + 1]);\r\n }\r\n\r\n /**\r\n * Sets \"result\" from the given index element of the given array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the data source\r\n * @param result defines the target vector\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector2): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 located for \"amount\" (float) on the CatmullRom spline defined by the given four Vector2\r\n * @param value1 defines 1st point of control\r\n * @param value2 defines 2nd point of control\r\n * @param value3 defines 3rd point of control\r\n * @param value4 defines 4th point of control\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static CatmullRom(\r\n value1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n value3: DeepImmutable<Vector2>,\r\n value4: DeepImmutable<Vector2>,\r\n amount: number\r\n ): Vector2 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n\r\n const x =\r\n 0.5 *\r\n (2.0 * value2.x +\r\n (-value1.x + value3.x) * amount +\r\n (2.0 * value1.x - 5.0 * value2.x + 4.0 * value3.x - value4.x) * squared +\r\n (-value1.x + 3.0 * value2.x - 3.0 * value3.x + value4.x) * cubed);\r\n\r\n const y =\r\n 0.5 *\r\n (2.0 * value2.y +\r\n (-value1.y + value3.y) * amount +\r\n (2.0 * value1.y - 5.0 * value2.y + 4.0 * value3.y - value4.y) * squared +\r\n (-value1.y + 3.0 * value2.y - 3.0 * value3.y + value4.y) * cubed);\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 set with same the coordinates than \"value\" ones if the vector \"value\" is in the square defined by \"min\" and \"max\".\r\n * If a coordinate of \"value\" is lower than \"min\" coordinates, the returned Vector2 is given this \"min\" coordinate.\r\n * If a coordinate of \"value\" is greater than \"max\" coordinates, the returned Vector2 is given this \"max\" coordinate\r\n * @param value defines the value to clamp\r\n * @param min defines the lower limit\r\n * @param max defines the upper limit\r\n * @returns a new Vector2\r\n */\r\n public static Clamp(value: DeepImmutable<Vector2>, min: DeepImmutable<Vector2>, max: DeepImmutable<Vector2>): Vector2 {\r\n let x = value.x;\r\n x = x > max.x ? max.x : x;\r\n x = x < min.x ? min.x : x;\r\n\r\n let y = value.y;\r\n y = y > max.y ? max.y : y;\r\n y = y < min.y ? min.y : y;\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 located for \"amount\" (float) on the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\"\r\n * @param value1 defines the 1st control point\r\n * @param tangent1 defines the outgoing tangent\r\n * @param value2 defines the 2nd control point\r\n * @param tangent2 defines the incoming tangent\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n amount: number\r\n ): Vector2 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1.x * part1 + value2.x * part2 + tangent1.x * part3 + tangent2.x * part4;\r\n const y = value1.y * part1 + value2.y * part2 + tangent1.y * part3 + tangent2.y * part4;\r\n\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n time: number\r\n ): Vector2 {\r\n const result = Vector2.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where the derivative will be stored\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Vector2>,\r\n tangent1: DeepImmutable<Vector2>,\r\n value2: DeepImmutable<Vector2>,\r\n tangent2: DeepImmutable<Vector2>,\r\n time: number,\r\n result: Vector2\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 located for \"amount\" (float) on the linear interpolation between the vector \"start\" adn the vector \"end\".\r\n * @param start defines the start vector\r\n * @param end defines the end vector\r\n * @param amount defines the interpolation factor\r\n * @returns a new Vector2\r\n */\r\n public static Lerp(start: DeepImmutable<Vector2>, end: DeepImmutable<Vector2>, amount: number): Vector2 {\r\n const x = start.x + (end.x - start.x) * amount;\r\n const y = start.y + (end.y - start.y) * amount;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets the dot product of the vector \"left\" and the vector \"right\"\r\n * @param left defines first vector\r\n * @param right defines second vector\r\n * @returns the dot product (float)\r\n */\r\n public static Dot(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): number {\r\n return left.x * right.x + left.y * right.y;\r\n }\r\n\r\n /**\r\n * Returns a new Vector2 equal to the normalized given vector\r\n * @param vector defines the vector to normalize\r\n * @returns a new Vector2\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector2>): Vector2 {\r\n const newVector = Vector2.Zero();\r\n this.NormalizeToRef(vector, newVector);\r\n return newVector;\r\n }\r\n\r\n /**\r\n * Normalize a given vector into a second one\r\n * @param vector defines the vector to normalize\r\n * @param result defines the vector where to store the result\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector2>, result: Vector2) {\r\n const len = vector.length();\r\n\r\n if (len === 0) {\r\n return;\r\n }\r\n\r\n result.x = vector.x / len;\r\n result.y = vector.y / len;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the minimal coordinate values from the \"left\" and \"right\" vectors\r\n * @param left defines 1st vector\r\n * @param right defines 2nd vector\r\n * @returns a new Vector2\r\n */\r\n public static Minimize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2 {\r\n const x = left.x < right.x ? left.x : right.x;\r\n const y = left.y < right.y ? left.y : right.y;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the maximal coordinate values from the \"left\" and \"right\" vectors\r\n * @param left defines 1st vector\r\n * @param right defines 2nd vector\r\n * @returns a new Vector2\r\n */\r\n public static Maximize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2 {\r\n const x = left.x > right.x ? left.x : right.x;\r\n const y = left.y > right.y ? left.y : right.y;\r\n return new Vector2(x, y);\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix\r\n * @param vector defines the vector to transform\r\n * @param transformation defines the matrix to apply\r\n * @returns a new Vector2\r\n */\r\n public static Transform(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>): Vector2 {\r\n const r = Vector2.Zero();\r\n Vector2.TransformToRef(vector, transformation, r);\r\n return r;\r\n }\r\n\r\n /**\r\n * Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector \"result\" coordinates\r\n * @param vector defines the vector to transform\r\n * @param transformation defines the matrix to apply\r\n * @param result defines the target vector\r\n */\r\n public static TransformToRef(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>, result: Vector2) {\r\n const m = transformation.m;\r\n const x = vector.x * m[0] + vector.y * m[4] + m[12];\r\n const y = vector.x * m[1] + vector.y * m[5] + m[13];\r\n result.x = x;\r\n result.y = y;\r\n }\r\n\r\n /**\r\n * Determines if a given vector is included in a triangle\r\n * @param p defines the vector to test\r\n * @param p0 defines 1st triangle point\r\n * @param p1 defines 2nd triangle point\r\n * @param p2 defines 3rd triangle point\r\n * @returns true if the point \"p\" is in the triangle defined by the vectors \"p0\", \"p1\", \"p2\"\r\n */\r\n public static PointInTriangle(p: DeepImmutable<Vector2>, p0: DeepImmutable<Vector2>, p1: DeepImmutable<Vector2>, p2: DeepImmutable<Vector2>) {\r\n const a = (1 / 2) * (-p1.y * p2.x + p0.y * (-p1.x + p2.x) + p0.x * (p1.y - p2.y) + p1.x * p2.y);\r\n const sign = a < 0 ? -1 : 1;\r\n const s = (p0.y * p2.x - p0.x * p2.y + (p2.y - p0.y) * p.x + (p0.x - p2.x) * p.y) * sign;\r\n const t = (p0.x * p1.y - p0.y * p1.x + (p0.y - p1.y) * p.x + (p1.x - p0.x) * p.y) * sign;\r\n\r\n return s > 0 && t > 0 && s + t < 2 * a * sign;\r\n }\r\n\r\n /**\r\n * Gets the distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns the distance between vectors\r\n */\r\n public static Distance(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number {\r\n return Math.sqrt(Vector2.DistanceSquared(value1, value2));\r\n }\r\n\r\n /**\r\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns the squared distance between vectors\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number {\r\n const x = value1.x - value2.x;\r\n const y = value1.y - value2.y;\r\n return x * x + y * y;\r\n }\r\n\r\n /**\r\n * Gets a new Vector2 located at the center of the vectors \"value1\" and \"value2\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @returns a new Vector2\r\n */\r\n public static Center(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): Vector2 {\r\n return Vector2.CenterToRef(value1, value2, Vector2.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, ref: DeepImmutable<Vector2>): Vector2 {\r\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2);\r\n }\r\n\r\n /**\r\n * Gets the shortest distance (float) between the point \"p\" and the segment defined by the two points \"segA\" and \"segB\".\r\n * @param p defines the middle point\r\n * @param segA defines one point of the segment\r\n * @param segB defines the other point of the segment\r\n * @returns the shortest distance\r\n */\r\n public static DistanceOfPointFromSegment(p: DeepImmutable<Vector2>, segA: DeepImmutable<Vector2>, segB: DeepImmutable<Vector2>): number {\r\n const l2 = Vector2.DistanceSquared(segA, segB);\r\n if (l2 === 0.0) {\r\n return Vector2.Distance(p, segA);\r\n }\r\n const v = segB.subtract(segA);\r\n const t = Math.max(0, Math.min(1, Vector2.Dot(p.subtract(segA), v) / l2));\r\n const proj = segA.add(v.multiplyByFloats(t, t));\r\n return Vector2.Distance(p, proj);\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store (x,y,z) vector representation\r\n * A Vector3 is the main object used in 3D geometry\r\n * It can represent either the coordinates of a point the space, either a direction\r\n * Reminder: js uses a left handed forward facing system\r\n */\r\nexport class Vector3 {\r\n private static _UpReadOnly = Vector3.Up() as DeepImmutable<Vector3>;\r\n private static _LeftHandedForwardReadOnly = Vector3.Forward(false) as DeepImmutable<Vector3>;\r\n private static _RightHandedForwardReadOnly = Vector3.Forward(true) as DeepImmutable<Vector3>;\r\n private static _RightReadOnly = Vector3.Right() as DeepImmutable<Vector3>;\r\n private static _LeftReadOnly = Vector3.Left() as DeepImmutable<Vector3>;\r\n private static _ZeroReadOnly = Vector3.Zero() as DeepImmutable<Vector3>;\r\n\r\n /** @hidden */\r\n public _x: number;\r\n\r\n /** @hidden */\r\n public _y: number;\r\n\r\n /** @hidden */\r\n public _z: number;\r\n\r\n /** @hidden */\r\n public _isDirty = true;\r\n\r\n /** Gets or sets the x coordinate */\r\n public get x() {\r\n return this._x;\r\n }\r\n\r\n public set x(value: number) {\r\n this._x = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the y coordinate */\r\n public get y() {\r\n return this._y;\r\n }\r\n\r\n public set y(value: number) {\r\n this._y = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the z coordinate */\r\n public get z() {\r\n return this._z;\r\n }\r\n\r\n public set z(value: number) {\r\n this._z = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /**\r\n * Creates a new Vector3 object from the given x, y, z (floats) coordinates.\r\n * @param x defines the first coordinates (on X axis)\r\n * @param y defines the second coordinates (on Y axis)\r\n * @param z defines the third coordinates (on Z axis)\r\n */\r\n constructor(x: number = 0, y: number = 0, z: number = 0) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n }\r\n\r\n /**\r\n * Creates a string representation of the Vector3\r\n * @returns a string with the Vector3 coordinates.\r\n */\r\n public toString(): string {\r\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z}}`;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Vector3\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector3\";\r\n }\r\n\r\n /**\r\n * Creates the Vector3 hash code\r\n * @returns a number which tends to be unique between Vector3 instances\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this._x);\r\n const y = _ExtractAsInt(this._y);\r\n const z = _ExtractAsInt(this._z);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n\r\n /**\r\n * Creates an array containing three elements : the coordinates of the Vector3\r\n * @returns a new array of numbers\r\n */\r\n public asArray(): number[] {\r\n const result: number[] = [];\r\n this.toArray(result, 0);\r\n return result;\r\n }\r\n\r\n /**\r\n * Populates the given array or Float32Array from the given index with the successive coordinates of the Vector3\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public toArray(array: FloatArray, index: number = 0): Vector3 {\r\n array[index] = this._x;\r\n array[index + 1] = this._y;\r\n array[index + 2] = this._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector3 {\r\n Vector3.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Converts the current Vector3 into a quaternion (considering that the Vector3 contains Euler angles representation of a rotation)\r\n * @returns a new Quaternion object, computed from the Vector3 coordinates\r\n */\r\n public toQuaternion(): Quaternion {\r\n return Quaternion.RotationYawPitchRoll(this._y, this._x, this._z);\r\n }\r\n\r\n /**\r\n * Adds the given vector to the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return this.addInPlaceFromFloats(otherVector._x, otherVector._y, otherVector._z);\r\n }\r\n\r\n /**\r\n * Adds the given coordinates to the current Vector3\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public addInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n this.x += x;\r\n this.y += y;\r\n this.z += z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector3, result of the addition the current Vector3 and the given vector\r\n * @param otherVector defines the second operand\r\n * @returns the resulting Vector3\r\n */\r\n public add(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\r\n }\r\n\r\n /**\r\n * Adds the current Vector3 to the given one and stores the result in the vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x + otherVector._x, this._y + otherVector._y, this._z + otherVector._z);\r\n }\r\n\r\n /**\r\n * Subtract the given vector from the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n this.x -= otherVector._x;\r\n this.y -= otherVector._y;\r\n this.z -= otherVector._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3, result of the subtraction of the given vector from the current Vector3\r\n * @param otherVector defines the second operand\r\n * @returns the resulting Vector3\r\n */\r\n public subtract(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x - otherVector._x, this._y - otherVector._y, this._z - otherVector._z);\r\n }\r\n\r\n /**\r\n * Subtracts the given vector from the current Vector3 and stores the result in the vector \"result\".\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return this.subtractFromFloatsToRef(otherVector._x, otherVector._y, otherVector._z, result);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the resulting Vector3\r\n */\r\n public subtractFromFloats(x: number, y: number, z: number): Vector3 {\r\n return new Vector3(this._x - x, this._y - y, this._z - z);\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current Vector3 coordinates and set the given vector \"result\" with this result\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public subtractFromFloatsToRef(x: number, y: number, z: number, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x - x, this._y - y, this._z - z);\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 set with the current Vector3 negated coordinates\r\n * @returns a new Vector3\r\n */\r\n public negate(): Vector3 {\r\n return new Vector3(-this._x, -this._y, -this._z);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector3 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector3 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public negateToRef(result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * -1, this._y * -1, this._z * -1);\r\n }\r\n\r\n /**\r\n * Multiplies the Vector3 coordinates by the float \"scale\"\r\n * @param scale defines the multiplier factor\r\n * @returns the current updated Vector3\r\n */\r\n public scaleInPlace(scale: number): Vector3 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\r\n * @param scale defines the multiplier factor\r\n * @returns a new Vector3\r\n */\r\n public scale(scale: number): Vector3 {\r\n return new Vector3(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 coordinates by the float \"scale\" and stores the result in the given vector \"result\" coordinates\r\n * @param scale defines the multiplier factor\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public scaleToRef(scale: number, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Scale the current Vector3 values by a factor and add the result to a given Vector3\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the unmodified current Vector3\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector3): Vector3 {\r\n return result.addInPlaceFromFloats(this._x * scale, this._y * scale, this._z * scale);\r\n }\r\n\r\n /**\r\n * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.\r\n * @param plane defines the plane to project to\r\n * @param origin defines the origin of the projection ray\r\n * @returns the projected vector3\r\n */\r\n public projectOnPlane(plane: Plane, origin: Vector3): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.projectOnPlaneToRef(plane, origin, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.\r\n * @param plane defines the plane to project to\r\n * @param origin defines the origin of the projection ray\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public projectOnPlaneToRef(plane: Plane, origin: Vector3, result: Vector3): void {\r\n const n = plane.normal;\r\n const d = plane.d;\r\n\r\n const V = MathTmp.Vector3[0];\r\n\r\n // ray direction\r\n this.subtractToRef(origin, V);\r\n\r\n V.normalize();\r\n\r\n const denom = Vector3.Dot(V, n);\r\n const t = -(Vector3.Dot(origin, n) + d) / denom;\r\n\r\n // P = P0 + t*V\r\n const scaledV = V.scaleInPlace(t);\r\n origin.addToRef(scaledV, result);\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 and the given vector coordinates are strictly equal\r\n * @param otherVector defines the second operand\r\n * @returns true if both vectors are equals\r\n */\r\n public equals(otherVector: DeepImmutable<Vector3>): boolean {\r\n return otherVector && this._x === otherVector._x && this._y === otherVector._y && this._z === otherVector._z;\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon\r\n * @param otherVector defines the second operand\r\n * @param epsilon defines the minimal distance to define values as equals\r\n * @returns true if both vectors are distant less than epsilon\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector3>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherVector &&\r\n Scalar.WithinEpsilon(this._x, otherVector._x, epsilon) &&\r\n Scalar.WithinEpsilon(this._y, otherVector._y, epsilon) &&\r\n Scalar.WithinEpsilon(this._z, otherVector._z, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Returns true if the current Vector3 coordinates equals the given floats\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns true if both vectors are equals\r\n */\r\n public equalsToFloats(x: number, y: number, z: number): boolean {\r\n return this._x === x && this._y === y && this._z === z;\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 coordinates by the given ones\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public multiplyInPlace(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n this.x *= otherVector._x;\r\n this.y *= otherVector._y;\r\n this.z *= otherVector._z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector\r\n * @param otherVector defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return this.multiplyByFloats(otherVector._x, otherVector._y, otherVector._z);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector3 by the given one and stores the result in the given vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x * otherVector._x, this._y * otherVector._y, this._z * otherVector._z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the new Vector3\r\n */\r\n public multiplyByFloats(x: number, y: number, z: number): Vector3 {\r\n return new Vector3(this._x * x, this._y * y, this._z * z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones\r\n * @param otherVector defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public divide(otherVector: DeepImmutable<Vector3>): Vector3 {\r\n return new Vector3(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector \"result\"\r\n * @param otherVector defines the second operand\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector3\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3 {\r\n return result.copyFromFloats(this._x / otherVector._x, this._y / otherVector._y, this._z / otherVector._z);\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones.\r\n * @param otherVector defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public divideInPlace(otherVector: Vector3): Vector3 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public minimizeInPlace(other: DeepImmutable<Vector3>): Vector3 {\r\n return this.minimizeInPlaceFromFloats(other._x, other._y, other._z);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.\r\n * @param other defines the second operand\r\n * @returns the current updated Vector3\r\n */\r\n public maximizeInPlace(other: DeepImmutable<Vector3>): Vector3 {\r\n return this.maximizeInPlaceFromFloats(other._x, other._y, other._z);\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public minimizeInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n if (x < this._x) {\r\n this.x = x;\r\n }\r\n if (y < this._y) {\r\n this.y = y;\r\n }\r\n if (z < this._z) {\r\n this.z = z;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public maximizeInPlaceFromFloats(x: number, y: number, z: number): Vector3 {\r\n if (x > this._x) {\r\n this.x = x;\r\n }\r\n if (y > this._y) {\r\n this.y = y;\r\n }\r\n if (z > this._z) {\r\n this.z = z;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Due to float precision, scale of a mesh could be uniform but float values are off by a small fraction\r\n * Check if is non uniform within a certain amount of decimal places to account for this\r\n * @param epsilon the amount the values can differ\r\n * @returns if the the vector is non uniform to a certain number of decimal places\r\n */\r\n public isNonUniformWithinEpsilon(epsilon: number) {\r\n const absX = Math.abs(this._x);\r\n const absY = Math.abs(this._y);\r\n if (!Scalar.WithinEpsilon(absX, absY, epsilon)) {\r\n return true;\r\n }\r\n\r\n const absZ = Math.abs(this._z);\r\n if (!Scalar.WithinEpsilon(absX, absZ, epsilon)) {\r\n return true;\r\n }\r\n\r\n if (!Scalar.WithinEpsilon(absY, absZ, epsilon)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same\r\n */\r\n public get isNonUniform(): boolean {\r\n const absX = Math.abs(this._x);\r\n const absY = Math.abs(this._y);\r\n if (absX !== absY) {\r\n return true;\r\n }\r\n\r\n const absZ = Math.abs(this._z);\r\n if (absX !== absZ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 from current Vector3 floored values\r\n * @returns a new Vector3\r\n */\r\n public floor(): Vector3 {\r\n return new Vector3(Math.floor(this._x), Math.floor(this._y), Math.floor(this._z));\r\n }\r\n\r\n /**\r\n * Gets a new Vector3 from current Vector3 floored values\r\n * @returns a new Vector3\r\n */\r\n public fract(): Vector3 {\r\n return new Vector3(this._x - Math.floor(this._x), this._y - Math.floor(this._y), this._z - Math.floor(this._z));\r\n }\r\n\r\n // Properties\r\n /**\r\n * Gets the length of the Vector3\r\n * @returns the length of the Vector3\r\n */\r\n public length(): number {\r\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z);\r\n }\r\n\r\n /**\r\n * Gets the squared length of the Vector3\r\n * @returns squared length of the Vector3\r\n */\r\n public lengthSquared(): number {\r\n return this._x * this._x + this._y * this._y + this._z * this._z;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the vector contains a zero in one of its components\r\n */\r\n public get hasAZeroComponent(): boolean {\r\n return this._x * this._y * this._z === 0;\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3.\r\n * Please note that this is an in place operation.\r\n * @returns the current updated Vector3\r\n */\r\n public normalize(): Vector3 {\r\n return this.normalizeFromLength(this.length());\r\n }\r\n\r\n /**\r\n * Reorders the x y z properties of the vector in place\r\n * @param order new ordering of the properties (eg. for vector 1,2,3 with \"ZYX\" will produce 3,2,1)\r\n * @returns the current updated vector\r\n */\r\n public reorderInPlace(order: string) {\r\n order = order.toLowerCase();\r\n if (order === \"xyz\") {\r\n return this;\r\n }\r\n MathTmp.Vector3[0].copyFrom(this);\r\n [\"x\", \"y\", \"z\"].forEach((val, i) => {\r\n (<any>this)[val] = (<any>MathTmp.Vector3[0])[order[i]];\r\n });\r\n return this;\r\n }\r\n\r\n /**\r\n * Rotates the vector around 0,0,0 by a quaternion\r\n * @param quaternion the rotation quaternion\r\n * @param result vector to store the result\r\n * @returns the resulting vector\r\n */\r\n public rotateByQuaternionToRef(quaternion: Quaternion, result: Vector3) {\r\n quaternion.toRotationMatrix(MathTmp.Matrix[0]);\r\n Vector3.TransformCoordinatesToRef(this, MathTmp.Matrix[0], result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Rotates a vector around a given point\r\n * @param quaternion the rotation quaternion\r\n * @param point the point to rotate around\r\n * @param result vector to store the result\r\n * @returns the resulting vector\r\n */\r\n public rotateByQuaternionAroundPointToRef(quaternion: Quaternion, point: Vector3, result: Vector3) {\r\n this.subtractToRef(point, MathTmp.Vector3[0]);\r\n MathTmp.Vector3[0].rotateByQuaternionToRef(quaternion, MathTmp.Vector3[0]);\r\n point.addToRef(MathTmp.Vector3[0], result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the cross product of the current vector and the \"other\" one\r\n * The cross product is then orthogonal to both current and \"other\"\r\n * @param other defines the right operand\r\n * @returns the cross product\r\n */\r\n public cross(other: Vector3) {\r\n return Vector3.Cross(this, other);\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 with the given input length.\r\n * Please note that this is an in place operation.\r\n * @param len the length of the vector\r\n * @returns the current updated Vector3\r\n */\r\n public normalizeFromLength(len: number): Vector3 {\r\n if (len === 0 || len === 1.0) {\r\n return this;\r\n }\r\n\r\n return this.scaleInPlace(1.0 / len);\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 to a new vector\r\n * @returns the new Vector3\r\n */\r\n public normalizeToNew(): Vector3 {\r\n const normalized = new Vector3(0, 0, 0);\r\n this.normalizeToRef(normalized);\r\n return normalized;\r\n }\r\n\r\n /**\r\n * Normalize the current Vector3 to the reference\r\n * @param reference define the Vector3 to update\r\n * @returns the updated Vector3\r\n */\r\n public normalizeToRef(reference: Vector3): Vector3 {\r\n const len = this.length();\r\n if (len === 0 || len === 1.0) {\r\n return reference.copyFromFloats(this._x, this._y, this._z);\r\n }\r\n\r\n return this.scaleToRef(1.0 / len, reference);\r\n }\r\n\r\n /**\r\n * Creates a new Vector3 copied from the current Vector3\r\n * @returns the new Vector3\r\n */\r\n public clone(): Vector3 {\r\n return new Vector3(this._x, this._y, this._z);\r\n }\r\n\r\n /**\r\n * Copies the given vector coordinates to the current Vector3 ones\r\n * @param source defines the source Vector3\r\n * @returns the current updated Vector3\r\n */\r\n public copyFrom(source: DeepImmutable<Vector3>): Vector3 {\r\n return this.copyFromFloats(source._x, source._y, source._z);\r\n }\r\n\r\n /**\r\n * Copies the given floats to the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public copyFromFloats(x: number, y: number, z: number): Vector3 {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given floats to the current Vector3 coordinates\r\n * @param x defines the x coordinate of the operand\r\n * @param y defines the y coordinate of the operand\r\n * @param z defines the z coordinate of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public set(x: number, y: number, z: number): Vector3 {\r\n return this.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector3 coordinates\r\n * @param v defines the x, y and z coordinates of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public setAll(v: number): Vector3 {\r\n this.x = this.y = this.z = v;\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Get the clip factor between two vectors\r\n * @param vector0 defines the first operand\r\n * @param vector1 defines the second operand\r\n * @param axis defines the axis to use\r\n * @param size defines the size along the axis\r\n * @returns the clip factor\r\n */\r\n public static GetClipFactor(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, axis: DeepImmutable<Vector3>, size: number) {\r\n const d0 = Vector3.Dot(vector0, axis) - size;\r\n const d1 = Vector3.Dot(vector1, axis) - size;\r\n\r\n const s = d0 / (d0 - d1);\r\n\r\n return s;\r\n }\r\n\r\n /**\r\n * Get angle between two vectors\r\n * @param vector0 angle between vector0 and vector1\r\n * @param vector1 angle between vector0 and vector1\r\n * @param normal direction of the normal\r\n * @return the angle between vector0 and vector1\r\n */\r\n public static GetAngleBetweenVectors(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): number {\r\n const v0: Vector3 = vector0.normalizeToRef(MathTmp.Vector3[1]);\r\n const v1: Vector3 = vector1.normalizeToRef(MathTmp.Vector3[2]);\r\n let dot: number = Vector3.Dot(v0, v1);\r\n // Vectors are normalized so dot will be in [-1, 1] (aside precision issues enough to break the result which explains the below clamp)\r\n dot = Scalar.Clamp(dot, -1, 1);\r\n\r\n const angle = Math.acos(dot);\r\n const n = MathTmp.Vector3[3];\r\n Vector3.CrossToRef(v0, v1, n);\r\n if (Vector3.Dot(n, normal) > 0) {\r\n return isNaN(angle) ? 0 : angle;\r\n }\r\n return isNaN(angle) ? -Math.PI : -Math.acos(dot);\r\n }\r\n\r\n /**\r\n * Get angle between two vectors projected on a plane\r\n * @param vector0 angle between vector0 and vector1\r\n * @param vector1 angle between vector0 and vector1\r\n * @param normal Normal of the projection plane\r\n * @returns the angle between vector0 and vector1 projected on the plane with the specified normal\r\n */\r\n public static GetAngleBetweenVectorsOnPlane(vector0: Vector3, vector1: Vector3, normal: Vector3) {\r\n MathTmp.Vector3[0].copyFrom(vector0);\r\n const v0 = MathTmp.Vector3[0];\r\n MathTmp.Vector3[1].copyFrom(vector1);\r\n const v1 = MathTmp.Vector3[1];\r\n MathTmp.Vector3[2].copyFrom(normal);\r\n const vNormal = MathTmp.Vector3[2];\r\n const right = MathTmp.Vector3[3];\r\n const forward = MathTmp.Vector3[4];\r\n\r\n v0.normalize();\r\n v1.normalize();\r\n vNormal.normalize();\r\n\r\n Vector3.CrossToRef(vNormal, v0, right);\r\n Vector3.CrossToRef(right, vNormal, forward);\r\n\r\n const angle = Math.atan2(Vector3.Dot(v1, right), Vector3.Dot(v1, forward));\r\n\r\n return Scalar.NormalizeRadians(angle);\r\n }\r\n\r\n /**\r\n * Slerp between two vectors. See also `SmoothToRef`\r\n * @param vector0 Start vector\r\n * @param vector1 End vector\r\n * @param slerp amount (will be clamped between 0 and 1)\r\n * @param result The slerped vector\r\n */\r\n public static SlerpToRef(vector0: Vector3, vector1: Vector3, slerp: number, result: Vector3) {\r\n slerp = Scalar.Clamp(slerp, 0, 1);\r\n const vector0Dir = MathTmp.Vector3[0];\r\n const vector1Dir = MathTmp.Vector3[1];\r\n\r\n vector0Dir.copyFrom(vector0);\r\n const vector0Length = vector0Dir.length();\r\n vector0Dir.normalizeFromLength(vector0Length);\r\n\r\n vector1Dir.copyFrom(vector1);\r\n const vector1Length = vector1Dir.length();\r\n vector1Dir.normalizeFromLength(vector1Length);\r\n\r\n const dot = Vector3.Dot(vector0Dir, vector1Dir);\r\n\r\n let scale0;\r\n let scale1;\r\n\r\n if (dot < 1 - Epsilon) {\r\n const omega = Math.acos(dot);\r\n const invSin = 1 / Math.sin(omega);\r\n scale0 = Math.sin((1 - slerp) * omega) * invSin;\r\n scale1 = Math.sin(slerp * omega) * invSin;\r\n } else {\r\n // Use linear interpolation\r\n scale0 = 1 - slerp;\r\n scale1 = slerp;\r\n }\r\n\r\n vector0Dir.scaleInPlace(scale0);\r\n vector1Dir.scaleInPlace(scale1);\r\n result.copyFrom(vector0Dir).addInPlace(vector1Dir);\r\n result.scaleInPlace(Scalar.Lerp(vector0Length, vector1Length, slerp));\r\n }\r\n\r\n /**\r\n * Smooth interpolation between two vectors using Slerp\r\n * @param source source vector\r\n * @param goal goal vector\r\n * @param deltaTime current interpolation frame\r\n * @param lerpTime total interpolation time\r\n * @param result the smoothed vector\r\n */\r\n public static SmoothToRef(source: Vector3, goal: Vector3, deltaTime: number, lerpTime: number, result: Vector3) {\r\n Vector3.SlerpToRef(source, goal, lerpTime === 0 ? 1 : deltaTime / lerpTime, result);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set from the index \"offset\" of the given array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @returns the new Vector3\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Vector3 {\r\n return new Vector3(array[offset], array[offset + 1], array[offset + 2]);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set from the index \"offset\" of the given Float32Array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @returns the new Vector3\r\n * @deprecated Please use FromArray instead.\r\n */\r\n public static FromFloatArray(array: DeepImmutable<Float32Array>, offset?: number): Vector3 {\r\n return Vector3.FromArray(array, offset);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector3): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given Float32Array\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param result defines the Vector3 where to store the result\r\n * @deprecated Please use FromArrayToRef instead.\r\n */\r\n public static FromFloatArrayToRef(array: DeepImmutable<Float32Array>, offset: number, result: Vector3): void {\r\n return Vector3.FromArrayToRef(array, offset, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the given floats.\r\n * @param x defines the x coordinate of the source\r\n * @param y defines the y coordinate of the source\r\n * @param z defines the z coordinate of the source\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static FromFloatsToRef(x: number, y: number, z: number, result: Vector3): void {\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, 0.0)\r\n * @returns a new empty Vector3\r\n */\r\n public static Zero(): Vector3 {\r\n return new Vector3(0.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (1.0, 1.0, 1.0)\r\n * @returns a new unit Vector3\r\n */\r\n public static One(): Vector3 {\r\n return new Vector3(1.0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 1.0, 0.0)\r\n * @returns a new up Vector3\r\n */\r\n public static Up(): Vector3 {\r\n return new Vector3(0.0, 1.0, 0.0);\r\n }\r\n\r\n /**\r\n * Gets a up Vector3 that must not be updated\r\n */\r\n public static get UpReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._UpReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a right Vector3 that must not be updated\r\n */\r\n public static get RightReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._RightReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a left Vector3 that must not be updated\r\n */\r\n public static get LeftReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._LeftReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a forward Vector3 that must not be updated\r\n */\r\n public static get LeftHandedForwardReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._LeftHandedForwardReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a forward Vector3 that must not be updated\r\n */\r\n public static get RightHandedForwardReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._RightHandedForwardReadOnly;\r\n }\r\n\r\n /**\r\n * Gets a zero Vector3 that must not be updated\r\n */\r\n public static get ZeroReadOnly(): DeepImmutable<Vector3> {\r\n return Vector3._ZeroReadOnly;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set to (0.0, -1.0, 0.0)\r\n * @returns a new down Vector3\r\n */\r\n public static Down(): Vector3 {\r\n return new Vector3(0.0, -1.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, 1.0)\r\n * @param rightHandedSystem is the scene right-handed (negative z)\r\n * @returns a new forward Vector3\r\n */\r\n public static Forward(rightHandedSystem: boolean = false): Vector3 {\r\n return new Vector3(0.0, 0.0, rightHandedSystem ? -1.0 : 1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (0.0, 0.0, -1.0)\r\n * @param rightHandedSystem is the scene right-handed (negative-z)\r\n * @returns a new forward Vector3\r\n */\r\n public static Backward(rightHandedSystem: boolean = false): Vector3 {\r\n return new Vector3(0.0, 0.0, rightHandedSystem ? 1.0 : -1.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (1.0, 0.0, 0.0)\r\n * @returns a new right Vector3\r\n */\r\n public static Right(): Vector3 {\r\n return new Vector3(1.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector3 set to (-1.0, 0.0, 0.0)\r\n * @returns a new left Vector3\r\n */\r\n public static Left(): Vector3 {\r\n return new Vector3(-1.0, 0.0, 0.0);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.\r\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the transformed Vector3\r\n */\r\n public static TransformCoordinates(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.TransformCoordinatesToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\r\n * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformCoordinatesToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n Vector3.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\r\n * This method computes transformed coordinates only, not transformed direction vectors\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformCoordinatesFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n const m = transformation.m;\r\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\r\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\r\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\r\n const rw = 1 / (x * m[3] + y * m[7] + z * m[11] + m[15]);\r\n\r\n result.x = rx * rw;\r\n result.y = ry * rw;\r\n result.z = rz * rw;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the new Vector3\r\n */\r\n public static TransformNormal(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.TransformNormalToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformNormalToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n this.TransformNormalFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z)\r\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static TransformNormalFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector3): void {\r\n const m = transformation.m;\r\n result.x = x * m[0] + y * m[4] + z * m[8];\r\n result.y = x * m[1] + y * m[5] + z * m[9];\r\n result.z = x * m[2] + y * m[6] + z * m[10];\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" on the CatmullRom interpolation spline defined by the vectors \"value1\", \"value2\", \"value3\", \"value4\"\r\n * @param value1 defines the first control point\r\n * @param value2 defines the second control point\r\n * @param value3 defines the third control point\r\n * @param value4 defines the fourth control point\r\n * @param amount defines the amount on the spline to use\r\n * @returns the new Vector3\r\n */\r\n public static CatmullRom(\r\n value1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n value3: DeepImmutable<Vector3>,\r\n value4: DeepImmutable<Vector3>,\r\n amount: number\r\n ): Vector3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n\r\n const x =\r\n 0.5 *\r\n (2.0 * value2._x +\r\n (-value1._x + value3._x) * amount +\r\n (2.0 * value1._x - 5.0 * value2._x + 4.0 * value3._x - value4._x) * squared +\r\n (-value1._x + 3.0 * value2._x - 3.0 * value3._x + value4._x) * cubed);\r\n\r\n const y =\r\n 0.5 *\r\n (2.0 * value2._y +\r\n (-value1._y + value3._y) * amount +\r\n (2.0 * value1._y - 5.0 * value2._y + 4.0 * value3._y - value4._y) * squared +\r\n (-value1._y + 3.0 * value2._y - 3.0 * value3._y + value4._y) * cubed);\r\n\r\n const z =\r\n 0.5 *\r\n (2.0 * value2._z +\r\n (-value1._z + value3._z) * amount +\r\n (2.0 * value1._z - 5.0 * value2._z + 4.0 * value3._z - value4._z) * squared +\r\n (-value1._z + 3.0 * value2._z - 3.0 * value3._z + value4._z) * cubed);\r\n\r\n return new Vector3(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\r\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\r\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\r\n * @param value defines the current value\r\n * @param min defines the lower range value\r\n * @param max defines the upper range value\r\n * @returns the new Vector3\r\n */\r\n public static Clamp(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>): Vector3 {\r\n const v = new Vector3();\r\n Vector3.ClampToRef(value, min, max, v);\r\n return v;\r\n }\r\n /**\r\n * Sets the given vector \"result\" with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\r\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\r\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\r\n * @param value defines the current value\r\n * @param min defines the lower range value\r\n * @param max defines the upper range value\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static ClampToRef(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>, result: Vector3): void {\r\n let x = value._x;\r\n x = x > max._x ? max._x : x;\r\n x = x < min._x ? min._x : x;\r\n\r\n let y = value._y;\r\n y = y > max._y ? max._y : y;\r\n y = y < min._y ? min._y : y;\r\n\r\n let z = value._z;\r\n z = z > max._z ? max._z : z;\r\n z = z < min._z ? min._z : z;\r\n\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Checks if a given vector is inside a specific range\r\n * @param v defines the vector to test\r\n * @param min defines the minimum range\r\n * @param max defines the maximum range\r\n */\r\n public static CheckExtends(v: Vector3, min: Vector3, max: Vector3): void {\r\n min.minimizeInPlace(v);\r\n max.maximizeInPlace(v);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent vector\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent vector\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns the new Vector3\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n amount: number\r\n ): Vector3 {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\r\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\r\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\r\n return new Vector3(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 which is the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n time: number\r\n ): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Vector3 with the 1st derivative of the Hermite spline defined by the vectors \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Vector3>,\r\n tangent1: DeepImmutable<Vector3>,\r\n value2: DeepImmutable<Vector3>,\r\n tangent2: DeepImmutable<Vector3>,\r\n time: number,\r\n result: Vector3\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n result.z = (t2 - time) * 6 * value1.z + (3 * t2 - 4 * time + 1) * tangent1.z + (-t2 + time) * 6 * value2.z + (3 * t2 - 2 * time) * tangent2.z;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located for \"amount\" (float) on the linear interpolation between the vectors \"start\" and \"end\"\r\n * @param start defines the start value\r\n * @param end defines the end value\r\n * @param amount max defines amount between both (between 0 and 1)\r\n * @returns the new Vector3\r\n */\r\n public static Lerp(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number): Vector3 {\r\n const result = new Vector3(0, 0, 0);\r\n Vector3.LerpToRef(start, end, amount, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the linear interpolation from the vector \"start\" for \"amount\" to the vector \"end\"\r\n * @param start defines the start value\r\n * @param end defines the end value\r\n * @param amount max defines amount between both (between 0 and 1)\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static LerpToRef(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number, result: Vector3): void {\r\n result.x = start._x + (end._x - start._x) * amount;\r\n result.y = start._y + (end._y - start._y) * amount;\r\n result.z = start._z + (end._z - start._z) * amount;\r\n }\r\n\r\n /**\r\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the dot product\r\n */\r\n public static Dot(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): number {\r\n return left._x * right._x + left._y * right._y + left._z * right._z;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the cross product of the vectors \"left\" and \"right\"\r\n * The cross product is then orthogonal to both \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the cross product\r\n */\r\n public static Cross(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.CrossToRef(left, right, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the cross product of \"left\" and \"right\"\r\n * The cross product is then orthogonal to both \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static CrossToRef(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>, result: Vector3): void {\r\n const x = left._y * right._z - left._z * right._y;\r\n const y = left._z * right._x - left._x * right._z;\r\n const z = left._x * right._y - left._y * right._x;\r\n result.copyFromFloats(x, y, z);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 as the normalization of the given vector\r\n * @param vector defines the Vector3 to normalize\r\n * @returns the new Vector3\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector3>): Vector3 {\r\n const result = Vector3.Zero();\r\n Vector3.NormalizeToRef(vector, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the normalization of the given first vector\r\n * @param vector defines the Vector3 to normalize\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector3>, result: Vector3): void {\r\n vector.normalizeToRef(result);\r\n }\r\n\r\n /**\r\n * Project a Vector3 onto screen space\r\n * @param vector defines the Vector3 to project\r\n * @param world defines the world matrix to use\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @param viewport defines the screen viewport to use\r\n * @returns the new Vector3\r\n */\r\n public static Project(vector: DeepImmutable<Vector3>, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>, viewport: DeepImmutable<Viewport>): Vector3 {\r\n const result = new Vector3();\r\n Vector3.ProjectToRef(vector, world, transform, viewport, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Project a Vector3 onto screen space to reference\r\n * @param vector defines the Vector3 to project\r\n * @param world defines the world matrix to use\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @param viewport defines the screen viewport to use\r\n * @param result the vector in which the screen space will be stored\r\n * @returns the new Vector3\r\n */\r\n public static ProjectToRef(\r\n vector: DeepImmutable<Vector3>,\r\n world: DeepImmutable<Matrix>,\r\n transform: DeepImmutable<Matrix>,\r\n viewport: DeepImmutable<Viewport>,\r\n result: DeepImmutable<Vector3>\r\n ): Vector3 {\r\n const cw = viewport.width;\r\n const ch = viewport.height;\r\n const cx = viewport.x;\r\n const cy = viewport.y;\r\n\r\n const viewportMatrix = MathTmp.Matrix[1];\r\n\r\n Matrix.FromValuesToRef(cw / 2.0, 0, 0, 0, 0, -ch / 2.0, 0, 0, 0, 0, 0.5, 0, cx + cw / 2.0, ch / 2.0 + cy, 0.5, 1, viewportMatrix);\r\n\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(transform, matrix);\r\n matrix.multiplyToRef(viewportMatrix, matrix);\r\n\r\n Vector3.TransformCoordinatesToRef(vector, matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * @param source\r\n * @param matrix\r\n * @param result\r\n * @hidden\r\n */\r\n public static _UnprojectFromInvertedMatrixToRef(source: DeepImmutable<Vector3>, matrix: DeepImmutable<Matrix>, result: Vector3) {\r\n Vector3.TransformCoordinatesToRef(source, matrix, result);\r\n const m = matrix.m;\r\n const num = source._x * m[3] + source._y * m[7] + source._z * m[11] + m[15];\r\n if (Scalar.WithinEpsilon(num, 1.0)) {\r\n result.scaleInPlace(1.0 / num);\r\n }\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param transform defines the transform (view x projection) matrix to use\r\n * @returns the new Vector3\r\n */\r\n public static UnprojectFromTransform(source: Vector3, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>): Vector3 {\r\n return this.Unproject(source, viewportWidth, viewportHeight, world, transform, Matrix.IdentityReadOnly);\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @returns the new Vector3\r\n */\r\n public static Unproject(\r\n source: DeepImmutable<Vector3>,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>\r\n ): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n Vector3.UnprojectToRef(source, viewportWidth, viewportHeight, world, view, projection, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param source defines the screen space Vector3 to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static UnprojectToRef(\r\n source: DeepImmutable<Vector3>,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n result: Vector3\r\n ): void {\r\n Vector3.UnprojectFloatsToRef(source._x, source._y, source._z, viewportWidth, viewportHeight, world, view, projection, result);\r\n }\r\n\r\n /**\r\n * Unproject from screen space to object space\r\n * @param sourceX defines the screen space x coordinate to use\r\n * @param sourceY defines the screen space y coordinate to use\r\n * @param sourceZ defines the screen space z coordinate to use\r\n * @param viewportWidth defines the current width of the viewport\r\n * @param viewportHeight defines the current height of the viewport\r\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\r\n * @param view defines the view matrix to use\r\n * @param projection defines the projection matrix to use\r\n * @param result defines the Vector3 where to store the result\r\n */\r\n public static UnprojectFloatsToRef(\r\n sourceX: float,\r\n sourceY: float,\r\n sourceZ: float,\r\n viewportWidth: number,\r\n viewportHeight: number,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n result: Vector3\r\n ): void {\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(view, matrix);\r\n matrix.multiplyToRef(projection, matrix);\r\n matrix.invert();\r\n\r\n const screenSource = MathTmp.Vector3[0];\r\n screenSource.x = (sourceX / viewportWidth) * 2 - 1;\r\n screenSource.y = -((sourceY / viewportHeight) * 2 - 1);\r\n if (EngineStore.LastCreatedEngine?.isNDCHalfZRange) {\r\n screenSource.z = sourceZ;\r\n } else {\r\n screenSource.z = 2 * sourceZ - 1.0;\r\n }\r\n\r\n Vector3._UnprojectFromInvertedMatrixToRef(screenSource, matrix, result);\r\n }\r\n\r\n /**\r\n * Gets the minimal coordinate values between two Vector3\r\n * @param left defines the first operand\r\n * @param right defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Minimize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const min = left.clone();\r\n min.minimizeInPlace(right);\r\n return min;\r\n }\r\n\r\n /**\r\n * Gets the maximal coordinate values between two Vector3\r\n * @param left defines the first operand\r\n * @param right defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Maximize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3 {\r\n const max = left.clone();\r\n max.maximizeInPlace(right);\r\n return max;\r\n }\r\n\r\n /**\r\n * Returns the distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the distance\r\n */\r\n public static Distance(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): number {\r\n return Math.sqrt(Vector3.DistanceSquared(value1, value2));\r\n }\r\n\r\n /**\r\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the squared distance\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): number {\r\n const x = value1._x - value2._x;\r\n const y = value1._y - value2._y;\r\n const z = value1._z - value2._z;\r\n\r\n return x * x + y * y + z * z;\r\n }\r\n\r\n /**\r\n * Projects \"vector\" on the triangle determined by its extremities \"p0\", \"p1\" and \"p2\", stores the result in \"ref\"\r\n * and returns the distance to the projected point.\r\n * From http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.4264&rep=rep1&type=pdf\r\n *\r\n * @param vector the vector to get distance from\r\n * @param p0 extremity of the triangle\r\n * @param p1 extremity of the triangle\r\n * @param p2 extremity of the triangle\r\n * @param ref variable to store the result to\r\n * @returns The distance between \"ref\" and \"vector\"\r\n */\r\n public static ProjectOnTriangleToRef(vector: DeepImmutable<Vector3>, p0: DeepImmutable<Vector3>, p1: DeepImmutable<Vector3>, p2: DeepImmutable<Vector3>, ref: Vector3): number {\r\n const p1p0 = MathTmp.Vector3[0];\r\n const p2p0 = MathTmp.Vector3[1];\r\n const p2p1 = MathTmp.Vector3[2];\r\n const normal = MathTmp.Vector3[3];\r\n const vectorp0 = MathTmp.Vector3[4];\r\n\r\n // Triangle vectors\r\n p1.subtractToRef(p0, p1p0);\r\n p2.subtractToRef(p0, p2p0);\r\n p2.subtractToRef(p1, p2p1);\r\n\r\n const p1p0L = p1p0.length();\r\n const p2p0L = p2p0.length();\r\n const p2p1L = p2p1.length();\r\n\r\n if (p1p0L < Epsilon || p2p0L < Epsilon || p2p1L < Epsilon) {\r\n // This is a degenerate triangle. As we assume this is part of a non-degenerate mesh,\r\n // we will find a better intersection later.\r\n // Let's just return one of the extremities\r\n ref.copyFrom(p0);\r\n return Vector3.Distance(vector, p0);\r\n }\r\n\r\n // Compute normal and vector to p0\r\n vector.subtractToRef(p0, vectorp0);\r\n Vector3.CrossToRef(p1p0, p2p0, normal);\r\n const nl = normal.length();\r\n if (nl < Epsilon) {\r\n // Extremities are aligned, we are back on the case of a degenerate triangle\r\n ref.copyFrom(p0);\r\n return Vector3.Distance(vector, p0);\r\n }\r\n normal.normalizeFromLength(nl);\r\n let l = vectorp0.length();\r\n if (l < Epsilon) {\r\n // Vector is p0\r\n ref.copyFrom(p0);\r\n return 0;\r\n }\r\n vectorp0.normalizeFromLength(l);\r\n\r\n // Project to \"proj\" that lies on the triangle plane\r\n const cosA = Vector3.Dot(normal, vectorp0);\r\n const projVector = MathTmp.Vector3[5];\r\n const proj = MathTmp.Vector3[6];\r\n projVector.copyFrom(normal).scaleInPlace(-l * cosA);\r\n proj.copyFrom(vector).addInPlace(projVector);\r\n\r\n // Compute barycentric coordinates (v0, v1 and v2 are axis from barycenter to extremities)\r\n const v0 = MathTmp.Vector3[4];\r\n const v1 = MathTmp.Vector3[5];\r\n const v2 = MathTmp.Vector3[7];\r\n const tmp = MathTmp.Vector3[8];\r\n\r\n v0.copyFrom(p1p0).scaleInPlace(1 / p1p0L);\r\n tmp.copyFrom(p2p0).scaleInPlace(1 / p2p0L);\r\n v0.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n v1.copyFrom(p1p0).scaleInPlace(-1 / p1p0L);\r\n tmp.copyFrom(p2p1).scaleInPlace(1 / p2p1L);\r\n v1.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n v2.copyFrom(p2p1).scaleInPlace(-1 / p2p1L);\r\n tmp.copyFrom(p2p0).scaleInPlace(-1 / p2p0L);\r\n v2.addInPlace(tmp).scaleInPlace(-1);\r\n\r\n // Determines which edge of the triangle is closest to \"proj\"\r\n const projP = MathTmp.Vector3[9];\r\n let dot;\r\n projP.copyFrom(proj).subtractInPlace(p0);\r\n Vector3.CrossToRef(v0, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s0 = dot;\r\n\r\n projP.copyFrom(proj).subtractInPlace(p1);\r\n Vector3.CrossToRef(v1, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s1 = dot;\r\n\r\n projP.copyFrom(proj).subtractInPlace(p2);\r\n Vector3.CrossToRef(v2, projP, tmp);\r\n dot = Vector3.Dot(tmp, normal);\r\n const s2 = dot;\r\n\r\n const edge = MathTmp.Vector3[10];\r\n let e0, e1;\r\n if (s0 > 0 && s1 < 0) {\r\n edge.copyFrom(p1p0);\r\n e0 = p0;\r\n e1 = p1;\r\n } else if (s1 > 0 && s2 < 0) {\r\n edge.copyFrom(p2p1);\r\n e0 = p1;\r\n e1 = p2;\r\n } else {\r\n edge.copyFrom(p2p0).scaleInPlace(-1);\r\n e0 = p2;\r\n e1 = p0;\r\n }\r\n\r\n // Determines if \"proj\" lies inside the triangle\r\n const tmp2 = MathTmp.Vector3[9];\r\n const tmp3 = MathTmp.Vector3[4];\r\n e0.subtractToRef(proj, tmp);\r\n e1.subtractToRef(proj, tmp2);\r\n Vector3.CrossToRef(tmp, tmp2, tmp3);\r\n const isOutside = Vector3.Dot(tmp3, normal) < 0;\r\n\r\n // If inside, we already found the projected point, \"proj\"\r\n if (!isOutside) {\r\n ref.copyFrom(proj);\r\n return Math.abs(l * cosA);\r\n }\r\n\r\n // If outside, we find \"triProj\", the closest point from \"proj\" on the closest edge\r\n const r = MathTmp.Vector3[5];\r\n Vector3.CrossToRef(edge, tmp3, r);\r\n r.normalize();\r\n const e0proj = MathTmp.Vector3[9];\r\n e0proj.copyFrom(e0).subtractInPlace(proj);\r\n const e0projL = e0proj.length();\r\n if (e0projL < Epsilon) {\r\n // Proj is e0\r\n ref.copyFrom(e0);\r\n return Vector3.Distance(vector, e0);\r\n }\r\n e0proj.normalizeFromLength(e0projL);\r\n const cosG = Vector3.Dot(r, e0proj);\r\n const triProj = MathTmp.Vector3[7];\r\n triProj.copyFrom(proj).addInPlace(r.scaleInPlace(e0projL * cosG));\r\n\r\n // Now we clamp \"triProj\" so it lies between e0 and e1\r\n tmp.copyFrom(triProj).subtractInPlace(e0);\r\n l = edge.length();\r\n edge.normalizeFromLength(l);\r\n let t = Vector3.Dot(tmp, edge) / Math.max(l, Epsilon);\r\n t = Scalar.Clamp(t, 0, 1);\r\n triProj.copyFrom(e0).addInPlace(edge.scaleInPlace(t * l));\r\n ref.copyFrom(triProj);\r\n\r\n return Vector3.Distance(vector, triProj);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 located at the center between \"value1\" and \"value2\"\r\n * @param value1 defines the first operand\r\n * @param value2 defines the second operand\r\n * @returns the new Vector3\r\n */\r\n public static Center(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): Vector3 {\r\n return Vector3.CenterToRef(value1, value2, Vector3.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, ref: DeepImmutable<Vector3>): Vector3 {\r\n return ref.copyFromFloats((value1._x + value2._x) / 2, (value1._y + value2._y) / 2, (value1._z + value2._z) / 2);\r\n }\r\n\r\n /**\r\n * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),\r\n * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply\r\n * to something in order to rotate it from its local system to the given target system\r\n * Note: axis1, axis2 and axis3 are normalized during this operation\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @returns a new Vector3\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/target_align\r\n */\r\n public static RotationFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Vector3 {\r\n const rotation = Vector3.Zero();\r\n Vector3.RotationFromAxisToRef(axis1, axis2, axis3, rotation);\r\n return rotation;\r\n }\r\n\r\n /**\r\n * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @param ref defines the Vector3 where to store the result\r\n */\r\n public static RotationFromAxisToRef(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>, ref: Vector3): void {\r\n const quat = MathTmp.Quaternion[0];\r\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\r\n quat.toEulerAnglesToRef(ref);\r\n }\r\n}\r\n\r\n/**\r\n * Vector4 class created for EulerAngle class conversion to Quaternion\r\n */\r\nexport class Vector4 {\r\n /**\r\n * Creates a Vector4 object from the given floats.\r\n * @param x x value of the vector\r\n * @param y y value of the vector\r\n * @param z z value of the vector\r\n * @param w w value of the vector\r\n */\r\n constructor(\r\n /** x value of the vector */\r\n public x: number,\r\n /** y value of the vector */\r\n public y: number,\r\n /** z value of the vector */\r\n public z: number,\r\n /** w value of the vector */\r\n public w: number\r\n ) {}\r\n\r\n /**\r\n * Returns the string with the Vector4 coordinates.\r\n * @returns a string containing all the vector values\r\n */\r\n public toString(): string {\r\n return `{X: ${this.x} Y: ${this.y} Z: ${this.z} W: ${this.w}}`;\r\n }\r\n\r\n /**\r\n * Returns the string \"Vector4\".\r\n * @returns \"Vector4\"\r\n */\r\n public getClassName(): string {\r\n return \"Vector4\";\r\n }\r\n\r\n /**\r\n * Returns the Vector4 hash code.\r\n * @returns a unique hash code\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this.x);\r\n const y = _ExtractAsInt(this.y);\r\n const z = _ExtractAsInt(this.z);\r\n const w = _ExtractAsInt(this.w);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n hash = (hash * 397) ^ w;\r\n return hash;\r\n }\r\n\r\n // Operators\r\n /**\r\n * Returns a new array populated with 4 elements : the Vector4 coordinates.\r\n * @returns the resulting array\r\n */\r\n public asArray(): number[] {\r\n const result = new Array<number>();\r\n\r\n this.toArray(result, 0);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Populates the given array from the given index with the Vector4 coordinates.\r\n * @param array array to populate\r\n * @param index index of the array to start at (default: 0)\r\n * @returns the Vector4.\r\n */\r\n public toArray(array: FloatArray, index?: number): Vector4 {\r\n if (index === undefined) {\r\n index = 0;\r\n }\r\n array[index] = this.x;\r\n array[index + 1] = this.y;\r\n array[index + 2] = this.z;\r\n array[index + 3] = this.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Update the current vector from an array\r\n * @param array defines the destination array\r\n * @param index defines the offset in the destination array\r\n * @returns the current Vector3\r\n */\r\n public fromArray(array: FloatArray, index: number = 0): Vector4 {\r\n Vector4.FromArrayToRef(array, index, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the given vector to the current Vector4.\r\n * @param otherVector the vector to add\r\n * @returns the updated Vector4.\r\n */\r\n public addInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n this.x += otherVector.x;\r\n this.y += otherVector.y;\r\n this.z += otherVector.z;\r\n this.w += otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 as the result of the addition of the current Vector4 and the given one.\r\n * @param otherVector the vector to add\r\n * @returns the resulting vector\r\n */\r\n public add(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x + otherVector.x, this.y + otherVector.y, this.z + otherVector.z, this.w + otherVector.w);\r\n }\r\n\r\n /**\r\n * Updates the given vector \"result\" with the result of the addition of the current Vector4 and the given one.\r\n * @param otherVector the vector to add\r\n * @param result the vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public addToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x + otherVector.x;\r\n result.y = this.y + otherVector.y;\r\n result.z = this.z + otherVector.z;\r\n result.w = this.w + otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtract in place the given vector from the current Vector4.\r\n * @param otherVector the vector to subtract\r\n * @returns the updated Vector4.\r\n */\r\n public subtractInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n this.x -= otherVector.x;\r\n this.y -= otherVector.y;\r\n this.z -= otherVector.z;\r\n this.w -= otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 with the result of the subtraction of the given vector from the current Vector4.\r\n * @param otherVector the vector to add\r\n * @returns the new vector with the result\r\n */\r\n public subtract(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x - otherVector.x, this.y - otherVector.y, this.z - otherVector.z, this.w - otherVector.w);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the subtraction of the given vector from the current Vector4.\r\n * @param otherVector the vector to subtract\r\n * @param result the vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public subtractToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x - otherVector.x;\r\n result.y = this.y - otherVector.y;\r\n result.z = this.z - otherVector.z;\r\n result.w = this.w - otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n */\r\n /**\r\n * Returns a new Vector4 set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n * @param x value to subtract\r\n * @param y value to subtract\r\n * @param z value to subtract\r\n * @param w value to subtract\r\n * @returns new vector containing the result\r\n */\r\n public subtractFromFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n return new Vector4(this.x - x, this.y - y, this.z - z, this.w - w);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" set with the result of the subtraction of the given floats from the current Vector4 coordinates.\r\n * @param x value to subtract\r\n * @param y value to subtract\r\n * @param z value to subtract\r\n * @param w value to subtract\r\n * @param result the vector to store the result in\r\n * @returns the current Vector4.\r\n */\r\n public subtractFromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): Vector4 {\r\n result.x = this.x - x;\r\n result.y = this.y - y;\r\n result.z = this.z - z;\r\n result.w = this.w - w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the current Vector4 negated coordinates.\r\n * @returns a new vector with the negated values\r\n */\r\n public negate(): Vector4 {\r\n return new Vector4(-this.x, -this.y, -this.z, -this.w);\r\n }\r\n\r\n /**\r\n * Negate this vector in place\r\n * @returns this\r\n */\r\n public negateInPlace(): Vector4 {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n this.w *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Negate the current Vector4 and stores the result in the given vector \"result\" coordinates\r\n * @param result defines the Vector3 object where to store the result\r\n * @returns the current Vector4\r\n */\r\n public negateToRef(result: Vector4): Vector4 {\r\n return result.copyFromFloats(this.x * -1, this.y * -1, this.z * -1, this.w * -1);\r\n }\r\n\r\n /**\r\n * Multiplies the current Vector4 coordinates by scale (float).\r\n * @param scale the number to scale with\r\n * @returns the updated Vector4.\r\n */\r\n public scaleInPlace(scale: number): Vector4 {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the current Vector4 coordinates multiplied by scale (float).\r\n * @param scale the number to scale with\r\n * @returns a new vector with the result\r\n */\r\n public scale(scale: number): Vector4 {\r\n return new Vector4(this.x * scale, this.y * scale, this.z * scale, this.w * scale);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the current Vector4 coordinates multiplied by scale (float).\r\n * @param scale the number to scale with\r\n * @param result a vector to store the result in\r\n * @returns the current Vector4.\r\n */\r\n public scaleToRef(scale: number, result: Vector4): Vector4 {\r\n result.x = this.x * scale;\r\n result.y = this.y * scale;\r\n result.z = this.z * scale;\r\n result.w = this.w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current Vector4 values by a factor and add the result to a given Vector4\r\n * @param scale defines the scale factor\r\n * @param result defines the Vector4 object where to store the result\r\n * @returns the unmodified current Vector4\r\n */\r\n public scaleAndAddToRef(scale: number, result: Vector4): Vector4 {\r\n result.x += this.x * scale;\r\n result.y += this.y * scale;\r\n result.z += this.z * scale;\r\n result.w += this.w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Vector4 coordinates are stricly equal to the given ones.\r\n * @param otherVector the vector to compare against\r\n * @returns true if they are equal\r\n */\r\n public equals(otherVector: DeepImmutable<Vector4>): boolean {\r\n return otherVector && this.x === otherVector.x && this.y === otherVector.y && this.z === otherVector.z && this.w === otherVector.w;\r\n }\r\n\r\n /**\r\n * Boolean : True if the current Vector4 coordinates are each beneath the distance \"epsilon\" from the given vector ones.\r\n * @param otherVector vector to compare against\r\n * @param epsilon (Default: very small number)\r\n * @returns true if they are equal\r\n */\r\n public equalsWithEpsilon(otherVector: DeepImmutable<Vector4>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherVector &&\r\n Scalar.WithinEpsilon(this.x, otherVector.x, epsilon) &&\r\n Scalar.WithinEpsilon(this.y, otherVector.y, epsilon) &&\r\n Scalar.WithinEpsilon(this.z, otherVector.z, epsilon) &&\r\n Scalar.WithinEpsilon(this.w, otherVector.w, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Boolean : True if the given floats are strictly equal to the current Vector4 coordinates.\r\n * @param x x value to compare against\r\n * @param y y value to compare against\r\n * @param z z value to compare against\r\n * @param w w value to compare against\r\n * @returns true if equal\r\n */\r\n public equalsToFloats(x: number, y: number, z: number, w: number): boolean {\r\n return this.x === x && this.y === y && this.z === z && this.w === w;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current Vector4 by the given one.\r\n * @param otherVector vector to multiple with\r\n * @returns the updated Vector4.\r\n */\r\n public multiplyInPlace(otherVector: Vector4): Vector4 {\r\n this.x *= otherVector.x;\r\n this.y *= otherVector.y;\r\n this.z *= otherVector.z;\r\n this.w *= otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the multiplication result of the current Vector4 and the given one.\r\n * @param otherVector vector to multiple with\r\n * @returns resulting new vector\r\n */\r\n public multiply(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x * otherVector.x, this.y * otherVector.y, this.z * otherVector.z, this.w * otherVector.w);\r\n }\r\n /**\r\n * Updates the given vector \"result\" with the multiplication result of the current Vector4 and the given one.\r\n * @param otherVector vector to multiple with\r\n * @param result vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public multiplyToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x * otherVector.x;\r\n result.y = this.y * otherVector.y;\r\n result.z = this.z * otherVector.z;\r\n result.w = this.w * otherVector.w;\r\n return this;\r\n }\r\n /**\r\n * Returns a new Vector4 set with the multiplication result of the given floats and the current Vector4 coordinates.\r\n * @param x x value multiply with\r\n * @param y y value multiply with\r\n * @param z z value multiply with\r\n * @param w w value multiply with\r\n * @returns resulting new vector\r\n */\r\n public multiplyByFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n return new Vector4(this.x * x, this.y * y, this.z * z, this.w * w);\r\n }\r\n /**\r\n * Returns a new Vector4 set with the division result of the current Vector4 by the given one.\r\n * @param otherVector vector to devide with\r\n * @returns resulting new vector\r\n */\r\n public divide(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return new Vector4(this.x / otherVector.x, this.y / otherVector.y, this.z / otherVector.z, this.w / otherVector.w);\r\n }\r\n /**\r\n * Updates the given vector \"result\" with the division result of the current Vector4 by the given one.\r\n * @param otherVector vector to devide with\r\n * @param result vector to store the result\r\n * @returns the current Vector4.\r\n */\r\n public divideToRef(otherVector: DeepImmutable<Vector4>, result: Vector4): Vector4 {\r\n result.x = this.x / otherVector.x;\r\n result.y = this.y / otherVector.y;\r\n result.z = this.z / otherVector.z;\r\n result.w = this.w / otherVector.w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Vector3 coordinates by the given ones.\r\n * @param otherVector vector to devide with\r\n * @returns the updated Vector3.\r\n */\r\n public divideInPlace(otherVector: DeepImmutable<Vector4>): Vector4 {\r\n return this.divideToRef(otherVector, this);\r\n }\r\n\r\n /**\r\n * Updates the Vector4 coordinates with the minimum values between its own and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector4\r\n */\r\n public minimizeInPlace(other: DeepImmutable<Vector4>): Vector4 {\r\n if (other.x < this.x) {\r\n this.x = other.x;\r\n }\r\n if (other.y < this.y) {\r\n this.y = other.y;\r\n }\r\n if (other.z < this.z) {\r\n this.z = other.z;\r\n }\r\n if (other.w < this.w) {\r\n this.w = other.w;\r\n }\r\n return this;\r\n }\r\n /**\r\n * Updates the Vector4 coordinates with the maximum values between its own and the given vector ones\r\n * @param other defines the second operand\r\n * @returns the current updated Vector4\r\n */\r\n public maximizeInPlace(other: DeepImmutable<Vector4>): Vector4 {\r\n if (other.x > this.x) {\r\n this.x = other.x;\r\n }\r\n if (other.y > this.y) {\r\n this.y = other.y;\r\n }\r\n if (other.z > this.z) {\r\n this.z = other.z;\r\n }\r\n if (other.w > this.w) {\r\n this.w = other.w;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets a new Vector4 from current Vector4 floored values\r\n * @returns a new Vector4\r\n */\r\n public floor(): Vector4 {\r\n return new Vector4(Math.floor(this.x), Math.floor(this.y), Math.floor(this.z), Math.floor(this.w));\r\n }\r\n\r\n /**\r\n * Gets a new Vector4 from current Vector3 floored values\r\n * @returns a new Vector4\r\n */\r\n public fract(): Vector4 {\r\n return new Vector4(this.x - Math.floor(this.x), this.y - Math.floor(this.y), this.z - Math.floor(this.z), this.w - Math.floor(this.w));\r\n }\r\n\r\n // Properties\r\n /**\r\n * Returns the Vector4 length (float).\r\n * @returns the length\r\n */\r\n public length(): number {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\r\n }\r\n /**\r\n * Returns the Vector4 squared length (float).\r\n * @returns the length squared\r\n */\r\n public lengthSquared(): number {\r\n return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\r\n }\r\n\r\n // Methods\r\n /**\r\n * Normalizes in place the Vector4.\r\n * @returns the updated Vector4.\r\n */\r\n public normalize(): Vector4 {\r\n const len = this.length();\r\n\r\n if (len === 0) {\r\n return this;\r\n }\r\n\r\n return this.scaleInPlace(1.0 / len);\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 from the Vector4 (x, y, z) coordinates.\r\n * @returns this converted to a new vector3\r\n */\r\n public toVector3(): Vector3 {\r\n return new Vector3(this.x, this.y, this.z);\r\n }\r\n /**\r\n * Returns a new Vector4 copied from the current one.\r\n * @returns the new cloned vector\r\n */\r\n public clone(): Vector4 {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n }\r\n /**\r\n * Updates the current Vector4 with the given one coordinates.\r\n * @param source the source vector to copy from\r\n * @returns the updated Vector4.\r\n */\r\n public copyFrom(source: DeepImmutable<Vector4>): Vector4 {\r\n this.x = source.x;\r\n this.y = source.y;\r\n this.z = source.z;\r\n this.w = source.w;\r\n return this;\r\n }\r\n /**\r\n * Updates the current Vector4 coordinates with the given floats.\r\n * @param x float to copy from\r\n * @param y float to copy from\r\n * @param z float to copy from\r\n * @param w float to copy from\r\n * @returns the updated Vector4.\r\n */\r\n public copyFromFloats(x: number, y: number, z: number, w: number): Vector4 {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n return this;\r\n }\r\n /**\r\n * Updates the current Vector4 coordinates with the given floats.\r\n * @param x float to set from\r\n * @param y float to set from\r\n * @param z float to set from\r\n * @param w float to set from\r\n * @returns the updated Vector4.\r\n */\r\n public set(x: number, y: number, z: number, w: number): Vector4 {\r\n return this.copyFromFloats(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Copies the given float to the current Vector3 coordinates\r\n * @param v defines the x, y, z and w coordinates of the operand\r\n * @returns the current updated Vector3\r\n */\r\n public setAll(v: number): Vector4 {\r\n this.x = this.y = this.z = this.w = v;\r\n return this;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Returns a new Vector4 set from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @returns the new vector\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Vector4 {\r\n if (!offset) {\r\n offset = 0;\r\n }\r\n return new Vector4(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the vector to store the result in\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector4): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n result.w = array[offset + 3];\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the starting index of the given Float32Array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the vector to store the result in\r\n */\r\n public static FromFloatArrayToRef(array: DeepImmutable<Float32Array>, offset: number, result: Vector4): void {\r\n Vector4.FromArrayToRef(array, offset, result);\r\n }\r\n /**\r\n * Updates the given vector \"result\" coordinates from the given floats.\r\n * @param x float to set from\r\n * @param y float to set from\r\n * @param z float to set from\r\n * @param w float to set from\r\n * @param result the vector to the floats in\r\n */\r\n public static FromFloatsToRef(x: number, y: number, z: number, w: number, result: Vector4): void {\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n result.w = w;\r\n }\r\n /**\r\n * Returns a new Vector4 set to (0.0, 0.0, 0.0, 0.0)\r\n * @returns the new vector\r\n */\r\n public static Zero(): Vector4 {\r\n return new Vector4(0.0, 0.0, 0.0, 0.0);\r\n }\r\n /**\r\n * Returns a new Vector4 set to (1.0, 1.0, 1.0, 1.0)\r\n * @returns the new vector\r\n */\r\n public static One(): Vector4 {\r\n return new Vector4(1.0, 1.0, 1.0, 1.0);\r\n }\r\n /**\r\n * Returns a new normalized Vector4 from the given one.\r\n * @param vector the vector to normalize\r\n * @returns the vector\r\n */\r\n public static Normalize(vector: DeepImmutable<Vector4>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.NormalizeToRef(vector, result);\r\n return result;\r\n }\r\n /**\r\n * Updates the given vector \"result\" from the normalization of the given one.\r\n * @param vector the vector to normalize\r\n * @param result the vector to store the result in\r\n */\r\n public static NormalizeToRef(vector: DeepImmutable<Vector4>, result: Vector4): void {\r\n result.copyFrom(vector);\r\n result.normalize();\r\n }\r\n\r\n /**\r\n * Returns a vector with the minimum values from the left and right vectors\r\n * @param left left vector to minimize\r\n * @param right right vector to minimize\r\n * @returns a new vector with the minimum of the left and right vector values\r\n */\r\n public static Minimize(left: DeepImmutable<Vector4>, right: DeepImmutable<Vector4>): Vector4 {\r\n const min = left.clone();\r\n min.minimizeInPlace(right);\r\n return min;\r\n }\r\n\r\n /**\r\n * Returns a vector with the maximum values from the left and right vectors\r\n * @param left left vector to maximize\r\n * @param right right vector to maximize\r\n * @returns a new vector with the maximum of the left and right vector values\r\n */\r\n public static Maximize(left: DeepImmutable<Vector4>, right: DeepImmutable<Vector4>): Vector4 {\r\n const max = left.clone();\r\n max.maximizeInPlace(right);\r\n return max;\r\n }\r\n /**\r\n * Returns the distance (float) between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the distance between\r\n * @param value2 value to calulate the distance between\r\n * @return the distance between the two vectors\r\n */\r\n public static Distance(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): number {\r\n return Math.sqrt(Vector4.DistanceSquared(value1, value2));\r\n }\r\n /**\r\n * Returns the squared distance (float) between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the distance between\r\n * @param value2 value to calulate the distance between\r\n * @return the distance between the two vectors squared\r\n */\r\n public static DistanceSquared(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): number {\r\n const x = value1.x - value2.x;\r\n const y = value1.y - value2.y;\r\n const z = value1.z - value2.z;\r\n const w = value1.w - value2.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n }\r\n /**\r\n * Returns a new Vector4 located at the center between the vectors \"value1\" and \"value2\".\r\n * @param value1 value to calulate the center between\r\n * @param value2 value to calulate the center between\r\n * @return the center between the two vectors\r\n */\r\n public static Center(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>): Vector4 {\r\n return Vector4.CenterToRef(value1, value2, Vector4.Zero());\r\n }\r\n\r\n /**\r\n * Gets the center of the vectors \"value1\" and \"value2\" and stores the result in the vector \"ref\"\r\n * @param value1 defines first vector\r\n * @param value2 defines second vector\r\n * @param ref defines third vector\r\n * @returns ref\r\n */\r\n public static CenterToRef(value1: DeepImmutable<Vector4>, value2: DeepImmutable<Vector4>, ref: DeepImmutable<Vector4>): Vector4 {\r\n return ref.copyFromFloats((value1.x + value2.x) / 2, (value1.y + value2.y) / 2, (value1.z + value2.z) / 2, (value1.w + value2.w) / 2);\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the transformation by the given matrix of the given vector.\r\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * The difference with Vector3.TransformCoordinates is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @returns the transformed Vector4\r\n */\r\n public static TransformCoordinates(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.TransformCoordinatesToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\r\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\r\n * The difference with Vector3.TransformCoordinatesToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param vector defines the Vector3 to transform\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector4 where to store the result\r\n */\r\n public static TransformCoordinatesToRef(vector: DeepImmutable<Vector3>, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n Vector4.TransformCoordinatesFromFloatsToRef(vector._x, vector._y, vector._z, transformation, result);\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\r\n * This method computes tranformed coordinates only, not transformed direction vectors\r\n * The difference with Vector3.TransformCoordinatesFromFloatsToRef is that the w component is not used to divide the other coordinates but is returned in the w coordinate instead\r\n * @param x define the x coordinate of the source vector\r\n * @param y define the y coordinate of the source vector\r\n * @param z define the z coordinate of the source vector\r\n * @param transformation defines the transformation matrix\r\n * @param result defines the Vector4 where to store the result\r\n */\r\n public static TransformCoordinatesFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\r\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\r\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\r\n const rw = x * m[3] + y * m[7] + z * m[11] + m[15];\r\n\r\n result.x = rx;\r\n result.y = ry;\r\n result.z = rz;\r\n result.w = rw;\r\n }\r\n\r\n /**\r\n * Returns a new Vector4 set with the result of the normal transformation by the given matrix of the given vector.\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param vector the vector to transform\r\n * @param transformation the transformation matrix to apply\r\n * @returns the new vector\r\n */\r\n public static TransformNormal(vector: DeepImmutable<Vector4>, transformation: DeepImmutable<Matrix>): Vector4 {\r\n const result = Vector4.Zero();\r\n Vector4.TransformNormalToRef(vector, transformation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector.\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param vector the vector to transform\r\n * @param transformation the transformation matrix to apply\r\n * @param result the vector to store the result in\r\n */\r\n public static TransformNormalToRef(vector: DeepImmutable<Vector4>, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n const x = vector.x * m[0] + vector.y * m[4] + vector.z * m[8];\r\n const y = vector.x * m[1] + vector.y * m[5] + vector.z * m[9];\r\n const z = vector.x * m[2] + vector.y * m[6] + vector.z * m[10];\r\n result.x = x;\r\n result.y = y;\r\n result.z = z;\r\n result.w = vector.w;\r\n }\r\n\r\n /**\r\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z, w).\r\n * This methods computes transformed normalized direction vectors only.\r\n * @param x value to transform\r\n * @param y value to transform\r\n * @param z value to transform\r\n * @param w value to transform\r\n * @param transformation the transformation matrix to apply\r\n * @param result the vector to store the results in\r\n */\r\n public static TransformNormalFromFloatsToRef(x: number, y: number, z: number, w: number, transformation: DeepImmutable<Matrix>, result: Vector4): void {\r\n const m = transformation.m;\r\n result.x = x * m[0] + y * m[4] + z * m[8];\r\n result.y = x * m[1] + y * m[5] + z * m[9];\r\n result.z = x * m[2] + y * m[6] + z * m[10];\r\n result.w = w;\r\n }\r\n\r\n /**\r\n * Creates a new Vector4 from a Vector3\r\n * @param source defines the source data\r\n * @param w defines the 4th component (default is 0)\r\n * @returns a new Vector4\r\n */\r\n public static FromVector3(source: Vector3, w: number = 0) {\r\n return new Vector4(source._x, source._y, source._z, w);\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store quaternion data\r\n * @see https://en.wikipedia.org/wiki/Quaternion\r\n * @see https://doc.babylonjs.com/features/position,_rotation,_scaling\r\n */\r\nexport class Quaternion {\r\n /** @hidden */\r\n public _x: number;\r\n\r\n /** @hidden */\r\n public _y: number;\r\n\r\n /** @hidden */\r\n public _z: number;\r\n\r\n /** @hidden */\r\n public _w: number;\r\n\r\n /** @hidden */\r\n public _isDirty = true;\r\n\r\n /** Gets or sets the x coordinate */\r\n public get x() {\r\n return this._x;\r\n }\r\n\r\n public set x(value: number) {\r\n this._x = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the y coordinate */\r\n public get y() {\r\n return this._y;\r\n }\r\n\r\n public set y(value: number) {\r\n this._y = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the z coordinate */\r\n public get z() {\r\n return this._z;\r\n }\r\n\r\n public set z(value: number) {\r\n this._z = value;\r\n this._isDirty = true;\r\n }\r\n\r\n /** Gets or sets the w coordinate */\r\n public get w() {\r\n return this._w;\r\n }\r\n\r\n public set w(value: number) {\r\n this._w = value;\r\n this._isDirty = true;\r\n }\r\n /**\r\n * Creates a new Quaternion from the given floats\r\n * @param x defines the first component (0 by default)\r\n * @param y defines the second component (0 by default)\r\n * @param z defines the third component (0 by default)\r\n * @param w defines the fourth component (1.0 by default)\r\n */\r\n constructor(x: number = 0.0, y: number = 0.0, z: number = 0.0, w: number = 1.0) {\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._w = w;\r\n }\r\n\r\n /**\r\n * Gets a string representation for the current quaternion\r\n * @returns a string with the Quaternion coordinates\r\n */\r\n public toString(): string {\r\n return `{X: ${this._x} Y: ${this._y} Z: ${this._z} W: ${this._w}}`;\r\n }\r\n\r\n /**\r\n * Gets the class name of the quaternion\r\n * @returns the string \"Quaternion\"\r\n */\r\n public getClassName(): string {\r\n return \"Quaternion\";\r\n }\r\n\r\n /**\r\n * Gets a hash code for this quaternion\r\n * @returns the quaternion hash code\r\n */\r\n public getHashCode(): number {\r\n const x = _ExtractAsInt(this._x);\r\n const y = _ExtractAsInt(this._y);\r\n const z = _ExtractAsInt(this._z);\r\n const w = _ExtractAsInt(this._w);\r\n\r\n let hash = x;\r\n hash = (hash * 397) ^ y;\r\n hash = (hash * 397) ^ z;\r\n hash = (hash * 397) ^ w;\r\n return hash;\r\n }\r\n\r\n /**\r\n * Copy the quaternion to an array\r\n * @returns a new array populated with 4 elements from the quaternion coordinates\r\n */\r\n public asArray(): number[] {\r\n return [this._x, this._y, this._z, this._w];\r\n }\r\n /**\r\n * Check if two quaternions are equals\r\n * @param otherQuaternion defines the second operand\r\n * @return true if the current quaternion and the given one coordinates are strictly equals\r\n */\r\n public equals(otherQuaternion: DeepImmutable<Quaternion>): boolean {\r\n return otherQuaternion && this._x === otherQuaternion._x && this._y === otherQuaternion._y && this._z === otherQuaternion._z && this._w === otherQuaternion._w;\r\n }\r\n\r\n /**\r\n * Gets a boolean if two quaternions are equals (using an epsilon value)\r\n * @param otherQuaternion defines the other quaternion\r\n * @param epsilon defines the minimal distance to consider equality\r\n * @returns true if the given quaternion coordinates are close to the current ones by a distance of epsilon.\r\n */\r\n public equalsWithEpsilon(otherQuaternion: DeepImmutable<Quaternion>, epsilon: number = Epsilon): boolean {\r\n return (\r\n otherQuaternion &&\r\n Scalar.WithinEpsilon(this._x, otherQuaternion._x, epsilon) &&\r\n Scalar.WithinEpsilon(this._y, otherQuaternion._y, epsilon) &&\r\n Scalar.WithinEpsilon(this._z, otherQuaternion._z, epsilon) &&\r\n Scalar.WithinEpsilon(this._w, otherQuaternion._w, epsilon)\r\n );\r\n }\r\n\r\n /**\r\n * Clone the current quaternion\r\n * @returns a new quaternion copied from the current one\r\n */\r\n public clone(): Quaternion {\r\n return new Quaternion(this._x, this._y, this._z, this._w);\r\n }\r\n\r\n /**\r\n * Copy a quaternion to the current one\r\n * @param other defines the other quaternion\r\n * @returns the updated current quaternion\r\n */\r\n public copyFrom(other: DeepImmutable<Quaternion>): Quaternion {\r\n this.x = other._x;\r\n this.y = other._y;\r\n this.z = other._z;\r\n this.w = other._w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion with the given float coordinates\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param w defines the w coordinate\r\n * @returns the updated current quaternion\r\n */\r\n public copyFromFloats(x: number, y: number, z: number, w: number): Quaternion {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion from the given float coordinates\r\n * @param x defines the x coordinate\r\n * @param y defines the y coordinate\r\n * @param z defines the z coordinate\r\n * @param w defines the w coordinate\r\n * @returns the updated current quaternion\r\n */\r\n public set(x: number, y: number, z: number, w: number): Quaternion {\r\n return this.copyFromFloats(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Adds two quaternions\r\n * @param other defines the second operand\r\n * @returns a new quaternion as the addition result of the given one and the current quaternion\r\n */\r\n public add(other: DeepImmutable<Quaternion>): Quaternion {\r\n return new Quaternion(this._x + other._x, this._y + other._y, this._z + other._z, this._w + other._w);\r\n }\r\n\r\n /**\r\n * Add a quaternion to the current one\r\n * @param other defines the quaternion to add\r\n * @returns the current quaternion\r\n */\r\n public addInPlace(other: DeepImmutable<Quaternion>): Quaternion {\r\n this._x += other._x;\r\n this._y += other._y;\r\n this._z += other._z;\r\n this._w += other._w;\r\n return this;\r\n }\r\n /**\r\n * Subtract two quaternions\r\n * @param other defines the second operand\r\n * @returns a new quaternion as the subtraction result of the given one from the current one\r\n */\r\n public subtract(other: Quaternion): Quaternion {\r\n return new Quaternion(this._x - other._x, this._y - other._y, this._z - other._z, this._w - other._w);\r\n }\r\n\r\n /**\r\n * Multiplies the current quaternion by a scale factor\r\n * @param value defines the scale factor\r\n * @returns a new quaternion set by multiplying the current quaternion coordinates by the float \"scale\"\r\n */\r\n public scale(value: number): Quaternion {\r\n return new Quaternion(this._x * value, this._y * value, this._z * value, this._w * value);\r\n }\r\n\r\n /**\r\n * Scale the current quaternion values by a factor and stores the result to a given quaternion\r\n * @param scale defines the scale factor\r\n * @param result defines the Quaternion object where to store the result\r\n * @returns the unmodified current quaternion\r\n */\r\n public scaleToRef(scale: number, result: Quaternion): Quaternion {\r\n result.x = this._x * scale;\r\n result.y = this._y * scale;\r\n result.z = this._z * scale;\r\n result.w = this._w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies in place the current quaternion by a scale factor\r\n * @param value defines the scale factor\r\n * @returns the current modified quaternion\r\n */\r\n public scaleInPlace(value: number): Quaternion {\r\n this.x *= value;\r\n this.y *= value;\r\n this.z *= value;\r\n this.w *= value;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current quaternion values by a factor and add the result to a given quaternion\r\n * @param scale defines the scale factor\r\n * @param result defines the Quaternion object where to store the result\r\n * @returns the unmodified current quaternion\r\n */\r\n public scaleAndAddToRef(scale: number, result: Quaternion): Quaternion {\r\n result.x += this._x * scale;\r\n result.y += this._y * scale;\r\n result.z += this._z * scale;\r\n result.w += this._w * scale;\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiplies two quaternions\r\n * @param q1 defines the second operand\r\n * @returns a new quaternion set as the multiplication result of the current one with the given one \"q1\"\r\n */\r\n public multiply(q1: DeepImmutable<Quaternion>): Quaternion {\r\n const result = new Quaternion(0, 0, 0, 1.0);\r\n this.multiplyToRef(q1, result);\r\n return result;\r\n }\r\n /**\r\n * Sets the given \"result\" as the the multiplication result of the current one with the given one \"q1\"\r\n * @param q1 defines the second operand\r\n * @param result defines the target quaternion\r\n * @returns the current quaternion\r\n */\r\n public multiplyToRef(q1: DeepImmutable<Quaternion>, result: Quaternion): Quaternion {\r\n const x = this._x * q1._w + this._y * q1._z - this._z * q1._y + this._w * q1._x;\r\n const y = -this._x * q1._z + this._y * q1._w + this._z * q1._x + this._w * q1._y;\r\n const z = this._x * q1._y - this._y * q1._x + this._z * q1._w + this._w * q1._z;\r\n const w = -this._x * q1._x - this._y * q1._y - this._z * q1._z + this._w * q1._w;\r\n result.copyFromFloats(x, y, z, w);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion with the multiplication of itself with the given one \"q1\"\r\n * @param q1 defines the second operand\r\n * @returns the currentupdated quaternion\r\n */\r\n public multiplyInPlace(q1: DeepImmutable<Quaternion>): Quaternion {\r\n this.multiplyToRef(q1, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates (1-q) the current quaternion and stores the result in the given quaternion\r\n * @param ref defines the target quaternion\r\n * @returns the current quaternion\r\n */\r\n public conjugateToRef(ref: Quaternion): Quaternion {\r\n ref.copyFromFloats(-this._x, -this._y, -this._z, this._w);\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates in place (1-q) the current quaternion\r\n * @returns the current updated quaternion\r\n */\r\n public conjugateInPlace(): Quaternion {\r\n this.x *= -1;\r\n this.y *= -1;\r\n this.z *= -1;\r\n return this;\r\n }\r\n\r\n /**\r\n * Conjugates in place (1-q) the current quaternion\r\n * @returns a new quaternion\r\n */\r\n public conjugate(): Quaternion {\r\n const result = new Quaternion(-this._x, -this._y, -this._z, this._w);\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets length of current quaternion\r\n * @returns the quaternion length (float)\r\n */\r\n public length(): number {\r\n return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\r\n }\r\n\r\n /**\r\n * Normalize in place the current quaternion\r\n * @returns the current updated quaternion\r\n */\r\n public normalize(): Quaternion {\r\n const len = this.length();\r\n\r\n if (len === 0) {\r\n return this;\r\n }\r\n\r\n const inv = 1.0 / len;\r\n this.x *= inv;\r\n this.y *= inv;\r\n this.z *= inv;\r\n this.w *= inv;\r\n return this;\r\n }\r\n\r\n /**\r\n * Returns a new Vector3 set with the Euler angles translated from the current quaternion\r\n * @returns a new Vector3 containing the Euler angles\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions\r\n */\r\n public toEulerAngles(): Vector3 {\r\n const result = Vector3.Zero();\r\n this.toEulerAnglesToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given vector3 \"result\" with the Euler angles translated from the current quaternion\r\n * @param result defines the vector which will be filled with the Euler angles\r\n * @returns the current unchanged quaternion\r\n * @see https://doc.babylonjs.com/divingDeeper/mesh/transforms/center_origin/rotation_conventions\r\n */\r\n public toEulerAnglesToRef(result: Vector3): Quaternion {\r\n const qz = this._z;\r\n const qx = this._x;\r\n const qy = this._y;\r\n const qw = this._w;\r\n\r\n const zAxisY = qy * qz - qx * qw;\r\n const limit = 0.4999999;\r\n\r\n if (zAxisY < -limit) {\r\n result.y = 2 * Math.atan2(qy, qw);\r\n result.x = Math.PI / 2;\r\n result.z = 0;\r\n } else if (zAxisY > limit) {\r\n result.y = 2 * Math.atan2(qy, qw);\r\n result.x = -Math.PI / 2;\r\n result.z = 0;\r\n } else {\r\n const sqw = qw * qw;\r\n const sqz = qz * qz;\r\n const sqx = qx * qx;\r\n const sqy = qy * qy;\r\n result.z = Math.atan2(2.0 * (qx * qy + qz * qw), -sqz - sqx + sqy + sqw);\r\n result.x = Math.asin(-2.0 * zAxisY);\r\n result.y = Math.atan2(2.0 * (qz * qx + qy * qw), sqz - sqx - sqy + sqw);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the given rotation matrix with the current quaternion values\r\n * @param result defines the target matrix\r\n * @returns the current unchanged quaternion\r\n */\r\n public toRotationMatrix(result: Matrix): Quaternion {\r\n Matrix.FromQuaternionToRef(this, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the current quaternion from the given rotation matrix values\r\n * @param matrix defines the source matrix\r\n * @returns the current updated quaternion\r\n */\r\n public fromRotationMatrix(matrix: DeepImmutable<Matrix>): Quaternion {\r\n Quaternion.FromRotationMatrixToRef(matrix, this);\r\n return this;\r\n }\r\n\r\n // Statics\r\n\r\n /**\r\n * Creates a new quaternion from a rotation matrix\r\n * @param matrix defines the source matrix\r\n * @returns a new quaternion created from the given rotation matrix values\r\n */\r\n public static FromRotationMatrix(matrix: DeepImmutable<Matrix>): Quaternion {\r\n const result = new Quaternion();\r\n Quaternion.FromRotationMatrixToRef(matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Updates the given quaternion with the given rotation matrix values\r\n * @param matrix defines the source matrix\r\n * @param result defines the target quaternion\r\n */\r\n public static FromRotationMatrixToRef(matrix: DeepImmutable<Matrix>, result: Quaternion): void {\r\n const data = matrix.m;\r\n const m11 = data[0],\r\n m12 = data[4],\r\n m13 = data[8];\r\n const m21 = data[1],\r\n m22 = data[5],\r\n m23 = data[9];\r\n const m31 = data[2],\r\n m32 = data[6],\r\n m33 = data[10];\r\n const trace = m11 + m22 + m33;\r\n let s;\r\n\r\n if (trace > 0) {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n result.w = 0.25 / s;\r\n result.x = (m32 - m23) * s;\r\n result.y = (m13 - m31) * s;\r\n result.z = (m21 - m12) * s;\r\n } else if (m11 > m22 && m11 > m33) {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n result.w = (m32 - m23) / s;\r\n result.x = 0.25 * s;\r\n result.y = (m12 + m21) / s;\r\n result.z = (m13 + m31) / s;\r\n } else if (m22 > m33) {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n result.w = (m13 - m31) / s;\r\n result.x = (m12 + m21) / s;\r\n result.y = 0.25 * s;\r\n result.z = (m23 + m32) / s;\r\n } else {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n result.w = (m21 - m12) / s;\r\n result.x = (m13 + m31) / s;\r\n result.y = (m23 + m32) / s;\r\n result.z = 0.25 * s;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the dot product (float) between the quaternions \"left\" and \"right\"\r\n * @param left defines the left operand\r\n * @param right defines the right operand\r\n * @returns the dot product\r\n */\r\n public static Dot(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>): number {\r\n return left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\r\n }\r\n\r\n /**\r\n * Checks if the two quaternions are close to each other\r\n * @param quat0 defines the first quaternion to check\r\n * @param quat1 defines the second quaternion to check\r\n * @returns true if the two quaternions are close to each other\r\n */\r\n public static AreClose(quat0: DeepImmutable<Quaternion>, quat1: DeepImmutable<Quaternion>): boolean {\r\n const dot = Quaternion.Dot(quat0, quat1);\r\n\r\n return dot >= 0;\r\n }\r\n\r\n /**\r\n * Smooth interpolation between two quaternions using Slerp\r\n *\r\n * @param source source quaternion\r\n * @param goal goal quaternion\r\n * @param deltaTime current interpolation frame\r\n * @param lerpTime total interpolation time\r\n * @param result the smoothed quaternion\r\n */\r\n public static SmoothToRef(source: Quaternion, goal: Quaternion, deltaTime: number, lerpTime: number, result: Quaternion) {\r\n let slerp = lerpTime === 0 ? 1 : deltaTime / lerpTime;\r\n slerp = Scalar.Clamp(slerp, 0, 1);\r\n\r\n Quaternion.SlerpToRef(source, goal, slerp, result);\r\n }\r\n\r\n /**\r\n * Creates an empty quaternion\r\n * @returns a new quaternion set to (0.0, 0.0, 0.0)\r\n */\r\n public static Zero(): Quaternion {\r\n return new Quaternion(0.0, 0.0, 0.0, 0.0);\r\n }\r\n\r\n /**\r\n * Inverse a given quaternion\r\n * @param q defines the source quaternion\r\n * @returns a new quaternion as the inverted current quaternion\r\n */\r\n public static Inverse(q: DeepImmutable<Quaternion>): Quaternion {\r\n return new Quaternion(-q._x, -q._y, -q._z, q._w);\r\n }\r\n\r\n /**\r\n * Inverse a given quaternion\r\n * @param q defines the source quaternion\r\n * @param result the quaternion the result will be stored in\r\n * @returns the result quaternion\r\n */\r\n public static InverseToRef(q: Quaternion, result: Quaternion): Quaternion {\r\n result.set(-q._x, -q._y, -q._z, q._w);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an identity quaternion\r\n * @returns the identity quaternion\r\n */\r\n public static Identity(): Quaternion {\r\n return new Quaternion(0.0, 0.0, 0.0, 1.0);\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the given quaternion is identity\r\n * @param quaternion defines the quaternion to check\r\n * @returns true if the quaternion is identity\r\n */\r\n public static IsIdentity(quaternion: DeepImmutable<Quaternion>): boolean {\r\n return quaternion && quaternion._x === 0 && quaternion._y === 0 && quaternion._z === 0 && quaternion._w === 1;\r\n }\r\n\r\n /**\r\n * Creates a quaternion from a rotation around an axis\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle to use\r\n * @returns a new quaternion created from the given axis (Vector3) and angle in radians (float)\r\n */\r\n public static RotationAxis(axis: DeepImmutable<Vector3>, angle: number): Quaternion {\r\n return Quaternion.RotationAxisToRef(axis, angle, new Quaternion());\r\n }\r\n\r\n /**\r\n * Creates a rotation around an axis and stores it into the given quaternion\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle to use\r\n * @param result defines the target quaternion\r\n * @returns the target quaternion\r\n */\r\n public static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Quaternion): Quaternion {\r\n const sin = Math.sin(angle / 2);\r\n axis.normalize();\r\n result.w = Math.cos(angle / 2);\r\n result.x = axis._x * sin;\r\n result.y = axis._y * sin;\r\n result.z = axis._z * sin;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from data stored into an array\r\n * @param array defines the data source\r\n * @param offset defines the offset in the source array where the data starts\r\n * @returns a new quaternion\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Quaternion {\r\n if (!offset) {\r\n offset = 0;\r\n }\r\n return new Quaternion(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\r\n }\r\n\r\n /**\r\n * Updates the given quaternion \"result\" from the starting index of the given array.\r\n * @param array the array to pull values from\r\n * @param offset the offset into the array to start at\r\n * @param result the quaternion to store the result in\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Quaternion): void {\r\n result.x = array[offset];\r\n result.y = array[offset + 1];\r\n result.z = array[offset + 2];\r\n result.w = array[offset + 3];\r\n }\r\n\r\n /**\r\n * Create a quaternion from Euler rotation angles\r\n * @param x Pitch\r\n * @param y Yaw\r\n * @param z Roll\r\n * @returns the new Quaternion\r\n */\r\n public static FromEulerAngles(x: number, y: number, z: number): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(y, x, z, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Updates a quaternion from Euler rotation angles\r\n * @param x Pitch\r\n * @param y Yaw\r\n * @param z Roll\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromEulerAnglesToRef(x: number, y: number, z: number, result: Quaternion): Quaternion {\r\n Quaternion.RotationYawPitchRollToRef(y, x, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a quaternion from Euler rotation vector\r\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\r\n * @returns the new Quaternion\r\n */\r\n public static FromEulerVector(vec: DeepImmutable<Vector3>): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Updates a quaternion from Euler rotation vector\r\n * @param vec the Euler vector (x Pitch, y Yaw, z Roll)\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromEulerVectorToRef(vec: DeepImmutable<Vector3>, result: Quaternion): Quaternion {\r\n Quaternion.RotationYawPitchRollToRef(vec._y, vec._x, vec._z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Updates a quaternion so that it rotates vector vecFrom to vector vecTo\r\n * @param vecFrom defines the direction vector from which to rotate\r\n * @param vecTo defines the direction vector to which to rotate\r\n * @param result the quaternion to store the result\r\n * @returns the updated quaternion\r\n */\r\n public static FromUnitVectorsToRef(vecFrom: DeepImmutable<Vector3>, vecTo: DeepImmutable<Vector3>, result: Quaternion): Quaternion {\r\n const r = Vector3.Dot(vecFrom, vecTo) + 1;\r\n\r\n if (r < Epsilon) {\r\n if (Math.abs(vecFrom.x) > Math.abs(vecFrom.z)) {\r\n result.set(-vecFrom.y, vecFrom.x, 0, 0);\r\n } else {\r\n result.set(0, -vecFrom.z, vecFrom.y, 0);\r\n }\r\n } else {\r\n Vector3.CrossToRef(vecFrom, vecTo, TmpVectors.Vector3[0]);\r\n result.set(TmpVectors.Vector3[0].x, TmpVectors.Vector3[0].y, TmpVectors.Vector3[0].z, r);\r\n }\r\n\r\n return result.normalize();\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles (y, x, z)\r\n * @param yaw defines the rotation around Y axis\r\n * @param pitch defines the rotation around X axis\r\n * @param roll defines the rotation around Z axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Quaternion {\r\n const q = new Quaternion();\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, q);\r\n return q;\r\n }\r\n\r\n /**\r\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\r\n * @param yaw defines the rotation around Y axis\r\n * @param pitch defines the rotation around X axis\r\n * @param roll defines the rotation around Z axis\r\n * @param result defines the target quaternion\r\n */\r\n public static RotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: Quaternion): void {\r\n // Produces a quaternion from Euler angles in the z-y-x orientation (Tait-Bryan angles)\r\n const halfRoll = roll * 0.5;\r\n const halfPitch = pitch * 0.5;\r\n const halfYaw = yaw * 0.5;\r\n\r\n const sinRoll = Math.sin(halfRoll);\r\n const cosRoll = Math.cos(halfRoll);\r\n const sinPitch = Math.sin(halfPitch);\r\n const cosPitch = Math.cos(halfPitch);\r\n const sinYaw = Math.sin(halfYaw);\r\n const cosYaw = Math.cos(halfYaw);\r\n\r\n result.x = cosYaw * sinPitch * cosRoll + sinYaw * cosPitch * sinRoll;\r\n result.y = sinYaw * cosPitch * cosRoll - cosYaw * sinPitch * sinRoll;\r\n result.z = cosYaw * cosPitch * sinRoll - sinYaw * sinPitch * cosRoll;\r\n result.w = cosYaw * cosPitch * cosRoll + sinYaw * sinPitch * sinRoll;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation\r\n * @param alpha defines the rotation around first axis\r\n * @param beta defines the rotation around second axis\r\n * @param gamma defines the rotation around third axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationAlphaBetaGamma(alpha: number, beta: number, gamma: number): Quaternion {\r\n const result = new Quaternion();\r\n Quaternion.RotationAlphaBetaGammaToRef(alpha, beta, gamma, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new quaternion from the given Euler float angles expressed in z-x-z orientation and stores it in the target quaternion\r\n * @param alpha defines the rotation around first axis\r\n * @param beta defines the rotation around second axis\r\n * @param gamma defines the rotation around third axis\r\n * @param result defines the target quaternion\r\n */\r\n public static RotationAlphaBetaGammaToRef(alpha: number, beta: number, gamma: number, result: Quaternion): void {\r\n // Produces a quaternion from Euler angles in the z-x-z orientation\r\n const halfGammaPlusAlpha = (gamma + alpha) * 0.5;\r\n const halfGammaMinusAlpha = (gamma - alpha) * 0.5;\r\n const halfBeta = beta * 0.5;\r\n\r\n result.x = Math.cos(halfGammaMinusAlpha) * Math.sin(halfBeta);\r\n result.y = Math.sin(halfGammaMinusAlpha) * Math.sin(halfBeta);\r\n result.z = Math.sin(halfGammaPlusAlpha) * Math.cos(halfBeta);\r\n result.w = Math.cos(halfGammaPlusAlpha) * Math.cos(halfBeta);\r\n }\r\n\r\n /**\r\n * Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @returns the new quaternion\r\n */\r\n public static RotationQuaternionFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion(0.0, 0.0, 0.0, 0.0);\r\n Quaternion.RotationQuaternionFromAxisToRef(axis1, axis2, axis3, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion\r\n * @param axis1 defines the first axis\r\n * @param axis2 defines the second axis\r\n * @param axis3 defines the third axis\r\n * @param ref defines the target quaternion\r\n */\r\n public static RotationQuaternionFromAxisToRef(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.FromXYZAxesToRef(axis1.normalize(), axis2.normalize(), axis3.normalize(), rotMat);\r\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns A new quaternion oriented toward the specified forward and up.\r\n */\r\n public static FromLookDirectionLH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion();\r\n Quaternion.FromLookDirectionLHToRef(forward, up, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param ref defines the target quaternion.\r\n */\r\n public static FromLookDirectionLHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.LookDirectionLHToRef(forward, up, rotMat);\r\n Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction, the up direction being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns A new quaternion oriented toward the specified forward and up.\r\n */\r\n public static FromLookDirectionRH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Quaternion {\r\n const quat = new Quaternion();\r\n Quaternion.FromLookDirectionRHToRef(forward, up, quat);\r\n return quat;\r\n }\r\n\r\n /**\r\n * Creates a new rotation value to orient an object to look towards the given forward direction with the up direction being oriented like \"up\", and stores it in the target quaternion.\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param ref defines the target quaternion.\r\n */\r\n public static FromLookDirectionRHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, ref: Quaternion): void {\r\n const rotMat = MathTmp.Matrix[0];\r\n Matrix.LookDirectionRHToRef(forward, up, rotMat);\r\n return Quaternion.FromRotationMatrixToRef(rotMat, ref);\r\n }\r\n\r\n /**\r\n * Interpolates between two quaternions\r\n * @param left defines first quaternion\r\n * @param right defines second quaternion\r\n * @param amount defines the gradient to use\r\n * @returns the new interpolated quaternion\r\n */\r\n public static Slerp(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number): Quaternion {\r\n const result = Quaternion.Identity();\r\n\r\n Quaternion.SlerpToRef(left, right, amount, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Interpolates between two quaternions and stores it into a target quaternion\r\n * @param left defines first quaternion\r\n * @param right defines second quaternion\r\n * @param amount defines the gradient to use\r\n * @param result defines the target quaternion\r\n */\r\n public static SlerpToRef(left: DeepImmutable<Quaternion>, right: DeepImmutable<Quaternion>, amount: number, result: Quaternion): void {\r\n let num2;\r\n let num3;\r\n let num4 = left._x * right._x + left._y * right._y + left._z * right._z + left._w * right._w;\r\n let flag = false;\r\n\r\n if (num4 < 0) {\r\n flag = true;\r\n num4 = -num4;\r\n }\r\n\r\n if (num4 > 0.999999) {\r\n num3 = 1 - amount;\r\n num2 = flag ? -amount : amount;\r\n } else {\r\n const num5 = Math.acos(num4);\r\n const num6 = 1.0 / Math.sin(num5);\r\n num3 = Math.sin((1.0 - amount) * num5) * num6;\r\n num2 = flag ? -Math.sin(amount * num5) * num6 : Math.sin(amount * num5) * num6;\r\n }\r\n\r\n result.x = num3 * left._x + num2 * right._x;\r\n result.y = num3 * left._y + num2 * right._y;\r\n result.z = num3 * left._z + num2 * right._z;\r\n result.w = num3 * left._w + num2 * right._w;\r\n }\r\n\r\n /**\r\n * Interpolate between two quaternions using Hermite interpolation\r\n * @param value1 defines first quaternion\r\n * @param tangent1 defines the incoming tangent\r\n * @param value2 defines second quaternion\r\n * @param tangent2 defines the outgoing tangent\r\n * @param amount defines the target quaternion\r\n * @returns the new interpolated quaternion\r\n */\r\n public static Hermite(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n amount: number\r\n ): Quaternion {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n const x = value1._x * part1 + value2._x * part2 + tangent1._x * part3 + tangent2._x * part4;\r\n const y = value1._y * part1 + value2._y * part2 + tangent1._y * part3 + tangent2._y * part4;\r\n const z = value1._z * part1 + value2._z * part2 + tangent1._z * part3 + tangent2._z * part4;\r\n const w = value1._w * part1 + value2._w * part2 + tangent1._w * part3 + tangent2._w * part4;\r\n return new Quaternion(x, y, z, w);\r\n }\r\n\r\n /**\r\n * Returns a new Quaternion which is the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\n public static Hermite1stDerivative(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n time: number\r\n ): Quaternion {\r\n const result = Quaternion.Zero();\r\n\r\n this.Hermite1stDerivativeToRef(value1, tangent1, value2, tangent2, time, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a Quaternion with the 1st derivative of the Hermite spline defined by the quaternions \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @param result define where to store the derivative\r\n */\r\n public static Hermite1stDerivativeToRef(\r\n value1: DeepImmutable<Quaternion>,\r\n tangent1: DeepImmutable<Quaternion>,\r\n value2: DeepImmutable<Quaternion>,\r\n tangent2: DeepImmutable<Quaternion>,\r\n time: number,\r\n result: Quaternion\r\n ) {\r\n const t2 = time * time;\r\n\r\n result.x = (t2 - time) * 6 * value1.x + (3 * t2 - 4 * time + 1) * tangent1.x + (-t2 + time) * 6 * value2.x + (3 * t2 - 2 * time) * tangent2.x;\r\n result.y = (t2 - time) * 6 * value1.y + (3 * t2 - 4 * time + 1) * tangent1.y + (-t2 + time) * 6 * value2.y + (3 * t2 - 2 * time) * tangent2.y;\r\n result.z = (t2 - time) * 6 * value1.z + (3 * t2 - 4 * time + 1) * tangent1.z + (-t2 + time) * 6 * value2.z + (3 * t2 - 2 * time) * tangent2.z;\r\n result.w = (t2 - time) * 6 * value1.w + (3 * t2 - 4 * time + 1) * tangent1.w + (-t2 + time) * 6 * value2.w + (3 * t2 - 2 * time) * tangent2.w;\r\n }\r\n}\r\n\r\n/**\r\n * Class used to store matrix data (4x4)\r\n */\r\nexport class Matrix {\r\n /**\r\n * Gets the precision of matrix computations\r\n */\r\n public static get Use64Bits(): boolean {\r\n return PerformanceConfigurator.MatrixUse64Bits;\r\n }\r\n\r\n private static _UpdateFlagSeed = 0;\r\n private static _IdentityReadOnly = Matrix.Identity() as DeepImmutable<Matrix>;\r\n\r\n private _isIdentity = false;\r\n private _isIdentityDirty = true;\r\n private _isIdentity3x2 = true;\r\n private _isIdentity3x2Dirty = true;\r\n /**\r\n * Gets the update flag of the matrix which is an unique number for the matrix.\r\n * It will be incremented every time the matrix data change.\r\n * You can use it to speed the comparison between two versions of the same matrix.\r\n */\r\n public updateFlag: number = -1;\r\n\r\n private readonly _m: Float32Array | Array<number>;\r\n\r\n /**\r\n * Gets the internal data of the matrix\r\n */\r\n public get m(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n\r\n /**\r\n * Update the updateFlag to indicate that the matrix has been updated\r\n */\r\n public markAsUpdated() {\r\n this.updateFlag = Matrix._UpdateFlagSeed++;\r\n this._isIdentity = false;\r\n this._isIdentity3x2 = false;\r\n this._isIdentityDirty = true;\r\n this._isIdentity3x2Dirty = true;\r\n }\r\n\r\n private _updateIdentityStatus(isIdentity: boolean, isIdentityDirty: boolean = false, isIdentity3x2: boolean = false, isIdentity3x2Dirty: boolean = true) {\r\n this._isIdentity = isIdentity;\r\n this._isIdentity3x2 = isIdentity || isIdentity3x2;\r\n this._isIdentityDirty = this._isIdentity ? false : isIdentityDirty;\r\n this._isIdentity3x2Dirty = this._isIdentity3x2 ? false : isIdentity3x2Dirty;\r\n }\r\n\r\n /**\r\n * Creates an empty matrix (filled with zeros)\r\n */\r\n public constructor() {\r\n if (PerformanceConfigurator.MatrixTrackPrecisionChange) {\r\n PerformanceConfigurator.MatrixTrackedMatrices!.push(this);\r\n }\r\n\r\n this._m = new PerformanceConfigurator.MatrixCurrentType(16);\r\n\r\n this.markAsUpdated();\r\n }\r\n\r\n // Properties\r\n\r\n /**\r\n * Check if the current matrix is identity\r\n * @returns true is the matrix is the identity matrix\r\n */\r\n public isIdentity(): boolean {\r\n if (this._isIdentityDirty) {\r\n this._isIdentityDirty = false;\r\n const m = this._m;\r\n this._isIdentity =\r\n m[0] === 1.0 &&\r\n m[1] === 0.0 &&\r\n m[2] === 0.0 &&\r\n m[3] === 0.0 &&\r\n m[4] === 0.0 &&\r\n m[5] === 1.0 &&\r\n m[6] === 0.0 &&\r\n m[7] === 0.0 &&\r\n m[8] === 0.0 &&\r\n m[9] === 0.0 &&\r\n m[10] === 1.0 &&\r\n m[11] === 0.0 &&\r\n m[12] === 0.0 &&\r\n m[13] === 0.0 &&\r\n m[14] === 0.0 &&\r\n m[15] === 1.0;\r\n }\r\n\r\n return this._isIdentity;\r\n }\r\n\r\n /**\r\n * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)\r\n * @returns true is the matrix is the identity matrix\r\n */\r\n public isIdentityAs3x2(): boolean {\r\n if (this._isIdentity3x2Dirty) {\r\n this._isIdentity3x2Dirty = false;\r\n if (this._m[0] !== 1.0 || this._m[5] !== 1.0 || this._m[15] !== 1.0) {\r\n this._isIdentity3x2 = false;\r\n } else if (\r\n this._m[1] !== 0.0 ||\r\n this._m[2] !== 0.0 ||\r\n this._m[3] !== 0.0 ||\r\n this._m[4] !== 0.0 ||\r\n this._m[6] !== 0.0 ||\r\n this._m[7] !== 0.0 ||\r\n this._m[8] !== 0.0 ||\r\n this._m[9] !== 0.0 ||\r\n this._m[10] !== 0.0 ||\r\n this._m[11] !== 0.0 ||\r\n this._m[12] !== 0.0 ||\r\n this._m[13] !== 0.0 ||\r\n this._m[14] !== 0.0\r\n ) {\r\n this._isIdentity3x2 = false;\r\n } else {\r\n this._isIdentity3x2 = true;\r\n }\r\n }\r\n\r\n return this._isIdentity3x2;\r\n }\r\n\r\n /**\r\n * Gets the determinant of the matrix\r\n * @returns the matrix determinant\r\n */\r\n public determinant(): number {\r\n if (this._isIdentity === true) {\r\n return 1;\r\n }\r\n\r\n const m = this._m;\r\n const m00 = m[0],\r\n m01 = m[1],\r\n m02 = m[2],\r\n m03 = m[3];\r\n const m10 = m[4],\r\n m11 = m[5],\r\n m12 = m[6],\r\n m13 = m[7];\r\n const m20 = m[8],\r\n m21 = m[9],\r\n m22 = m[10],\r\n m23 = m[11];\r\n const m30 = m[12],\r\n m31 = m[13],\r\n m32 = m[14],\r\n m33 = m[15];\r\n // https://en.wikipedia.org/wiki/Laplace_expansion\r\n // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column,\r\n // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant\r\n // Cofactor(i, j) = sign(i,j) * det(Minor(i, j))\r\n // where\r\n // - sign(i,j) = (i+j) % 2 === 0 ? 1 : -1\r\n // - Minor(i, j) is the 3x3 matrix we get by removing row i and column j from current Matrix\r\n //\r\n // Here we do that for the 1st row.\r\n\r\n const det_22_33 = m22 * m33 - m32 * m23;\r\n const det_21_33 = m21 * m33 - m31 * m23;\r\n const det_21_32 = m21 * m32 - m31 * m22;\r\n const det_20_33 = m20 * m33 - m30 * m23;\r\n const det_20_32 = m20 * m32 - m22 * m30;\r\n const det_20_31 = m20 * m31 - m30 * m21;\r\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\r\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\r\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\r\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\r\n return m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\r\n }\r\n\r\n // Methods\r\n\r\n /**\r\n * Returns the matrix as a Float32Array or Array<number>\r\n * @returns the matrix underlying array\r\n */\r\n public toArray(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n /**\r\n * Returns the matrix as a Float32Array or Array<number>\r\n * @returns the matrix underlying array.\r\n */\r\n public asArray(): DeepImmutable<Float32Array | Array<number>> {\r\n return this._m;\r\n }\r\n\r\n /**\r\n * Inverts the current matrix in place\r\n * @returns the current inverted matrix\r\n */\r\n public invert(): Matrix {\r\n this.invertToRef(this);\r\n return this;\r\n }\r\n /**\r\n * Sets all the matrix elements to zero\r\n * @returns the current matrix\r\n */\r\n public reset(): Matrix {\r\n Matrix.FromValuesToRef(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, this);\r\n this._updateIdentityStatus(false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the current matrix with a second one\r\n * @param other defines the matrix to add\r\n * @returns a new matrix as the addition of the current matrix and the given one\r\n */\r\n public add(other: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n this.addToRef(other, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given matrix \"result\" to the addition of the current matrix and the given one\r\n * @param other defines the matrix to add\r\n * @param result defines the target matrix\r\n * @returns the current matrix\r\n */\r\n public addToRef(other: DeepImmutable<Matrix>, result: Matrix): Matrix {\r\n const m = this._m;\r\n const resultM = result._m;\r\n const otherM = other.m;\r\n for (let index = 0; index < 16; index++) {\r\n resultM[index] = m[index] + otherM[index];\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds in place the given matrix to the current matrix\r\n * @param other defines the second operand\r\n * @returns the current updated matrix\r\n */\r\n public addToSelf(other: DeepImmutable<Matrix>): Matrix {\r\n const m = this._m;\r\n const otherM = other.m;\r\n for (let index = 0; index < 16; index++) {\r\n m[index] += otherM[index];\r\n }\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the given matrix to the current inverted Matrix\r\n * @param other defines the target matrix\r\n * @returns the unmodified current matrix\r\n */\r\n public invertToRef(other: Matrix): Matrix {\r\n if (this._isIdentity === true) {\r\n Matrix.IdentityToRef(other);\r\n return this;\r\n }\r\n\r\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\r\n const m = this._m;\r\n const m00 = m[0],\r\n m01 = m[1],\r\n m02 = m[2],\r\n m03 = m[3];\r\n const m10 = m[4],\r\n m11 = m[5],\r\n m12 = m[6],\r\n m13 = m[7];\r\n const m20 = m[8],\r\n m21 = m[9],\r\n m22 = m[10],\r\n m23 = m[11];\r\n const m30 = m[12],\r\n m31 = m[13],\r\n m32 = m[14],\r\n m33 = m[15];\r\n\r\n const det_22_33 = m22 * m33 - m32 * m23;\r\n const det_21_33 = m21 * m33 - m31 * m23;\r\n const det_21_32 = m21 * m32 - m31 * m22;\r\n const det_20_33 = m20 * m33 - m30 * m23;\r\n const det_20_32 = m20 * m32 - m22 * m30;\r\n const det_20_31 = m20 * m31 - m30 * m21;\r\n\r\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\r\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\r\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\r\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\r\n\r\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\r\n\r\n if (det === 0) {\r\n // not invertible\r\n other.copyFrom(this);\r\n return this;\r\n }\r\n\r\n const detInv = 1 / det;\r\n const det_12_33 = m12 * m33 - m32 * m13;\r\n const det_11_33 = m11 * m33 - m31 * m13;\r\n const det_11_32 = m11 * m32 - m31 * m12;\r\n const det_10_33 = m10 * m33 - m30 * m13;\r\n const det_10_32 = m10 * m32 - m30 * m12;\r\n const det_10_31 = m10 * m31 - m30 * m11;\r\n const det_12_23 = m12 * m23 - m22 * m13;\r\n const det_11_23 = m11 * m23 - m21 * m13;\r\n const det_11_22 = m11 * m22 - m21 * m12;\r\n const det_10_23 = m10 * m23 - m20 * m13;\r\n const det_10_22 = m10 * m22 - m20 * m12;\r\n const det_10_21 = m10 * m21 - m20 * m11;\r\n\r\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\r\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\r\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\r\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\r\n\r\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\r\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\r\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\r\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\r\n\r\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\r\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\r\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\r\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\r\n\r\n Matrix.FromValuesToRef(\r\n cofact_00 * detInv,\r\n cofact_10 * detInv,\r\n cofact_20 * detInv,\r\n cofact_30 * detInv,\r\n cofact_01 * detInv,\r\n cofact_11 * detInv,\r\n cofact_21 * detInv,\r\n cofact_31 * detInv,\r\n cofact_02 * detInv,\r\n cofact_12 * detInv,\r\n cofact_22 * detInv,\r\n cofact_32 * detInv,\r\n cofact_03 * detInv,\r\n cofact_13 * detInv,\r\n cofact_23 * detInv,\r\n cofact_33 * detInv,\r\n other\r\n );\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * add a value at the specified position in the current Matrix\r\n * @param index the index of the value within the matrix. between 0 and 15.\r\n * @param value the value to be added\r\n * @returns the current updated matrix\r\n */\r\n public addAtIndex(index: number, value: number): Matrix {\r\n this._m[index] += value;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * mutiply the specified position in the current Matrix by a value\r\n * @param index the index of the value within the matrix. between 0 and 15.\r\n * @param value the value to be added\r\n * @returns the current updated matrix\r\n */\r\n public multiplyAtIndex(index: number, value: number): Matrix {\r\n this._m[index] *= value;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Inserts the translation vector (using 3 floats) in the current matrix\r\n * @param x defines the 1st component of the translation\r\n * @param y defines the 2nd component of the translation\r\n * @param z defines the 3rd component of the translation\r\n * @returns the current updated matrix\r\n */\r\n public setTranslationFromFloats(x: number, y: number, z: number): Matrix {\r\n this._m[12] = x;\r\n this._m[13] = y;\r\n this._m[14] = z;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the translation vector (using 3 floats) in the current matrix\r\n * @param x defines the 1st component of the translation\r\n * @param y defines the 2nd component of the translation\r\n * @param z defines the 3rd component of the translation\r\n * @returns the current updated matrix\r\n */\r\n public addTranslationFromFloats(x: number, y: number, z: number): Matrix {\r\n this._m[12] += x;\r\n this._m[13] += y;\r\n this._m[14] += z;\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Inserts the translation vector in the current matrix\r\n * @param vector3 defines the translation to insert\r\n * @returns the current updated matrix\r\n */\r\n public setTranslation(vector3: DeepImmutable<Vector3>): Matrix {\r\n return this.setTranslationFromFloats(vector3._x, vector3._y, vector3._z);\r\n }\r\n\r\n /**\r\n * Gets the translation value of the current matrix\r\n * @returns a new Vector3 as the extracted translation from the matrix\r\n */\r\n public getTranslation(): Vector3 {\r\n return new Vector3(this._m[12], this._m[13], this._m[14]);\r\n }\r\n\r\n /**\r\n * Fill a Vector3 with the extracted translation from the matrix\r\n * @param result defines the Vector3 where to store the translation\r\n * @returns the current matrix\r\n */\r\n public getTranslationToRef(result: Vector3): Matrix {\r\n result.x = this._m[12];\r\n result.y = this._m[13];\r\n result.z = this._m[14];\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove rotation and scaling part from the matrix\r\n * @returns the updated matrix\r\n */\r\n public removeRotationAndScaling(): Matrix {\r\n const m = this.m;\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, m[12], m[13], m[14], m[15], this);\r\n this._updateIdentityStatus(m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1);\r\n return this;\r\n }\r\n\r\n /**\r\n * Multiply two matrices\r\n * @param other defines the second operand\r\n * @returns a new matrix set with the multiplication result of the current Matrix and the given one\r\n */\r\n public multiply(other: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n this.multiplyToRef(other, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the current matrix from the given one\r\n * @param other defines the source matrix\r\n * @returns the current updated matrix\r\n */\r\n public copyFrom(other: DeepImmutable<Matrix>): Matrix {\r\n other.copyToArray(this._m);\r\n const o = other as Matrix;\r\n this.updateFlag = o.updateFlag;\r\n this._updateIdentityStatus(o._isIdentity, o._isIdentityDirty, o._isIdentity3x2, o._isIdentity3x2Dirty);\r\n return this;\r\n }\r\n\r\n /**\r\n * Populates the given array from the starting index with the current matrix values\r\n * @param array defines the target array\r\n * @param offset defines the offset in the target array where to start storing values\r\n * @returns the current matrix\r\n */\r\n public copyToArray(array: Float32Array | Array<number>, offset: number = 0): Matrix {\r\n const source = this._m;\r\n array[offset] = source[0];\r\n array[offset + 1] = source[1];\r\n array[offset + 2] = source[2];\r\n array[offset + 3] = source[3];\r\n array[offset + 4] = source[4];\r\n array[offset + 5] = source[5];\r\n array[offset + 6] = source[6];\r\n array[offset + 7] = source[7];\r\n array[offset + 8] = source[8];\r\n array[offset + 9] = source[9];\r\n array[offset + 10] = source[10];\r\n array[offset + 11] = source[11];\r\n array[offset + 12] = source[12];\r\n array[offset + 13] = source[13];\r\n array[offset + 14] = source[14];\r\n array[offset + 15] = source[15];\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the given matrix \"result\" with the multiplication result of the current Matrix and the given one\r\n * @param other defines the second operand\r\n * @param result defines the matrix where to store the multiplication\r\n * @returns the current matrix\r\n */\r\n public multiplyToRef(other: DeepImmutable<Matrix>, result: Matrix): Matrix {\r\n if (this._isIdentity) {\r\n result.copyFrom(other);\r\n return this;\r\n }\r\n if ((other as Matrix)._isIdentity) {\r\n result.copyFrom(this);\r\n return this;\r\n }\r\n\r\n this.multiplyToArray(other, result._m, 0);\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the Float32Array \"result\" from the given index \"offset\" with the multiplication of the current matrix and the given one\r\n * @param other defines the second operand\r\n * @param result defines the array where to store the multiplication\r\n * @param offset defines the offset in the target array where to start storing values\r\n * @returns the current matrix\r\n */\r\n public multiplyToArray(other: DeepImmutable<Matrix>, result: Float32Array | Array<number>, offset: number): Matrix {\r\n const m = this._m;\r\n const otherM = other.m;\r\n const tm0 = m[0],\r\n tm1 = m[1],\r\n tm2 = m[2],\r\n tm3 = m[3];\r\n const tm4 = m[4],\r\n tm5 = m[5],\r\n tm6 = m[6],\r\n tm7 = m[7];\r\n const tm8 = m[8],\r\n tm9 = m[9],\r\n tm10 = m[10],\r\n tm11 = m[11];\r\n const tm12 = m[12],\r\n tm13 = m[13],\r\n tm14 = m[14],\r\n tm15 = m[15];\r\n\r\n const om0 = otherM[0],\r\n om1 = otherM[1],\r\n om2 = otherM[2],\r\n om3 = otherM[3];\r\n const om4 = otherM[4],\r\n om5 = otherM[5],\r\n om6 = otherM[6],\r\n om7 = otherM[7];\r\n const om8 = otherM[8],\r\n om9 = otherM[9],\r\n om10 = otherM[10],\r\n om11 = otherM[11];\r\n const om12 = otherM[12],\r\n om13 = otherM[13],\r\n om14 = otherM[14],\r\n om15 = otherM[15];\r\n\r\n result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\r\n result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\r\n result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\r\n result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\r\n\r\n result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\r\n result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\r\n result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\r\n result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\r\n\r\n result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\r\n result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\r\n result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\r\n result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\r\n\r\n result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\r\n result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\r\n result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\r\n result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\r\n return this;\r\n }\r\n\r\n /**\r\n * Check equality between this matrix and a second one\r\n * @param value defines the second matrix to compare\r\n * @returns true is the current matrix and the given one values are strictly equal\r\n */\r\n public equals(value: DeepImmutable<Matrix>): boolean {\r\n const other = value as Matrix;\r\n if (!other) {\r\n return false;\r\n }\r\n\r\n if (this._isIdentity || other._isIdentity) {\r\n if (!this._isIdentityDirty && !other._isIdentityDirty) {\r\n return this._isIdentity && other._isIdentity;\r\n }\r\n }\r\n\r\n const m = this.m;\r\n const om = other.m;\r\n return (\r\n m[0] === om[0] &&\r\n m[1] === om[1] &&\r\n m[2] === om[2] &&\r\n m[3] === om[3] &&\r\n m[4] === om[4] &&\r\n m[5] === om[5] &&\r\n m[6] === om[6] &&\r\n m[7] === om[7] &&\r\n m[8] === om[8] &&\r\n m[9] === om[9] &&\r\n m[10] === om[10] &&\r\n m[11] === om[11] &&\r\n m[12] === om[12] &&\r\n m[13] === om[13] &&\r\n m[14] === om[14] &&\r\n m[15] === om[15]\r\n );\r\n }\r\n\r\n /**\r\n * Clone the current matrix\r\n * @returns a new matrix from the current matrix\r\n */\r\n public clone(): Matrix {\r\n const matrix = new Matrix();\r\n matrix.copyFrom(this);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Returns the name of the current matrix class\r\n * @returns the string \"Matrix\"\r\n */\r\n public getClassName(): string {\r\n return \"Matrix\";\r\n }\r\n\r\n /**\r\n * Gets the hash code of the current matrix\r\n * @returns the hash code\r\n */\r\n public getHashCode(): number {\r\n let hash = _ExtractAsInt(this._m[0]);\r\n for (let i = 1; i < 16; i++) {\r\n hash = (hash * 397) ^ _ExtractAsInt(this._m[i]);\r\n }\r\n return hash;\r\n }\r\n\r\n /**\r\n * Decomposes the current Matrix into a translation, rotation and scaling components of the provided node\r\n * @param node the node to decompose the matrix to\r\n * @returns true if operation was successful\r\n */\r\n public decomposeToTransformNode(node: TransformNode): boolean {\r\n node.rotationQuaternion = node.rotationQuaternion || new Quaternion();\r\n return this.decompose(node.scaling, node.rotationQuaternion, node.position);\r\n }\r\n\r\n /**\r\n * Decomposes the current Matrix into a translation, rotation and scaling components\r\n * @param scale defines the scale vector3 given as a reference to update\r\n * @param rotation defines the rotation quaternion given as a reference to update\r\n * @param translation defines the translation vector3 given as a reference to update\r\n * @param preserveScalingNode Use scaling sign coming from this node. Otherwise scaling sign might change.\r\n * @returns true if operation was successful\r\n */\r\n public decompose(scale?: Vector3, rotation?: Quaternion, translation?: Vector3, preserveScalingNode?: TransformNode): boolean {\r\n if (this._isIdentity) {\r\n if (translation) {\r\n translation.setAll(0);\r\n }\r\n if (scale) {\r\n scale.setAll(1);\r\n }\r\n if (rotation) {\r\n rotation.copyFromFloats(0, 0, 0, 1);\r\n }\r\n return true;\r\n }\r\n\r\n const m = this._m;\r\n if (translation) {\r\n translation.copyFromFloats(m[12], m[13], m[14]);\r\n }\r\n\r\n scale = scale || MathTmp.Vector3[0];\r\n\r\n scale.x = Math.sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);\r\n scale.y = Math.sqrt(m[4] * m[4] + m[5] * m[5] + m[6] * m[6]);\r\n scale.z = Math.sqrt(m[8] * m[8] + m[9] * m[9] + m[10] * m[10]);\r\n\r\n if (preserveScalingNode) {\r\n const signX = preserveScalingNode.scaling.x < 0 ? -1 : 1;\r\n const signY = preserveScalingNode.scaling.y < 0 ? -1 : 1;\r\n const signZ = preserveScalingNode.scaling.z < 0 ? -1 : 1;\r\n\r\n scale.x *= signX;\r\n scale.y *= signY;\r\n scale.z *= signZ;\r\n } else {\r\n if (this.determinant() <= 0) {\r\n scale.y *= -1;\r\n }\r\n }\r\n\r\n if (scale._x === 0 || scale._y === 0 || scale._z === 0) {\r\n if (rotation) {\r\n rotation.copyFromFloats(0.0, 0.0, 0.0, 1.0);\r\n }\r\n return false;\r\n }\r\n\r\n if (rotation) {\r\n const sx = 1 / scale._x,\r\n sy = 1 / scale._y,\r\n sz = 1 / scale._z;\r\n Matrix.FromValuesToRef(\r\n m[0] * sx,\r\n m[1] * sx,\r\n m[2] * sx,\r\n 0.0,\r\n m[4] * sy,\r\n m[5] * sy,\r\n m[6] * sy,\r\n 0.0,\r\n m[8] * sz,\r\n m[9] * sz,\r\n m[10] * sz,\r\n 0.0,\r\n 0.0,\r\n 0.0,\r\n 0.0,\r\n 1.0,\r\n MathTmp.Matrix[0]\r\n );\r\n\r\n Quaternion.FromRotationMatrixToRef(MathTmp.Matrix[0], rotation);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets specific row of the matrix\r\n * @param index defines the number of the row to get\r\n * @returns the index-th row of the current matrix as a new Vector4\r\n */\r\n public getRow(index: number): Nullable<Vector4> {\r\n if (index < 0 || index > 3) {\r\n return null;\r\n }\r\n const i = index * 4;\r\n return new Vector4(this._m[i + 0], this._m[i + 1], this._m[i + 2], this._m[i + 3]);\r\n }\r\n\r\n /**\r\n * Sets the index-th row of the current matrix to the vector4 values\r\n * @param index defines the number of the row to set\r\n * @param row defines the target vector4\r\n * @returns the updated current matrix\r\n */\r\n public setRow(index: number, row: Vector4): Matrix {\r\n return this.setRowFromFloats(index, row.x, row.y, row.z, row.w);\r\n }\r\n\r\n /**\r\n * Compute the transpose of the matrix\r\n * @returns the new transposed matrix\r\n */\r\n public transpose(): Matrix {\r\n return Matrix.Transpose(this);\r\n }\r\n\r\n /**\r\n * Compute the transpose of the matrix and store it in a given matrix\r\n * @param result defines the target matrix\r\n * @returns the current matrix\r\n */\r\n public transposeToRef(result: Matrix): Matrix {\r\n Matrix.TransposeToRef(this, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the index-th row of the current matrix with the given 4 x float values\r\n * @param index defines the row index\r\n * @param x defines the x component to set\r\n * @param y defines the y component to set\r\n * @param z defines the z component to set\r\n * @param w defines the w component to set\r\n * @returns the updated current matrix\r\n */\r\n public setRowFromFloats(index: number, x: number, y: number, z: number, w: number): Matrix {\r\n if (index < 0 || index > 3) {\r\n return this;\r\n }\r\n const i = index * 4;\r\n this._m[i + 0] = x;\r\n this._m[i + 1] = y;\r\n this._m[i + 2] = z;\r\n this._m[i + 3] = w;\r\n\r\n this.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Compute a new matrix set with the current matrix values multiplied by scale (float)\r\n * @param scale defines the scale factor\r\n * @returns a new matrix\r\n */\r\n public scale(scale: number): Matrix {\r\n const result = new Matrix();\r\n this.scaleToRef(scale, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Scale the current matrix values by a factor to a given result matrix\r\n * @param scale defines the scale factor\r\n * @param result defines the matrix to store the result\r\n * @returns the current matrix\r\n */\r\n public scaleToRef(scale: number, result: Matrix): Matrix {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = this._m[index] * scale;\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Scale the current matrix values by a factor and add the result to a given matrix\r\n * @param scale defines the scale factor\r\n * @param result defines the Matrix to store the result\r\n * @returns the current matrix\r\n */\r\n public scaleAndAddToRef(scale: number, result: Matrix): Matrix {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] += this._m[index] * scale;\r\n }\r\n result.markAsUpdated();\r\n return this;\r\n }\r\n\r\n /**\r\n * Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).\r\n * @param ref matrix to store the result\r\n */\r\n public toNormalMatrix(ref: Matrix): void {\r\n const tmp = MathTmp.Matrix[0];\r\n this.invertToRef(tmp);\r\n tmp.transposeToRef(ref);\r\n const m = ref._m;\r\n Matrix.FromValuesToRef(m[0], m[1], m[2], 0.0, m[4], m[5], m[6], 0.0, m[8], m[9], m[10], 0.0, 0.0, 0.0, 0.0, 1.0, ref);\r\n }\r\n\r\n /**\r\n * Gets only rotation part of the current matrix\r\n * @returns a new matrix sets to the extracted rotation matrix from the current one\r\n */\r\n public getRotationMatrix(): Matrix {\r\n const result = new Matrix();\r\n this.getRotationMatrixToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the rotation matrix from the current one and sets it as the given \"result\"\r\n * @param result defines the target matrix to store data to\r\n * @returns the current matrix\r\n */\r\n public getRotationMatrixToRef(result: Matrix): Matrix {\r\n const scale = MathTmp.Vector3[0];\r\n if (!this.decompose(scale)) {\r\n Matrix.IdentityToRef(result);\r\n return this;\r\n }\r\n\r\n const m = this._m;\r\n const sx = 1 / scale._x,\r\n sy = 1 / scale._y,\r\n sz = 1 / scale._z;\r\n Matrix.FromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n return this;\r\n }\r\n\r\n /**\r\n * Toggles model matrix from being right handed to left handed in place and vice versa\r\n */\r\n public toggleModelMatrixHandInPlace() {\r\n const m = this._m;\r\n m[2] *= -1;\r\n m[6] *= -1;\r\n m[8] *= -1;\r\n m[9] *= -1;\r\n m[14] *= -1;\r\n this.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Toggles projection matrix from being right handed to left handed in place and vice versa\r\n */\r\n public toggleProjectionMatrixHandInPlace() {\r\n const m = this._m;\r\n m[8] *= -1;\r\n m[9] *= -1;\r\n m[10] *= -1;\r\n m[11] *= -1;\r\n this.markAsUpdated();\r\n }\r\n\r\n // Statics\r\n /**\r\n * Creates a matrix from an array\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @returns a new Matrix set from the starting index of the given array\r\n */\r\n public static FromArray(array: DeepImmutable<ArrayLike<number>>, offset: number = 0): Matrix {\r\n const result = new Matrix();\r\n Matrix.FromArrayToRef(array, offset, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the content of an array into a given matrix\r\n * @param array defines the source array\r\n * @param offset defines an offset in the source array\r\n * @param result defines the target matrix\r\n */\r\n public static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Matrix) {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = array[index + offset];\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Stores an array into a matrix after having multiplied each component by a given factor\r\n * @param array defines the source array\r\n * @param offset defines the offset in the source array\r\n * @param scale defines the scaling factor\r\n * @param result defines the target matrix\r\n */\r\n public static FromFloat32ArrayToRefScaled(array: DeepImmutable<Float32Array | Array<number>>, offset: number, scale: number, result: Matrix) {\r\n for (let index = 0; index < 16; index++) {\r\n result._m[index] = array[index + offset] * scale;\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Gets an identity matrix that must not be updated\r\n */\r\n public static get IdentityReadOnly(): DeepImmutable<Matrix> {\r\n return Matrix._IdentityReadOnly;\r\n }\r\n\r\n /**\r\n * Stores a list of values (16) inside a given matrix\r\n * @param initialM11 defines 1st value of 1st row\r\n * @param initialM12 defines 2nd value of 1st row\r\n * @param initialM13 defines 3rd value of 1st row\r\n * @param initialM14 defines 4th value of 1st row\r\n * @param initialM21 defines 1st value of 2nd row\r\n * @param initialM22 defines 2nd value of 2nd row\r\n * @param initialM23 defines 3rd value of 2nd row\r\n * @param initialM24 defines 4th value of 2nd row\r\n * @param initialM31 defines 1st value of 3rd row\r\n * @param initialM32 defines 2nd value of 3rd row\r\n * @param initialM33 defines 3rd value of 3rd row\r\n * @param initialM34 defines 4th value of 3rd row\r\n * @param initialM41 defines 1st value of 4th row\r\n * @param initialM42 defines 2nd value of 4th row\r\n * @param initialM43 defines 3rd value of 4th row\r\n * @param initialM44 defines 4th value of 4th row\r\n * @param result defines the target matrix\r\n */\r\n public static FromValuesToRef(\r\n initialM11: number,\r\n initialM12: number,\r\n initialM13: number,\r\n initialM14: number,\r\n initialM21: number,\r\n initialM22: number,\r\n initialM23: number,\r\n initialM24: number,\r\n initialM31: number,\r\n initialM32: number,\r\n initialM33: number,\r\n initialM34: number,\r\n initialM41: number,\r\n initialM42: number,\r\n initialM43: number,\r\n initialM44: number,\r\n result: Matrix\r\n ): void {\r\n const m = result._m;\r\n m[0] = initialM11;\r\n m[1] = initialM12;\r\n m[2] = initialM13;\r\n m[3] = initialM14;\r\n m[4] = initialM21;\r\n m[5] = initialM22;\r\n m[6] = initialM23;\r\n m[7] = initialM24;\r\n m[8] = initialM31;\r\n m[9] = initialM32;\r\n m[10] = initialM33;\r\n m[11] = initialM34;\r\n m[12] = initialM41;\r\n m[13] = initialM42;\r\n m[14] = initialM43;\r\n m[15] = initialM44;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates new matrix from a list of values (16)\r\n * @param initialM11 defines 1st value of 1st row\r\n * @param initialM12 defines 2nd value of 1st row\r\n * @param initialM13 defines 3rd value of 1st row\r\n * @param initialM14 defines 4th value of 1st row\r\n * @param initialM21 defines 1st value of 2nd row\r\n * @param initialM22 defines 2nd value of 2nd row\r\n * @param initialM23 defines 3rd value of 2nd row\r\n * @param initialM24 defines 4th value of 2nd row\r\n * @param initialM31 defines 1st value of 3rd row\r\n * @param initialM32 defines 2nd value of 3rd row\r\n * @param initialM33 defines 3rd value of 3rd row\r\n * @param initialM34 defines 4th value of 3rd row\r\n * @param initialM41 defines 1st value of 4th row\r\n * @param initialM42 defines 2nd value of 4th row\r\n * @param initialM43 defines 3rd value of 4th row\r\n * @param initialM44 defines 4th value of 4th row\r\n * @returns the new matrix\r\n */\r\n public static FromValues(\r\n initialM11: number,\r\n initialM12: number,\r\n initialM13: number,\r\n initialM14: number,\r\n initialM21: number,\r\n initialM22: number,\r\n initialM23: number,\r\n initialM24: number,\r\n initialM31: number,\r\n initialM32: number,\r\n initialM33: number,\r\n initialM34: number,\r\n initialM41: number,\r\n initialM42: number,\r\n initialM43: number,\r\n initialM44: number\r\n ): Matrix {\r\n const result = new Matrix();\r\n const m = result._m;\r\n m[0] = initialM11;\r\n m[1] = initialM12;\r\n m[2] = initialM13;\r\n m[3] = initialM14;\r\n m[4] = initialM21;\r\n m[5] = initialM22;\r\n m[6] = initialM23;\r\n m[7] = initialM24;\r\n m[8] = initialM31;\r\n m[9] = initialM32;\r\n m[10] = initialM33;\r\n m[11] = initialM34;\r\n m[12] = initialM41;\r\n m[13] = initialM42;\r\n m[14] = initialM43;\r\n m[15] = initialM44;\r\n result.markAsUpdated();\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\r\n * @param scale defines the scale vector3\r\n * @param rotation defines the rotation quaternion\r\n * @param translation defines the translation vector3\r\n * @returns a new matrix\r\n */\r\n public static Compose(scale: DeepImmutable<Vector3>, rotation: DeepImmutable<Quaternion>, translation: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.ComposeToRef(scale, rotation, translation, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\r\n * @param scale defines the scale vector3\r\n * @param rotation defines the rotation quaternion\r\n * @param translation defines the translation vector3\r\n * @param result defines the target matrix\r\n */\r\n public static ComposeToRef(scale: DeepImmutable<Vector3>, rotation: DeepImmutable<Quaternion>, translation: DeepImmutable<Vector3>, result: Matrix): void {\r\n const m = result._m;\r\n const x = rotation._x,\r\n y = rotation._y,\r\n z = rotation._z,\r\n w = rotation._w;\r\n const x2 = x + x,\r\n y2 = y + y,\r\n z2 = z + z;\r\n const xx = x * x2,\r\n xy = x * y2,\r\n xz = x * z2;\r\n const yy = y * y2,\r\n yz = y * z2,\r\n zz = z * z2;\r\n const wx = w * x2,\r\n wy = w * y2,\r\n wz = w * z2;\r\n\r\n const sx = scale._x,\r\n sy = scale._y,\r\n sz = scale._z;\r\n\r\n m[0] = (1 - (yy + zz)) * sx;\r\n m[1] = (xy + wz) * sx;\r\n m[2] = (xz - wy) * sx;\r\n m[3] = 0;\r\n\r\n m[4] = (xy - wz) * sy;\r\n m[5] = (1 - (xx + zz)) * sy;\r\n m[6] = (yz + wx) * sy;\r\n m[7] = 0;\r\n\r\n m[8] = (xz + wy) * sz;\r\n m[9] = (yz - wx) * sz;\r\n m[10] = (1 - (xx + yy)) * sz;\r\n m[11] = 0;\r\n\r\n m[12] = translation._x;\r\n m[13] = translation._y;\r\n m[14] = translation._z;\r\n m[15] = 1;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a new identity matrix\r\n * @returns a new identity matrix\r\n */\r\n public static Identity(): Matrix {\r\n const identity = Matrix.FromValues(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\r\n identity._updateIdentityStatus(true);\r\n return identity;\r\n }\r\n\r\n /**\r\n * Creates a new identity matrix and stores the result in a given matrix\r\n * @param result defines the target matrix\r\n */\r\n public static IdentityToRef(result: Matrix): void {\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n result._updateIdentityStatus(true);\r\n }\r\n\r\n /**\r\n * Creates a new zero matrix\r\n * @returns a new zero matrix\r\n */\r\n public static Zero(): Matrix {\r\n const zero = Matrix.FromValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n zero._updateIdentityStatus(false);\r\n return zero;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the X axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationX(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationXToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new matrix as the invert of a given matrix\r\n * @param source defines the source matrix\r\n * @returns the new matrix\r\n */\r\n public static Invert(source: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n source.invertToRef(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the X axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationXToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Y axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationY(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationYToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Y axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationYToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(c, 0.0, -s, 0.0, 0.0, 1.0, 0.0, 0.0, s, 0.0, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Z axis\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationZ(angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationZToRef(angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the Z axis and stores it in a given matrix\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationZToRef(angle: number, result: Matrix): void {\r\n const s = Math.sin(angle);\r\n const c = Math.cos(angle);\r\n Matrix.FromValuesToRef(c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(c === 1 && s === 0);\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the given axis\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle (in radians) to use\r\n * @return the new matrix\r\n */\r\n public static RotationAxis(axis: DeepImmutable<Vector3>, angle: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationAxisToRef(axis, angle, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new rotation matrix for \"angle\" radians around the given axis and stores it in a given matrix\r\n * @param axis defines the axis to use\r\n * @param angle defines the angle (in radians) to use\r\n * @param result defines the target matrix\r\n */\r\n public static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Matrix): void {\r\n const s = Math.sin(-angle);\r\n const c = Math.cos(-angle);\r\n const c1 = 1 - c;\r\n\r\n axis.normalize();\r\n const m = result._m;\r\n m[0] = axis._x * axis._x * c1 + c;\r\n m[1] = axis._x * axis._y * c1 - axis._z * s;\r\n m[2] = axis._x * axis._z * c1 + axis._y * s;\r\n m[3] = 0.0;\r\n\r\n m[4] = axis._y * axis._x * c1 + axis._z * s;\r\n m[5] = axis._y * axis._y * c1 + c;\r\n m[6] = axis._y * axis._z * c1 - axis._x * s;\r\n m[7] = 0.0;\r\n\r\n m[8] = axis._z * axis._x * c1 - axis._y * s;\r\n m[9] = axis._z * axis._y * c1 + axis._x * s;\r\n m[10] = axis._z * axis._z * c1 + c;\r\n m[11] = 0.0;\r\n\r\n m[12] = 0.0;\r\n m[13] = 0.0;\r\n m[14] = 0.0;\r\n m[15] = 1.0;\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Takes normalised vectors and returns a rotation matrix to align \"from\" with \"to\".\r\n * Taken from http://www.iquilezles.org/www/articles/noacos/noacos.htm\r\n * @param from defines the vector to align\r\n * @param to defines the vector to align to\r\n * @param result defines the target matrix\r\n */\r\n public static RotationAlignToRef(from: DeepImmutable<Vector3>, to: DeepImmutable<Vector3>, result: Matrix): void {\r\n const c = Vector3.Dot(to, from);\r\n const m = result._m;\r\n if (c < -1 + Epsilon) {\r\n // from and to are colinear and opposite direction.\r\n // compute a PI rotation on Z axis\r\n m[0] = -1;\r\n m[1] = 0;\r\n m[2] = 0;\r\n m[3] = 0;\r\n m[4] = 0;\r\n m[5] = -1;\r\n m[6] = 0;\r\n m[7] = 0;\r\n m[8] = 0;\r\n m[9] = 0;\r\n m[10] = 1;\r\n m[11] = 0;\r\n } else {\r\n const v = Vector3.Cross(to, from);\r\n const k = 1 / (1 + c);\r\n\r\n m[0] = v._x * v._x * k + c;\r\n m[1] = v._y * v._x * k - v._z;\r\n m[2] = v._z * v._x * k + v._y;\r\n m[3] = 0;\r\n m[4] = v._x * v._y * k + v._z;\r\n m[5] = v._y * v._y * k + c;\r\n m[6] = v._z * v._y * k - v._x;\r\n m[7] = 0;\r\n m[8] = v._x * v._z * k - v._y;\r\n m[9] = v._y * v._z * k + v._x;\r\n m[10] = v._z * v._z * k + c;\r\n m[11] = 0;\r\n }\r\n m[12] = 0;\r\n m[13] = 0;\r\n m[14] = 0;\r\n m[15] = 1;\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix\r\n * @param yaw defines the yaw angle in radians (Y axis)\r\n * @param pitch defines the pitch angle in radians (X axis)\r\n * @param roll defines the roll angle in radians (Z axis)\r\n * @returns the new rotation matrix\r\n */\r\n public static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix and stores it in a given matrix\r\n * @param yaw defines the yaw angle in radians (Y axis)\r\n * @param pitch defines the pitch angle in radians (X axis)\r\n * @param roll defines the roll angle in radians (Z axis)\r\n * @param result defines the target matrix\r\n */\r\n public static RotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: Matrix): void {\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, MathTmp.Quaternion[0]);\r\n MathTmp.Quaternion[0].toRotationMatrix(result);\r\n }\r\n\r\n /**\r\n * Creates a scaling matrix\r\n * @param x defines the scale factor on X axis\r\n * @param y defines the scale factor on Y axis\r\n * @param z defines the scale factor on Z axis\r\n * @returns the new matrix\r\n */\r\n public static Scaling(x: number, y: number, z: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.ScalingToRef(x, y, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a scaling matrix and stores it in a given matrix\r\n * @param x defines the scale factor on X axis\r\n * @param y defines the scale factor on Y axis\r\n * @param z defines the scale factor on Z axis\r\n * @param result defines the target matrix\r\n */\r\n public static ScalingToRef(x: number, y: number, z: number, result: Matrix): void {\r\n Matrix.FromValuesToRef(x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n\r\n result._updateIdentityStatus(x === 1 && y === 1 && z === 1);\r\n }\r\n\r\n /**\r\n * Creates a translation matrix\r\n * @param x defines the translation on X axis\r\n * @param y defines the translation on Y axis\r\n * @param z defines the translationon Z axis\r\n * @returns the new matrix\r\n */\r\n public static Translation(x: number, y: number, z: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.TranslationToRef(x, y, z, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a translation matrix and stores it in a given matrix\r\n * @param x defines the translation on X axis\r\n * @param y defines the translation on Y axis\r\n * @param z defines the translationon Z axis\r\n * @param result defines the target matrix\r\n */\r\n public static TranslationToRef(x: number, y: number, z: number, result: Matrix): void {\r\n Matrix.FromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0, result);\r\n result._updateIdentityStatus(x === 0 && y === 0 && z === 0);\r\n }\r\n\r\n /**\r\n * Returns a new Matrix whose values are the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\r\n * @param startValue defines the start value\r\n * @param endValue defines the end value\r\n * @param gradient defines the gradient factor\r\n * @returns the new matrix\r\n */\r\n public static Lerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.LerpToRef(startValue, endValue, gradient, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the given matrix \"result\" as the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\r\n * @param startValue defines the start value\r\n * @param endValue defines the end value\r\n * @param gradient defines the gradient factor\r\n * @param result defines the Matrix object where to store data\r\n */\r\n public static LerpToRef(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number, result: Matrix): void {\r\n const resultM = result._m;\r\n const startM = startValue.m;\r\n const endM = endValue.m;\r\n for (let index = 0; index < 16; index++) {\r\n resultM[index] = startM[index] * (1.0 - gradient) + endM[index] * gradient;\r\n }\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Builds a new matrix whose values are computed by:\r\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\r\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\r\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\r\n * @param startValue defines the first matrix\r\n * @param endValue defines the second matrix\r\n * @param gradient defines the gradient between the two matrices\r\n * @returns the new matrix\r\n */\r\n public static DecomposeLerp(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number): Matrix {\r\n const result = new Matrix();\r\n Matrix.DecomposeLerpToRef(startValue, endValue, gradient, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Update a matrix to values which are computed by:\r\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\r\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\r\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\r\n * @param startValue defines the first matrix\r\n * @param endValue defines the second matrix\r\n * @param gradient defines the gradient between the two matrices\r\n * @param result defines the target matrix\r\n */\r\n public static DecomposeLerpToRef(startValue: DeepImmutable<Matrix>, endValue: DeepImmutable<Matrix>, gradient: number, result: Matrix) {\r\n const startScale = MathTmp.Vector3[0];\r\n const startRotation = MathTmp.Quaternion[0];\r\n const startTranslation = MathTmp.Vector3[1];\r\n startValue.decompose(startScale, startRotation, startTranslation);\r\n\r\n const endScale = MathTmp.Vector3[2];\r\n const endRotation = MathTmp.Quaternion[1];\r\n const endTranslation = MathTmp.Vector3[3];\r\n endValue.decompose(endScale, endRotation, endTranslation);\r\n\r\n const resultScale = MathTmp.Vector3[4];\r\n Vector3.LerpToRef(startScale, endScale, gradient, resultScale);\r\n const resultRotation = MathTmp.Quaternion[2];\r\n Quaternion.SlerpToRef(startRotation, endRotation, gradient, resultRotation);\r\n\r\n const resultTranslation = MathTmp.Vector3[5];\r\n Vector3.LerpToRef(startTranslation, endTranslation, gradient, resultTranslation);\r\n\r\n Matrix.ComposeToRef(resultScale, resultRotation, resultTranslation, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\r\n * This function works in left handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @returns the new matrix\r\n */\r\n public static LookAtLH(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookAtLHToRef(eye, target, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @param result defines the target matrix\r\n */\r\n public static LookAtLHToRef(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const xAxis = MathTmp.Vector3[0];\r\n const yAxis = MathTmp.Vector3[1];\r\n const zAxis = MathTmp.Vector3[2];\r\n\r\n // Z axis\r\n target.subtractToRef(eye, zAxis);\r\n zAxis.normalize();\r\n\r\n // X axis\r\n Vector3.CrossToRef(up, zAxis, xAxis);\r\n\r\n const xSquareLength = xAxis.lengthSquared();\r\n if (xSquareLength === 0) {\r\n xAxis.x = 1.0;\r\n } else {\r\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\r\n }\r\n\r\n // Y axis\r\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\r\n yAxis.normalize();\r\n\r\n // Eye angles\r\n const ex = -Vector3.Dot(xAxis, eye);\r\n const ey = -Vector3.Dot(yAxis, eye);\r\n const ez = -Vector3.Dot(zAxis, eye);\r\n\r\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\r\n * This function works in right handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @returns the new matrix\r\n */\r\n public static LookAtRH(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookAtRHToRef(eye, target, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param eye defines the final position of the entity\r\n * @param target defines where the entity should look at\r\n * @param up defines the up vector for the entity\r\n * @param result defines the target matrix\r\n */\r\n public static LookAtRHToRef(eye: DeepImmutable<Vector3>, target: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const xAxis = MathTmp.Vector3[0];\r\n const yAxis = MathTmp.Vector3[1];\r\n const zAxis = MathTmp.Vector3[2];\r\n\r\n // Z axis\r\n eye.subtractToRef(target, zAxis);\r\n zAxis.normalize();\r\n\r\n // X axis\r\n Vector3.CrossToRef(up, zAxis, xAxis);\r\n\r\n const xSquareLength = xAxis.lengthSquared();\r\n if (xSquareLength === 0) {\r\n xAxis.x = 1.0;\r\n } else {\r\n xAxis.normalizeFromLength(Math.sqrt(xSquareLength));\r\n }\r\n\r\n // Y axis\r\n Vector3.CrossToRef(zAxis, xAxis, yAxis);\r\n yAxis.normalize();\r\n\r\n // Eye angles\r\n const ex = -Vector3.Dot(xAxis, eye);\r\n const ey = -Vector3.Dot(yAxis, eye);\r\n const ez = -Vector3.Dot(zAxis, eye);\r\n\r\n Matrix.FromValuesToRef(xAxis._x, yAxis._x, zAxis._x, 0.0, xAxis._y, yAxis._y, zAxis._y, 0.0, xAxis._z, yAxis._z, zAxis._z, 0.0, ex, ey, ez, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks in the direction specified by forward from the eye position, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns the new matrix\r\n */\r\n public static LookDirectionLH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookDirectionLHToRef(forward, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks in the direction of forward, the up direction being oriented like \"up\".\r\n * This function works in left handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param result defines the target matrix\r\n */\r\n public static LookDirectionLHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const back = MathTmp.Vector3[0];\r\n back.copyFrom(forward);\r\n back.scaleInPlace(-1);\r\n const left = MathTmp.Vector3[1];\r\n Vector3.CrossToRef(up, back, left);\r\n\r\n // Generate the rotation matrix.\r\n Matrix.FromValuesToRef(left._x, left._y, left._z, 0.0, up._x, up._y, up._z, 0.0, back._x, back._y, back._z, 0.0, 0, 0, 0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Gets a new rotation matrix used to rotate an entity so as it looks in the direction specified by forward from the eye position, the up Vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @returns the new matrix\r\n */\r\n public static LookDirectionRH(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>): Matrix {\r\n const result = new Matrix();\r\n Matrix.LookDirectionRHToRef(forward, up, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks in the direction of forward, the up vector3 being oriented like \"up\".\r\n * This function works in right handed mode\r\n * @param forward defines the forward direction - Must be normalized and orthogonal to up.\r\n * @param up defines the up vector for the entity - Must be normalized and orthogonal to forward.\r\n * @param result defines the target matrix\r\n */\r\n public static LookDirectionRHToRef(forward: DeepImmutable<Vector3>, up: DeepImmutable<Vector3>, result: Matrix): void {\r\n const right = MathTmp.Vector3[2];\r\n Vector3.CrossToRef(up, forward, right);\r\n\r\n // Generate the rotation matrix.\r\n Matrix.FromValuesToRef(right._x, right._y, right._z, 0.0, up._x, up._y, up._z, 0.0, forward._x, forward._y, forward._z, 0.0, 0, 0, 0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Create a left-handed orthographic projection matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a left-handed orthographic projection matrix\r\n */\r\n public static OrthoLH(width: number, height: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoLHToRef(width, height, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Store a left-handed orthographic projection to a given matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoLHToRef(width: number, height: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = 2.0 / width;\r\n const b = 2.0 / height;\r\n const c = 2.0 / (f - n);\r\n const d = -(f + n) / (f - n);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, 0.0, 0.0, d, 1.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(a === 1 && b === 1 && c === 1 && d === 0);\r\n }\r\n\r\n /**\r\n * Create a left-handed orthographic projection matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a left-handed orthographic projection matrix\r\n */\r\n public static OrthoOffCenterLH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a left-handed orthographic projection into a given matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = 2.0 / (right - left);\r\n const b = 2.0 / (top - bottom);\r\n const c = 2.0 / (f - n);\r\n const d = -(f + n) / (f - n);\r\n const i0 = (left + right) / (left - right);\r\n const i1 = (top + bottom) / (bottom - top);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, i0, i1, d, 1.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Creates a right-handed orthographic projection matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @returns a new matrix as a right-handed orthographic projection matrix\r\n */\r\n public static OrthoOffCenterRH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, halfZRange?: boolean): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.OrthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, matrix, halfZRange);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a right-handed orthographic projection into a given matrix\r\n * @param left defines the viewport left coordinate\r\n * @param right defines the viewport right coordinate\r\n * @param bottom defines the viewport bottom coordinate\r\n * @param top defines the viewport top coordinate\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n */\r\n public static OrthoOffCenterRHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: Matrix, halfZRange?: boolean): void {\r\n Matrix.OrthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result, halfZRange);\r\n result._m[10] *= -1; // No need to call markAsUpdated as previous function already called it and let _isIdentityDirty to true\r\n }\r\n\r\n /**\r\n * Creates a left-handed perspective projection matrix\r\n * @param width defines the viewport width\r\n * @param height defines the viewport height\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @returns a new matrix as a left-handed perspective projection matrix\r\n */\r\n public static PerspectiveLH(width: number, height: number, znear: number, zfar: number, halfZRange?: boolean, projectionPlaneTilt: number = 0): Matrix {\r\n const matrix = new Matrix();\r\n\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const a = (2.0 * n) / width;\r\n const b = (2.0 * n) / height;\r\n const c = (f + n) / (f - n);\r\n const d = (-2.0 * f * n) / (f - n);\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, matrix);\r\n\r\n if (halfZRange) {\r\n matrix.multiplyToRef(mtxConvertNDCToHalfZRange, matrix);\r\n }\r\n\r\n matrix._updateIdentityStatus(false);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Creates a left-handed perspective projection matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n * @returns a new matrix as a left-handed perspective projection matrix\r\n */\r\n public static PerspectiveFovLH(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.PerspectiveFovLHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a left-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n */\r\n public static PerspectiveFovLHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): void {\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const c = reverseDepthBufferMode && n === 0 ? -1 : f !== 0 ? (f + n) / (f - n) : 1;\r\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2.0 * f * n) / (f - n) : -2 * n;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a left-handed perspective projection into a given matrix with depth reversed\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar not used as infinity is used as far clip\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovReverseLHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, 1.0, 0.0, 0.0, 1.0, 0.0, result);\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Creates a right-handed perspective projection matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n * @returns a new matrix as a right-handed perspective projection matrix\r\n */\r\n public static PerspectiveFovRH(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.PerspectiveFovRHToRef(fov, aspect, znear, zfar, matrix, true, halfZRange, projectionPlaneTilt, reverseDepthBufferMode);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Stores a right-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane. If 0, assume we are in \"infinite zfar\" mode\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n * @param reverseDepthBufferMode true to indicate that we are in a reverse depth buffer mode (meaning znear and zfar have been inverted when calling the function)\r\n */\r\n public static PerspectiveFovRHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0,\r\n reverseDepthBufferMode: boolean = false\r\n ): void {\r\n //alternatively this could be expressed as:\r\n // m = PerspectiveFovLHToRef\r\n // m[10] *= -1.0;\r\n // m[11] *= -1.0;\r\n\r\n const n = znear;\r\n const f = zfar;\r\n\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const c = reverseDepthBufferMode && n === 0 ? 1 : f !== 0 ? -(f + n) / (f - n) : -1;\r\n const d = reverseDepthBufferMode && n === 0 ? 2 * f : f !== 0 ? (-2 * f * n) / (f - n) : -2 * n;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, c, -1.0, 0.0, 0.0, d, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a right-handed perspective projection into a given matrix\r\n * @param fov defines the horizontal field of view\r\n * @param aspect defines the aspect ratio\r\n * @param znear defines the near clip plane\r\n * @param zfar not used as infinity is used as far clip\r\n * @param result defines the target matrix\r\n * @param isVerticalFovFixed defines it the fov is vertically fixed (default) or horizontally\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovReverseRHToRef(\r\n fov: number,\r\n aspect: number,\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n isVerticalFovFixed = true,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const t = 1.0 / Math.tan(fov * 0.5);\r\n const a = isVerticalFovFixed ? t / aspect : t;\r\n const b = isVerticalFovFixed ? t : t * aspect;\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n Matrix.FromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, rot, 0.0, 0.0, -znear, -1.0, 0.0, 0.0, -1.0, 0.0, result);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result._updateIdentityStatus(false);\r\n }\r\n\r\n /**\r\n * Stores a perspective projection for WebVR info a given matrix\r\n * @param fov defines the field of view\r\n * @param fov.upDegrees\r\n * @param fov.downDegrees\r\n * @param fov.leftDegrees\r\n * @param fov.rightDegrees\r\n * @param znear defines the near clip plane\r\n * @param zfar defines the far clip plane\r\n * @param result defines the target matrix\r\n * @param rightHanded defines if the matrix must be in right-handed mode (false by default)\r\n * @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)\r\n * @param projectionPlaneTilt optional tilt angle of the projection plane around the X axis (horizontal)\r\n */\r\n public static PerspectiveFovWebVRToRef(\r\n fov: { upDegrees: number; downDegrees: number; leftDegrees: number; rightDegrees: number },\r\n znear: number,\r\n zfar: number,\r\n result: Matrix,\r\n rightHanded = false,\r\n halfZRange?: boolean,\r\n projectionPlaneTilt: number = 0\r\n ): void {\r\n const rightHandedFactor = rightHanded ? -1 : 1;\r\n\r\n const upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);\r\n const downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);\r\n const leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);\r\n const rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);\r\n const xScale = 2.0 / (leftTan + rightTan);\r\n const yScale = 2.0 / (upTan + downTan);\r\n const rot = Math.tan(projectionPlaneTilt);\r\n\r\n const m = result._m;\r\n m[0] = xScale;\r\n m[1] = m[2] = m[3] = m[4] = 0.0;\r\n m[5] = yScale;\r\n m[6] = 0.0;\r\n m[7] = rot;\r\n m[8] = (leftTan - rightTan) * xScale * 0.5;\r\n m[9] = -((upTan - downTan) * yScale * 0.5);\r\n m[10] = -zfar / (znear - zfar);\r\n m[11] = 1.0 * rightHandedFactor;\r\n m[12] = m[13] = m[15] = 0.0;\r\n m[14] = -(2.0 * zfar * znear) / (zfar - znear);\r\n\r\n if (halfZRange) {\r\n result.multiplyToRef(mtxConvertNDCToHalfZRange, result);\r\n }\r\n\r\n result.markAsUpdated();\r\n }\r\n\r\n /**\r\n * Computes a complete transformation matrix\r\n * @param viewport defines the viewport to use\r\n * @param world defines the world matrix\r\n * @param view defines the view matrix\r\n * @param projection defines the projection matrix\r\n * @param zmin defines the near clip plane\r\n * @param zmax defines the far clip plane\r\n * @returns the transformation matrix\r\n */\r\n public static GetFinalMatrix(\r\n viewport: DeepImmutable<Viewport>,\r\n world: DeepImmutable<Matrix>,\r\n view: DeepImmutable<Matrix>,\r\n projection: DeepImmutable<Matrix>,\r\n zmin: number,\r\n zmax: number\r\n ): Matrix {\r\n const cw = viewport.width;\r\n const ch = viewport.height;\r\n const cx = viewport.x;\r\n const cy = viewport.y;\r\n\r\n const viewportMatrix = Matrix.FromValues(cw / 2.0, 0.0, 0.0, 0.0, 0.0, -ch / 2.0, 0.0, 0.0, 0.0, 0.0, zmax - zmin, 0.0, cx + cw / 2.0, ch / 2.0 + cy, zmin, 1.0);\r\n\r\n const matrix = MathTmp.Matrix[0];\r\n world.multiplyToRef(view, matrix);\r\n matrix.multiplyToRef(projection, matrix);\r\n return matrix.multiply(viewportMatrix);\r\n }\r\n\r\n /**\r\n * Extracts a 2x2 matrix from a given matrix and store the result in a Float32Array\r\n * @param matrix defines the matrix to use\r\n * @returns a new Float32Array array with 4 elements : the 2x2 matrix extracted from the given matrix\r\n */\r\n public static GetAsMatrix2x2(matrix: DeepImmutable<Matrix>): Float32Array | Array<number> {\r\n const m = matrix.m;\r\n const arr = [m[0], m[1], m[4], m[5]];\r\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\r\n }\r\n /**\r\n * Extracts a 3x3 matrix from a given matrix and store the result in a Float32Array\r\n * @param matrix defines the matrix to use\r\n * @returns a new Float32Array array with 9 elements : the 3x3 matrix extracted from the given matrix\r\n */\r\n public static GetAsMatrix3x3(matrix: DeepImmutable<Matrix>): Float32Array | Array<number> {\r\n const m = matrix.m;\r\n const arr = [m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]];\r\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\r\n }\r\n\r\n /**\r\n * Compute the transpose of a given matrix\r\n * @param matrix defines the matrix to transpose\r\n * @returns the new matrix\r\n */\r\n public static Transpose(matrix: DeepImmutable<Matrix>): Matrix {\r\n const result = new Matrix();\r\n Matrix.TransposeToRef(matrix, result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Compute the transpose of a matrix and store it in a target matrix\r\n * @param matrix defines the matrix to transpose\r\n * @param result defines the target matrix\r\n */\r\n public static TransposeToRef(matrix: DeepImmutable<Matrix>, result: Matrix): void {\r\n const rm = result._m;\r\n const mm = matrix.m;\r\n rm[0] = mm[0];\r\n rm[1] = mm[4];\r\n rm[2] = mm[8];\r\n rm[3] = mm[12];\r\n\r\n rm[4] = mm[1];\r\n rm[5] = mm[5];\r\n rm[6] = mm[9];\r\n rm[7] = mm[13];\r\n\r\n rm[8] = mm[2];\r\n rm[9] = mm[6];\r\n rm[10] = mm[10];\r\n rm[11] = mm[14];\r\n\r\n rm[12] = mm[3];\r\n rm[13] = mm[7];\r\n rm[14] = mm[11];\r\n rm[15] = mm[15];\r\n\r\n result.markAsUpdated();\r\n\r\n // identity-ness does not change when transposing\r\n result._updateIdentityStatus((matrix as Matrix)._isIdentity, (matrix as Matrix)._isIdentityDirty);\r\n }\r\n\r\n /**\r\n * Computes a reflection matrix from a plane\r\n * @param plane defines the reflection plane\r\n * @returns a new matrix\r\n */\r\n public static Reflection(plane: DeepImmutable<IPlaneLike>): Matrix {\r\n const matrix = new Matrix();\r\n Matrix.ReflectionToRef(plane, matrix);\r\n return matrix;\r\n }\r\n\r\n /**\r\n * Computes a reflection matrix from a plane\r\n * @param plane defines the reflection plane\r\n * @param result defines the target matrix\r\n */\r\n public static ReflectionToRef(plane: DeepImmutable<IPlaneLike>, result: Matrix): void {\r\n plane.normalize();\r\n const x = plane.normal.x;\r\n const y = plane.normal.y;\r\n const z = plane.normal.z;\r\n const temp = -2 * x;\r\n const temp2 = -2 * y;\r\n const temp3 = -2 * z;\r\n Matrix.FromValuesToRef(\r\n temp * x + 1,\r\n temp2 * x,\r\n temp3 * x,\r\n 0.0,\r\n temp * y,\r\n temp2 * y + 1,\r\n temp3 * y,\r\n 0.0,\r\n temp * z,\r\n temp2 * z,\r\n temp3 * z + 1,\r\n 0.0,\r\n temp * plane.d,\r\n temp2 * plane.d,\r\n temp3 * plane.d,\r\n 1.0,\r\n result\r\n );\r\n }\r\n\r\n /**\r\n * Sets the given matrix as a rotation matrix composed from the 3 left handed axes\r\n * @param xaxis defines the value of the 1st axis\r\n * @param yaxis defines the value of the 2nd axis\r\n * @param zaxis defines the value of the 3rd axis\r\n * @param result defines the target matrix\r\n */\r\n public static FromXYZAxesToRef(xaxis: DeepImmutable<Vector3>, yaxis: DeepImmutable<Vector3>, zaxis: DeepImmutable<Vector3>, result: Matrix) {\r\n Matrix.FromValuesToRef(xaxis._x, xaxis._y, xaxis._z, 0.0, yaxis._x, yaxis._y, yaxis._z, 0.0, zaxis._x, zaxis._y, zaxis._z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\r\n }\r\n\r\n /**\r\n * Creates a rotation matrix from a quaternion and stores it in a target matrix\r\n * @param quat defines the quaternion to use\r\n * @param result defines the target matrix\r\n */\r\n public static FromQuaternionToRef(quat: DeepImmutable<Quaternion>, result: Matrix) {\r\n const xx = quat._x * quat._x;\r\n const yy = quat._y * quat._y;\r\n const zz = quat._z * quat._z;\r\n const xy = quat._x * quat._y;\r\n const zw = quat._z * quat._w;\r\n const zx = quat._z * quat._x;\r\n const yw = quat._y * quat._w;\r\n const yz = quat._y * quat._z;\r\n const xw = quat._x * quat._w;\r\n\r\n result._m[0] = 1.0 - 2.0 * (yy + zz);\r\n result._m[1] = 2.0 * (xy + zw);\r\n result._m[2] = 2.0 * (zx - yw);\r\n result._m[3] = 0.0;\r\n\r\n result._m[4] = 2.0 * (xy - zw);\r\n result._m[5] = 1.0 - 2.0 * (zz + xx);\r\n result._m[6] = 2.0 * (yz + xw);\r\n result._m[7] = 0.0;\r\n\r\n result._m[8] = 2.0 * (zx + yw);\r\n result._m[9] = 2.0 * (yz - xw);\r\n result._m[10] = 1.0 - 2.0 * (yy + xx);\r\n result._m[11] = 0.0;\r\n\r\n result._m[12] = 0.0;\r\n result._m[13] = 0.0;\r\n result._m[14] = 0.0;\r\n result._m[15] = 1.0;\r\n\r\n result.markAsUpdated();\r\n }\r\n}\r\n\r\n/**\r\n * @hidden\r\n * Same as Tmp but not exported to keep it only for math functions to avoid conflicts\r\n */\r\nclass MathTmp {\r\n public static Vector3 = ArrayTools.BuildTuple(11, Vector3.Zero);\r\n public static Matrix = ArrayTools.BuildTuple(2, Matrix.Identity);\r\n public static Quaternion = ArrayTools.BuildTuple(3, Quaternion.Zero);\r\n}\r\n\r\n/**\r\n * @hidden\r\n */\r\nexport class TmpVectors {\r\n public static Vector2 = ArrayTools.BuildTuple(3, Vector2.Zero); // 3 temp Vector2 at once should be enough\r\n public static Vector3 = ArrayTools.BuildTuple(13, Vector3.Zero); // 13 temp Vector3 at once should be enough\r\n public static Vector4 = ArrayTools.BuildTuple(3, Vector4.Zero); // 3 temp Vector4 at once should be enough\r\n public static Quaternion = ArrayTools.BuildTuple(2, Quaternion.Zero); // 2 temp Quaternion at once should be enough\r\n public static Matrix = ArrayTools.BuildTuple(8, Matrix.Identity); // 8 temp Matrices at once should be enough\r\n}\r\n\r\nRegisterClass(\"BABYLON.Vector2\", Vector2);\r\nRegisterClass(\"BABYLON.Vector3\", Vector3);\r\nRegisterClass(\"BABYLON.Vector4\", Vector4);\r\nRegisterClass(\"BABYLON.Matrix\", Matrix);\r\n\r\nconst mtxConvertNDCToHalfZRange = Matrix.FromValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1);\r\n"]}