Lines Matching refs:matrix

40 			matrix[i][j] = (i == j) ? 1 : 0;  in set_identity()
51 matrix[i][j] = 0; in set_zero()
60 …ret.normal.x = matrix[0][0] * p_vec4.normal.x + matrix[1][0] * p_vec4.normal.y + matrix[2][0] * p_… in xform4()
61 …ret.normal.y = matrix[0][1] * p_vec4.normal.x + matrix[1][1] * p_vec4.normal.y + matrix[2][1] * p_… in xform4()
62 …ret.normal.z = matrix[0][2] * p_vec4.normal.x + matrix[1][2] * p_vec4.normal.y + matrix[2][2] * p_… in xform4()
63 …ret.d = matrix[0][3] * p_vec4.normal.x + matrix[1][3] * p_vec4.normal.y + matrix[2][3] * p_vec4.no… in xform4()
86 matrix[0][0] = cotangent / p_aspect; in set_perspective()
87 matrix[1][1] = cotangent; in set_perspective()
88 matrix[2][2] = -(p_z_far + p_z_near) / deltaZ; in set_perspective()
89 matrix[2][3] = -1; in set_perspective()
90 matrix[3][2] = -2 * p_z_near * p_z_far / deltaZ; in set_perspective()
91 matrix[3][3] = 0; in set_perspective()
98 matrix[0][0] = 2.0 / (p_right - p_left); in set_orthogonal()
99 matrix[3][0] = -((p_right + p_left) / (p_right - p_left)); in set_orthogonal()
100 matrix[1][1] = 2.0 / (p_top - p_bottom); in set_orthogonal()
101 matrix[3][1] = -((p_top + p_bottom) / (p_top - p_bottom)); in set_orthogonal()
102 matrix[2][2] = -2.0 / (p_zfar - p_znear); in set_orthogonal()
103 matrix[3][2] = -((p_zfar + p_znear) / (p_zfar - p_znear)); in set_orthogonal()
104 matrix[3][3] = 1.0; in set_orthogonal()
121 matrix[0][0]=(2*p_near) / (p_right-p_left); in set_frustum()
122 matrix[0][2]=(p_right+p_left) / (p_right-p_left); in set_frustum()
123 matrix[1][1]=(2*p_near) / (p_top-p_bottom); in set_frustum()
124 matrix[1][2]=(p_top+p_bottom) / (p_top-p_bottom); in set_frustum()
125 matrix[2][2]=-(p_far+p_near) / ( p_far-p_near); in set_frustum()
126 matrix[2][3]=-(2*p_far*p_near) / (p_far-p_near); in set_frustum()
127 matrix[3][2]=-1; in set_frustum()
128 matrix[3][3]=0; in set_frustum()
130 float *te = &matrix[0][0]; in set_frustum()
161 const float *matrix = (const float *)this->matrix; in get_z_far() local
162 Plane new_plane = Plane(matrix[3] - matrix[2], in get_z_far()
163 matrix[7] - matrix[6], in get_z_far()
164 matrix[11] - matrix[10], in get_z_far()
165 matrix[15] - matrix[14]); in get_z_far()
174 const float *matrix = (const float *)this->matrix; in get_z_near() local
175 Plane new_plane = Plane(matrix[3] + matrix[2], in get_z_near()
176 matrix[7] + matrix[6], in get_z_near()
177 matrix[11] + matrix[10], in get_z_near()
178 -matrix[15] - matrix[14]); in get_z_near()
186 const float *matrix = (const float *)this->matrix; in get_viewport_size() local
188 Plane near_plane = Plane(matrix[3] + matrix[2], in get_viewport_size()
189 matrix[7] + matrix[6], in get_viewport_size()
190 matrix[11] + matrix[10], in get_viewport_size()
191 -matrix[15] - matrix[14]); in get_viewport_size()
195 Plane right_plane = Plane(matrix[3] - matrix[0], in get_viewport_size()
196 matrix[7] - matrix[4], in get_viewport_size()
197 matrix[11] - matrix[8], in get_viewport_size()
198 -matrix[15] + matrix[12]); in get_viewport_size()
201 Plane top_plane = Plane(matrix[3] - matrix[1], in get_viewport_size()
202 matrix[7] - matrix[5], in get_viewport_size()
203 matrix[11] - matrix[9], in get_viewport_size()
204 -matrix[15] + matrix[13]); in get_viewport_size()
216 const float *matrix = (const float *)this->matrix; in get_endpoints() local
219 Plane near_plane = Plane(matrix[3] + matrix[2], in get_endpoints()
220 matrix[7] + matrix[6], in get_endpoints()
221 matrix[11] + matrix[10], in get_endpoints()
222 -matrix[15] - matrix[14]); in get_endpoints()
226 Plane far_plane = Plane(matrix[2] - matrix[3], in get_endpoints()
227 matrix[6] - matrix[7], in get_endpoints()
228 matrix[10] - matrix[11], in get_endpoints()
229 matrix[15] - matrix[14]); in get_endpoints()
233 Plane right_plane = Plane(matrix[0] - matrix[3], in get_endpoints()
234 matrix[4] - matrix[7], in get_endpoints()
235 matrix[8] - matrix[11], in get_endpoints()
236 -matrix[15] + matrix[12]); in get_endpoints()
240 Plane top_plane = Plane(matrix[1] - matrix[3], in get_endpoints()
241 matrix[5] - matrix[7], in get_endpoints()
242 matrix[9] - matrix[11], in get_endpoints()
243 -matrix[15] + matrix[13]); in get_endpoints()
277 const float *matrix = (const float *)this->matrix; in get_projection_planes() local
282 new_plane = Plane(matrix[3] + matrix[2], in get_projection_planes()
283 matrix[7] + matrix[6], in get_projection_planes()
284 matrix[11] + matrix[10], in get_projection_planes()
285 matrix[15] + matrix[14]); in get_projection_planes()
293 new_plane = Plane(matrix[3] - matrix[2], in get_projection_planes()
294 matrix[7] - matrix[6], in get_projection_planes()
295 matrix[11] - matrix[10], in get_projection_planes()
296 matrix[15] - matrix[14]); in get_projection_planes()
304 new_plane = Plane(matrix[3] + matrix[0], in get_projection_planes()
305 matrix[7] + matrix[4], in get_projection_planes()
306 matrix[11] + matrix[8], in get_projection_planes()
307 matrix[15] + matrix[12]); in get_projection_planes()
315 new_plane = Plane(matrix[3] - matrix[1], in get_projection_planes()
316 matrix[7] - matrix[5], in get_projection_planes()
317 matrix[11] - matrix[9], in get_projection_planes()
318 matrix[15] - matrix[13]); in get_projection_planes()
326 new_plane = Plane(matrix[3] - matrix[0], in get_projection_planes()
327 matrix[7] - matrix[4], in get_projection_planes()
328 matrix[11] - matrix[8], in get_projection_planes()
329 matrix[15] - matrix[12]); in get_projection_planes()
337 new_plane = Plane(matrix[3] + matrix[1], in get_projection_planes()
338 matrix[7] + matrix[5], in get_projection_planes()
339 matrix[11] + matrix[9], in get_projection_planes()
340 matrix[15] + matrix[13]); in get_projection_planes()
368 pvt_val = matrix[k][k]; /** Initialize for search **/ in invert()
373 if (Math::absd(matrix[i][j]) > Math::absd(pvt_val)) { in invert()
376 pvt_val = matrix[i][j]; in invert()
391 hold = -matrix[k][j]; in invert()
392 matrix[k][j] = matrix[i][j]; in invert()
393 matrix[i][j] = hold; in invert()
401 hold = -matrix[i][k]; in invert()
402 matrix[i][k] = matrix[i][j]; in invert()
403 matrix[i][j] = hold; in invert()
409 if (i != k) matrix[i][k] /= (-pvt_val); in invert()
414 hold = matrix[i][k]; in invert()
416 if (i != k && j != k) matrix[i][j] += hold * matrix[k][j]; in invert()
422 if (j != k) matrix[k][j] /= pvt_val; in invert()
426 matrix[k][k] = 1.0 / pvt_val; in invert()
435 hold = matrix[k][j]; in invert()
436 matrix[k][j] = -matrix[i][j]; in invert()
437 matrix[i][j] = hold; in invert()
444 hold = matrix[i][k]; in invert()
445 matrix[i][k] = -matrix[i][j]; in invert()
446 matrix[i][j] = hold; in invert()
464 ab += matrix[k][i] * p_matrix.matrix[j][k]; in operator *()
465 new_matrix.matrix[j][i] = ab; in operator *()
474 float *m = &matrix[0][0]; in set_light_bias()
499 str += String((j > 0) ? ", " : "\n") + rtos(matrix[i][j]); in operator String()
512 const float *matrix = (const float *)this->matrix; in get_fov() local
514 Plane right_plane = Plane(matrix[3] - matrix[0], in get_fov()
515 matrix[7] - matrix[4], in get_fov()
516 matrix[11] - matrix[8], in get_fov()
517 -matrix[15] + matrix[12]); in get_fov()
526 matrix[0][0] = p_scale.x; in make_scale()
527 matrix[1][1] = p_scale.y; in make_scale()
528 matrix[2][2] = p_scale.z; in make_scale()
536 matrix[0][0] = 2 / (max.x - min.x); in scale_translate_to_fit()
537 matrix[1][0] = 0; in scale_translate_to_fit()
538 matrix[2][0] = 0; in scale_translate_to_fit()
539 matrix[3][0] = -(max.x + min.x) / (max.x - min.x); in scale_translate_to_fit()
541 matrix[0][1] = 0; in scale_translate_to_fit()
542 matrix[1][1] = 2 / (max.y - min.y); in scale_translate_to_fit()
543 matrix[2][1] = 0; in scale_translate_to_fit()
544 matrix[3][1] = -(max.y + min.y) / (max.y - min.y); in scale_translate_to_fit()
546 matrix[0][2] = 0; in scale_translate_to_fit()
547 matrix[1][2] = 0; in scale_translate_to_fit()
548 matrix[2][2] = 2 / (max.z - min.z); in scale_translate_to_fit()
549 matrix[3][2] = -(max.z + min.z) / (max.z - min.z); in scale_translate_to_fit()
551 matrix[0][3] = 0; in scale_translate_to_fit()
552 matrix[1][3] = 0; in scale_translate_to_fit()
553 matrix[2][3] = 0; in scale_translate_to_fit()
554 matrix[3][3] = 1; in scale_translate_to_fit()
560 const float *m = &matrix[0][0]; in operator Transform()
584 float *m = &matrix[0][0]; in CameraMatrix()