CATransform3D

public extension CATransform3D
extension CATransform3D: Interpolatable
  • Returns the identity matrix of CATransform3D

    Declaration

    Swift

    static var identity: CATransform3D { get }
  • Returns the a CATransform3D initialized with all zeros.

    Declaration

    Swift

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

    Declaration

    Swift

    init(_ matrix: matrix_double4x4)
  • No overview available.

    Declaration

    Swift

    init(_ matrix: matrix_float4x4)
  • No overview available.

    Declaration

    Swift

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

    Declaration

    Swift

    var translation: Translation { get set }
  • Returns a copy by translating the current transform by the given translation amount.

    Declaration

    Swift

    func translated(by translation: Translation) -> CATransform3D
  • Returns a copy by translating the current transform by the given translation components.

    Note

    Omitted components have no effect on the translation.

    Declaration

    Swift

    func translatedBy(x: CGFloat = 0.0, y: CGFloat = 0.0, z: CGFloat = 0.0) -> CATransform3D
  • Returns a copy by translating the current transform by the given translation components.

    Note

    Omitted components have no effect on the translation.

    Declaration

    Swift

    func translated(by translation: CGPoint) -> CATransform3D
  • Translates the current transform by the given translation amount.

    Declaration

    Swift

    mutating func translate(by translation: Translation)
  • Translates the current transform by the given translation amount.

    Declaration

    Swift

    mutating func translate(by translation: CGPoint)
  • The scale of the transform.

    Declaration

    Swift

    var scale: Scale { get set }
  • Returns a copy by scaling the current transform by the given scale.

    Declaration

    Swift

    func scaled(by scale: Scale) -> CATransform3D
  • Returns a copy by scaling the current transform by the given scale.

    Declaration

    Swift

    func scaled(by scale: CGPoint) -> CATransform3D
  • Returns a copy by scaling the current transform by the given scale.

    Note

    Omitted components have no effect on the scale.

    Declaration

    Swift

    func scaledBy(x: CGFloat = 1.0, y: CGFloat = 1.0, z: CGFloat = 1.0) -> CATransform3D
  • Scales the current transform by the given scale.

    Declaration

    Swift

    mutating func scale(by scale: Scale)
  • Scales the current transform by the given scale.

    Declaration

    Swift

    mutating func scale(by scale: CGPoint)
  • The rotation of the transform (expressed as a quaternion).

    Declaration

    Swift

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

    Declaration

    Swift

    func rotated(by rotation: CGQuaternion) -> CATransform3D
  • Returns a copy by applying a rotation transform (expressed as a quaternion) to the current transform.

    Note

    Omitted components have no effect on the rotation.

    Declaration

    Swift

    func rotatedBy(angle: CGFloat = 0.0, x: CGFloat = 0.0, y: CGFloat = 0.0, z: CGFloat = 0.0) -> CATransform3D
  • Rotates the current rotation by applying a rotation transform (expressed as a quaternion) to the current transform.

    Declaration

    Swift

    mutating func rotate(by rotation: CGQuaternion)
  • The rotation of the transform, expressed in radians.

    Declaration

    Swift

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

    Declaration

    Swift

    func rotated(by eulerAngles: CGVector3) -> CATransform3D
  • Returns a copy by applying a rotation transform (expressed as euler angles, expressed in radians) to the current transform.

    Note

    Omitted components have no effect on the rotation.

    Declaration

    Swift

    func rotatedBy(x: CGFloat = 0.0, y: CGFloat = 0.0, z: CGFloat = 0.0) -> CATransform3D
  • Rotates the current rotation by applying a rotation transform (expressed as euler angles, expressed in radians) to the current transform.

    Declaration

    Swift

    mutating func rotate(by eulerAngles: CGVector3)
  • The skew of the transform.

    Declaration

    Swift

    var skew: Skew { get set }
  • Returns a copy by skewing the current transform by a given skew.

    Declaration

    Swift

    func skewed(by skew: Skew) -> CATransform3D
  • Returns a copy by skewing the current transform by the given skew components.

    Note

    Omitted components have no effect on the skew.

    Declaration

    Swift

    func skewedBy(xy: CGFloat? = nil, xz: CGFloat? = nil, yz: CGFloat? = nil) -> CATransform3D
  • No overview available.

    Declaration

    Swift

    mutating func skew(by skew: Skew)
  • The perspective of the transform.

    Declaration

    Swift

    var perspective: Perspective { get set }
  • Returns a copy by changing the perspective of the current transform.

    Declaration

    Swift

    func applyingPerspective(_ perspective: Perspective) -> CATransform3D
  • Returns a copy by changing the perspective of the current transform.

    Note

    Omitted components have no effect on the perspective.

    Declaration

    Swift

    func applyingPerspective(m14: CGFloat? = nil, m24: CGFloat? = nil, m34: CGFloat? = nil, m44: CGFloat? = nil) -> CATransform3D
  • Sets the perspective of the current transform.

    Declaration

    Swift

    mutating func applyPerspective(_ perspective: Perspective)

DecomposedTransform

  • Represents a decomposed CATransform3D in which the transform is broken down into its transform attributes (scale, translation, etc.).

    See more

    Declaration

    Swift

    struct DecomposedTransform
    extension CATransform3D.DecomposedTransform: Interpolatable

CATransform3D Extensions

  • Declaration

    Swift

    public func lerp(to: `Self`, fraction: CGFloat) -> CATransform3D