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
|
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[16];
float _values[4][4];
}
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (readonly, class) OFMatrix4x4 *identityMatrix;
#endif
/**
* @brief An array of the 16 floats of the 4x4 matrix in column-major format.
* @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;
@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 An array of 16 floats in column-major format
* @param values A 2D array of 4x4 floats in row-major format
* @return A new, autoreleased OFMatrix4x4
*/
+ (instancetype)matrixWithValues: (const float [_Nonnull 16])values;
+ (instancetype)matrixWithValues: (const float [_Nonnull 4][4])values;
/**
* @brief Initializes an already allocated 4x4 matrix with the specified values.
*
* @param values An array of 16 floats in column-major format
* @param values A 2D array of 4x4 floats in row-major format
* @return An initialized OFMatrix4x4
*/
- (instancetype)initWithValues: (const float [_Nonnull 16])values;
- (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
*/
|