@@ -94,30 +94,49 @@ public void apply(float n00, float n01, float n02, float n03,
94
94
float n20 , float n21 , float n22 , float n23 ,
95
95
float n30 , float n31 , float n32 , float n33 );
96
96
97
+ /**
98
+ * Apply another matrix to the left of this one.
99
+ */
100
+ public void preApply (PMatrix left );
101
+
97
102
/**
98
103
* Apply another matrix to the left of this one.
99
104
*/
100
105
public void preApply (PMatrix2D left );
101
106
107
+ /**
108
+ * Apply another matrix to the left of this one. 3D only.
109
+ */
102
110
public void preApply (PMatrix3D left );
103
111
112
+ /**
113
+ * Apply another matrix to the left of this one.
114
+ */
104
115
public void preApply (float n00 , float n01 , float n02 ,
105
116
float n10 , float n11 , float n12 );
106
117
118
+ /**
119
+ * Apply another matrix to the left of this one. 3D only.
120
+ */
107
121
public void preApply (float n00 , float n01 , float n02 , float n03 ,
108
122
float n10 , float n11 , float n12 , float n13 ,
109
123
float n20 , float n21 , float n22 , float n23 ,
110
124
float n30 , float n31 , float n32 , float n33 );
111
125
112
126
113
127
/**
114
- * Multiply a PVector by this matrix.
128
+ * Multiply source by this matrix, and return the result.
129
+ * The result will be stored in target if target is non-null, and target
130
+ * will then be the matrix returned. This improves performance if you reuse
131
+ * target, so it's recommended if you call this many times in draw().
115
132
*/
116
133
public PVector mult (PVector source , PVector target );
117
134
118
135
119
136
/**
120
137
* Multiply a multi-element vector against this matrix.
138
+ * Supplying and recycling a target array improves performance, so it's
139
+ * recommended if you call this many times in draw().
121
140
*/
122
141
public float [] mult (float [] source , float [] target );
123
142
@@ -131,13 +150,14 @@ public void preApply(float n00, float n01, float n02, float n03,
131
150
132
151
133
152
/**
134
- * Transpose this matrix.
153
+ * Transpose this matrix; rows become columns and columns rows .
135
154
*/
136
155
public void transpose ();
137
156
138
157
139
158
/**
140
- * Invert this matrix.
159
+ * Invert this matrix. Will not necessarily succeed, because some matrices
160
+ * map more than one point to the same image point, and so are irreversible.
141
161
* @return true if successful
142
162
*/
143
163
public boolean invert ();
0 commit comments