ObjFW  Diff

Differences From Artifact [630e704e06]:

To Artifact [284898f541]:


180
181
182
183
184
185
186


























187
188
189
190
191
192
193
194
195
196
	    matrix->_values[14] * copy[15];
	_values[15] = matrix->_values[3] * copy[12] +
	    matrix->_values[7] * copy[13] +
	    matrix->_values[11] * copy[14] +
	    matrix->_values[15] * copy[15];
}



























- (OFPoint3D)transformedPoint3D: (OFPoint3D)point
{
	return OFMakePoint3D(
	    _values[0] * point.x + _values[4] * point.y +
	    _values[8] * point.z + _values[12],
	    _values[1] * point.x + _values[5] * point.y +
	    _values[9] * point.z + _values[13],
	    _values[2] * point.x + _values[6] * point.y +
	    _values[10] * point.z + _values[14]);
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	    matrix->_values[14] * copy[15];
	_values[15] = matrix->_values[3] * copy[12] +
	    matrix->_values[7] * copy[13] +
	    matrix->_values[11] * copy[14] +
	    matrix->_values[15] * copy[15];
}

- (void)translateWithVector3D: (OFVector3D)vector
{
	OFMatrix4x4 *translation = [[OFMatrix4x4 alloc] initWithValues:
	    (float [16]){
		1, 0, 0, 0,
		0, 1, 0, 0,
		0, 0, 1, 0,
		vector.x, vector.y, vector.z, 1
	    }];
	[self multiplyWithMatrix: translation];
	[translation release];
}

- (void)scaleWithVector3D: (OFVector3D)vector
{
	OFMatrix4x4 *scale = [[OFMatrix4x4 alloc] initWithValues:
	    (float [16]){
		vector.x, 0, 0, 0,
		0, vector.y, 0, 0,
		0, 0, vector.z, 0,
		0, 0, 0, 1
	    }];
	[self multiplyWithMatrix: scale];
	[scale release];
}

- (OFVector3D)transformedPoint3D: (OFVector3D)point
{
	return OFMakeVector3D(
	    _values[0] * point.x + _values[4] * point.y +
	    _values[8] * point.z + _values[12],
	    _values[1] * point.x + _values[5] * point.y +
	    _values[9] * point.z + _values[13],
	    _values[2] * point.x + _values[6] * point.y +
	    _values[10] * point.z + _values[14]);
}