Differences From Artifact [d21230dbdd]:
- File src/OFMatrix4x4.h — part of check-in [e31a31bdcb] at 2023-02-18 12:01:58 on branch trunk — OFMatrix4x4: Transform vectors in 4D space (user: js, size: 2386) [annotate] [blame] [check-ins using]
To Artifact [817b6aa381]:
- File
src/OFMatrix4x4.h
— part of check-in
[975a812f36]
at
2023-02-19 13:37:44
on branch trunk
— OFMatrix4x4: Use 2D arrays in row-major format
This allows writing matrices more naturally, without having to transpose
them in the source. (user: js, size: 2396) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | /** * @brief A 4x4 matrix of floats. */ OF_SUBCLASSING_RESTRICTED @interface OFMatrix4x4: OFObject <OFCopying> { | | | | | | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /** * @brief A 4x4 matrix of floats. */ OF_SUBCLASSING_RESTRICTED @interface OFMatrix4x4: OFObject <OFCopying> { float _values[4][4]; } #ifdef OF_HAVE_CLASS_PROPERTIES @property (readonly, class) OFMatrix4x4 *identityMatrix; #endif /** * @brief A 2D array of the 4x4 floats of the matrix in row-major format. * * These may be modified directly. */ @property (readonly, nonatomic) float (*values)[4][4]; /** * @brief Returns the 4x4 identity matrix. */ + (OFMatrix4x4 *)identityMatrix; /** * @brief Creates a new 4x4 matrix with the specified values. * * @param values A 2D array of 4x4 floats in row-major format * @return A new, autoreleased OFMatrix4x4 */ + (instancetype)matrixWithValues: (const float [_Nonnull 4][4])values; /** * @brief Initializes an already allocated 4x4 matrix with the specified values. * * @param values A 2D array of 4x4 floats in row-major format * @return An initialized OFMatrix4x4 */ - (instancetype)initWithValues: (const float [_Nonnull 4][4])values; /** * @brief Mulitplies the receiver with the specified matrix on the left side * and the receiver on the right side. * * @param matrix The matrix to multiply the receiver with */ |
︙ | ︙ |