RRTransformation

Objective-C

@interface RRTransformation : NSObject <NSCopying>

Swift

class RRTransformation : NSObject, NSCopying

Class for 3d object transformations. This class is used in the RRRenderable to define the transformation from local to global coordinate space during rendering

  • Default initializer. This initializer creates an identity transformation, which means that local and global coordinate system are identical.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Initializer that creates an RRTransformation instance that transforms from local to global homogeneous coordinate space by left multiplying provided matrix with local coordinates

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTransformationMatrix:(simd_float4x4)matrix;

    Swift

    init(transformationMatrix matrix: simd_float4x4)

    Parameters

    matrix

    The transformation matrix from local to global coordinate system

  • Getter for the transformation matrix that represents the coordinate transformation encoded in this RRTransformation instance

    Declaration

    Objective-C

    - (simd_float4x4)getTransformationMatrix;

    Swift

    func getMatrix() -> simd_float4x4

    Return Value

    The transformation matrix from local to global coordinate system

  • The 3d translation vector that is applied using this transformation

    Declaration

    Objective-C

    @property (nonatomic) simd_float3 translation;

    Swift

    var translation: simd_float3 { get set }
  • The 3d scale vector that is applied using this transformation. Each dimension can have a separate scale value.

    Declaration

    Objective-C

    @property (nonatomic) simd_float3 scale;

    Swift

    var scale: simd_float3 { get set }
  • The 3d rotation vector that is applied using this transformation. The x component represents the rotation around the x axis in degrees and y and z component are analogous.

    Declaration

    Objective-C

    @property (nonatomic) simd_float3 rotationAngles;

    Swift

    var rotationAngles: simd_float3 { get set }
  • Reset the transformation to the unity transformation

    Declaration

    Objective-C

    - (void)reset;

    Swift

    func reset()