matrix_double4x4

public extension matrix_double4x4
extension matrix_double4x4: Interpolatable
  • Returns the identity matrix of a matrix_double4x4.

    Declaration

    Swift

    static var identity: matrix_double4x4 { get }
  • Returns a matrix_double4x4 with all zeros.

    Declaration

    Swift

    static var zero: matrix_double4x4 { get }
  • Initializes a matrix_double4x4 with a CATransform3D.

    Declaration

    Swift

    init(_ transform: CATransform3D)
  • Decomposes this matrix into its specific transform attributes (scale, translation, etc.) and returns a Decomposed struct to alter / recompose it.

    Declaration

    Swift

    func decomposed() -> DecomposedTransform
  • The translation of the transformation matrix.

    Declaration

    Swift

    var translation: simd_double3 { get set }
  • Returns a copy by translating the current transformation matrix by the given translation amount.

    Declaration

    Swift

    func translated(by translation: simd_double3) -> simd_double4x4
  • Translates the current transformation matrix by the given translation amount.

    Declaration

    Swift

    mutating func translate(by t: simd_double3)
  • The scale of the transformation matrix.

    Declaration

    Swift

    var scale: simd_double3 { get set }
  • Returns a copy by scaling the current transformation matrix by the given scale.

    Declaration

    Swift

    func scaled(by scale: simd_double3) -> simd_double4x4
  • Scales the current transformation matrix by the given scale.

    Declaration

    Swift

    mutating func scale(by s: simd_double3)
  • The rotation of the transformation matrix (expressed as a quaternion).

    Declaration

    Swift

    var rotation: simd_quatd { get set }
  • Returns a copy by applying a rotation transform (expressed as a quaternion) to the current transformation matrix.

    Declaration

    Swift

    func rotated(by quaternion: simd_quatd) -> simd_double4x4
  • Rotates the current rotation by applying a rotation transform (expressed as a quaternion) to the current transformation matrix.

    Declaration

    Swift

    mutating func rotate(by q: simd_quatd)
  • The rotation of the transformation matrix (expressed as euler angles, expressed in radians).

    Declaration

    Swift

    var eulerAngles: simd_double3 { get set }
  • Returns a copy by applying a rotation transform (expressed as euler angles, expressed in radians) to the current transformation matrix.

    Declaration

    Swift

    func rotated(by eulerAngles: simd_double3) -> simd_double4x4
  • Rotates the current rotation by applying a rotation transform (expressed as euler angles, expressed in radians) to the current transformation matrix.

    Declaration

    Swift

    mutating func rotate(by eulerAngles: simd_double3)
  • The skew of the transformation matrix.

    Declaration

    Swift

    var skew: simd_double3 { get set }
  • Returns a copy by skewing the current transformation matrix by a given skew.

    Declaration

    Swift

    func skewed(by skew: simd_double3) -> simd_double4x4
  • Skews the current transformation matrix by the given skew.

    Declaration

    Swift

    mutating func skew(by s: simd_double3)
  • The perspective of the transformation matrix.

    Declaration

    Swift

    var perspective: simd_double4 { get set }
  • Returns a copy by changing the perspective of the current transformation matrix.

    Declaration

    Swift

    func applyingPerspective(_ p: simd_double4) -> simd_double4x4
  • Sets the perspective of the current transformation matrix.

    Declaration

    Swift

    mutating func applyPerspective(_ p: simd_double4)

DecomposedTransform