MCPcopy Index your code
hub / github.com/jabbany/CommentCoreLibrary / rotationMatrix

Method rotationMatrix

src/scripting/api/Display/Matrix.ts:188–196  ·  view source on GitHub ↗
(angle:number, axis:Vector3D)

Source from the content-addressed store, hash-verified

186 }
187
188 private rotationMatrix(angle:number, axis:Vector3D):Array<number> {
189 var sT:number = Math.sin(angle), cT:number = Math.cos(angle);
190 return [
191 cT + axis.x * axis.x * (1 - cT), axis.x * axis.y * (1 - cT) - axis.z * sT, axis.x * axis.z * (1 - cT) + axis.y * sT, 0,
192 axis.x * axis.y * (1 - cT) + axis.z * sT, cT + axis.y * axis.y * (1 - cT), axis.y * axis.z * (1 - cT) - axis.x * sT, 0,
193 axis.z * axis.x * (1 - cT) - axis.y * sT, axis.z * axis.y * (1 - cT) + axis.x * sT, cT + axis.z * axis.z * (1 - cT), 0,
194 0, 0, 0, 1
195 ];
196 }
197
198 public identity():void {
199 this._data = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];

Callers 2

appendRotationMethod · 0.95
prependRotationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected