File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -496,24 +496,6 @@ extension SplatRenderer.Splat {
496496 rotation: rotation)
497497 }
498498
499- static func quaternionToMatrix( quaternion: simd_quatf ) -> simd_float3x3 {
500- var rotationMatrix = simd_float3x3 ( )
501- let x = quaternion. imag. x
502- let y = quaternion. imag. y
503- let z = quaternion. imag. z
504- let w = quaternion. real
505- rotationMatrix [ 0 , 0 ] = 1 - 2 * ( z * z + w * w)
506- rotationMatrix [ 0 , 1 ] = 2 * ( y * z + x * w)
507- rotationMatrix [ 0 , 2 ] = 2 * ( y * w - x * z)
508- rotationMatrix [ 1 , 0 ] = 2 * ( y * z - x * w)
509- rotationMatrix [ 1 , 1 ] = 1 - 2 * ( y * y + w * w)
510- rotationMatrix [ 1 , 2 ] = 2 * ( z * w + x * y)
511- rotationMatrix [ 2 , 0 ] = 2 * ( y * w + x * z)
512- rotationMatrix [ 2 , 1 ] = 2 * ( z * w - x * y)
513- rotationMatrix [ 2 , 2 ] = 1 - 2 * ( y * y + z * z)
514- return rotationMatrix
515- }
516-
517499 init ( position: SIMD3 < Float > ,
518500 color: SIMD4 < Float > ,
519501 scale: SIMD3 < Float > ,
You can’t perform that action at this time.
0 commit comments