Lines Matching refs:ret
65 Mat4 ret; in operator *() local
66 ret.f_[0] = f_[0] * rhs.f_[0] + f_[4] * rhs.f_[1] + f_[8] * rhs.f_[2] in operator *()
68 ret.f_[1] = f_[1] * rhs.f_[0] + f_[5] * rhs.f_[1] + f_[9] * rhs.f_[2] in operator *()
70 ret.f_[2] = f_[2] * rhs.f_[0] + f_[6] * rhs.f_[1] + f_[10] * rhs.f_[2] in operator *()
72 ret.f_[3] = f_[3] * rhs.f_[0] + f_[7] * rhs.f_[1] + f_[11] * rhs.f_[2] in operator *()
75 ret.f_[4] = f_[0] * rhs.f_[4] + f_[4] * rhs.f_[5] + f_[8] * rhs.f_[6] in operator *()
77 ret.f_[5] = f_[1] * rhs.f_[4] + f_[5] * rhs.f_[5] + f_[9] * rhs.f_[6] in operator *()
79 ret.f_[6] = f_[2] * rhs.f_[4] + f_[6] * rhs.f_[5] + f_[10] * rhs.f_[6] in operator *()
81 ret.f_[7] = f_[3] * rhs.f_[4] + f_[7] * rhs.f_[5] + f_[11] * rhs.f_[6] in operator *()
84 ret.f_[8] = f_[0] * rhs.f_[8] + f_[4] * rhs.f_[9] + f_[8] * rhs.f_[10] in operator *()
86 ret.f_[9] = f_[1] * rhs.f_[8] + f_[5] * rhs.f_[9] + f_[9] * rhs.f_[10] in operator *()
88 ret.f_[10] = f_[2] * rhs.f_[8] + f_[6] * rhs.f_[9] + f_[10] * rhs.f_[10] in operator *()
90 ret.f_[11] = f_[3] * rhs.f_[8] + f_[7] * rhs.f_[9] + f_[11] * rhs.f_[10] in operator *()
93 ret.f_[12] = f_[0] * rhs.f_[12] + f_[4] * rhs.f_[13] + f_[8] * rhs.f_[14] in operator *()
95 ret.f_[13] = f_[1] * rhs.f_[12] + f_[5] * rhs.f_[13] + f_[9] * rhs.f_[14] in operator *()
97 ret.f_[14] = f_[2] * rhs.f_[12] + f_[6] * rhs.f_[13] + f_[10] * rhs.f_[14] in operator *()
99 ret.f_[15] = f_[3] * rhs.f_[12] + f_[7] * rhs.f_[13] + f_[11] * rhs.f_[14] in operator *()
102 return ret; in operator *()
107 Vec4 ret; in operator *() local
108 ret.x_ = rhs.x_ * f_[0] + rhs.y_ * f_[4] + rhs.z_ * f_[8] + rhs.w_ * f_[12]; in operator *()
109 ret.y_ = rhs.x_ * f_[1] + rhs.y_ * f_[5] + rhs.z_ * f_[9] + rhs.w_ * f_[13]; in operator *()
110 ret.z_ = rhs.x_ * f_[2] + rhs.y_ * f_[6] + rhs.z_ * f_[10] + rhs.w_ * f_[14]; in operator *()
111 ret.w_ = rhs.x_ * f_[3] + rhs.y_ * f_[7] + rhs.z_ * f_[11] + rhs.w_ * f_[15]; in operator *()
112 return ret; in operator *()
117 Mat4 ret; in Inverse() local
162 ret.f_[0] = (f_[5] * f_[10] - f_[9] * f_[6]) * det_1; in Inverse()
163 ret.f_[1] = -(f_[1] * f_[10] - f_[9] * f_[2]) * det_1; in Inverse()
164 ret.f_[2] = (f_[1] * f_[6] - f_[5] * f_[2]) * det_1; in Inverse()
165 ret.f_[4] = -(f_[4] * f_[10] - f_[8] * f_[6]) * det_1; in Inverse()
166 ret.f_[5] = (f_[0] * f_[10] - f_[8] * f_[2]) * det_1; in Inverse()
167 ret.f_[6] = -(f_[0] * f_[6] - f_[4] * f_[2]) * det_1; in Inverse()
168 ret.f_[8] = (f_[4] * f_[9] - f_[8] * f_[5]) * det_1; in Inverse()
169 ret.f_[9] = -(f_[0] * f_[9] - f_[8] * f_[1]) * det_1; in Inverse()
170 ret.f_[10] = (f_[0] * f_[5] - f_[4] * f_[1]) * det_1; in Inverse()
173 ret.f_[12] = -(f_[12] * ret.f_[0] + f_[13] * ret.f_[4] + f_[14] * ret.f_[8]); in Inverse()
174 ret.f_[13] = -(f_[12] * ret.f_[1] + f_[13] * ret.f_[5] + f_[14] * ret.f_[9]); in Inverse()
175 ret.f_[14] = -(f_[12] * ret.f_[2] + f_[13] * ret.f_[6] + f_[14] * ret.f_[10]); in Inverse()
177 ret.f_[3] = 0.0f; in Inverse()
178 ret.f_[7] = 0.0f; in Inverse()
179 ret.f_[11] = 0.0f; in Inverse()
180 ret.f_[15] = 1.0f; in Inverse()
183 *this = ret; in Inverse()
192 Mat4 ret; in RotationX() local
198 ret.f_[0] = 1.0f; in RotationX()
199 ret.f_[4] = 0.0f; in RotationX()
200 ret.f_[8] = 0.0f; in RotationX()
201 ret.f_[12] = 0.0f; in RotationX()
202 ret.f_[1] = 0.0f; in RotationX()
203 ret.f_[5] = fCosine; in RotationX()
204 ret.f_[9] = fSine; in RotationX()
205 ret.f_[13] = 0.0f; in RotationX()
206 ret.f_[2] = 0.0f; in RotationX()
207 ret.f_[6] = -fSine; in RotationX()
208 ret.f_[10] = fCosine; in RotationX()
209 ret.f_[14] = 0.0f; in RotationX()
210 ret.f_[3] = 0.0f; in RotationX()
211 ret.f_[7] = 0.0f; in RotationX()
212 ret.f_[11] = 0.0f; in RotationX()
213 ret.f_[15] = 1.0f; in RotationX()
214 return ret; in RotationX()
219 Mat4 ret; in RotationY() local
225 ret.f_[0] = fCosine; in RotationY()
226 ret.f_[4] = 0.0f; in RotationY()
227 ret.f_[8] = -fSine; in RotationY()
228 ret.f_[12] = 0.0f; in RotationY()
229 ret.f_[1] = 0.0f; in RotationY()
230 ret.f_[5] = 1.0f; in RotationY()
231 ret.f_[9] = 0.0f; in RotationY()
232 ret.f_[13] = 0.0f; in RotationY()
233 ret.f_[2] = fSine; in RotationY()
234 ret.f_[6] = 0.0f; in RotationY()
235 ret.f_[10] = fCosine; in RotationY()
236 ret.f_[14] = 0.0f; in RotationY()
237 ret.f_[3] = 0.0f; in RotationY()
238 ret.f_[7] = 0.0f; in RotationY()
239 ret.f_[11] = 0.0f; in RotationY()
240 ret.f_[15] = 1.0f; in RotationY()
241 return ret; in RotationY()
247 Mat4 ret; in RotationZ() local
253 ret.f_[0] = fCosine; in RotationZ()
254 ret.f_[4] = fSine; in RotationZ()
255 ret.f_[8] = 0.0f; in RotationZ()
256 ret.f_[12] = 0.0f; in RotationZ()
257 ret.f_[1] = -fSine; in RotationZ()
258 ret.f_[5] = fCosine; in RotationZ()
259 ret.f_[9] = 0.0f; in RotationZ()
260 ret.f_[13] = 0.0f; in RotationZ()
261 ret.f_[2] = 0.0f; in RotationZ()
262 ret.f_[6] = 0.0f; in RotationZ()
263 ret.f_[10] = 1.0f; in RotationZ()
264 ret.f_[14] = 0.0f; in RotationZ()
265 ret.f_[3] = 0.0f; in RotationZ()
266 ret.f_[7] = 0.0f; in RotationZ()
267 ret.f_[11] = 0.0f; in RotationZ()
268 ret.f_[15] = 1.0f; in RotationZ()
269 return ret; in RotationZ()
274 Mat4 ret; in Translation() local
275 ret.f_[0] = 1.0f; in Translation()
276 ret.f_[4] = 0.0f; in Translation()
277 ret.f_[8] = 0.0f; in Translation()
278 ret.f_[12] = fX; in Translation()
279 ret.f_[1] = 0.0f; in Translation()
280 ret.f_[5] = 1.0f; in Translation()
281 ret.f_[9] = 0.0f; in Translation()
282 ret.f_[13] = fY; in Translation()
283 ret.f_[2] = 0.0f; in Translation()
284 ret.f_[6] = 0.0f; in Translation()
285 ret.f_[10] = 1.0f; in Translation()
286 ret.f_[14] = fZ; in Translation()
287 ret.f_[3] = 0.0f; in Translation()
288 ret.f_[7] = 0.0f; in Translation()
289 ret.f_[11] = 0.0f; in Translation()
290 ret.f_[15] = 1.0f; in Translation()
291 return ret; in Translation()
296 Mat4 ret; in Translation() local
297 ret.f_[0] = 1.0f; in Translation()
298 ret.f_[4] = 0.0f; in Translation()
299 ret.f_[8] = 0.0f; in Translation()
300 ret.f_[12] = vec.x_; in Translation()
301 ret.f_[1] = 0.0f; in Translation()
302 ret.f_[5] = 1.0f; in Translation()
303 ret.f_[9] = 0.0f; in Translation()
304 ret.f_[13] = vec.y_; in Translation()
305 ret.f_[2] = 0.0f; in Translation()
306 ret.f_[6] = 0.0f; in Translation()
307 ret.f_[10] = 1.0f; in Translation()
308 ret.f_[14] = vec.z_; in Translation()
309 ret.f_[3] = 0.0f; in Translation()
310 ret.f_[7] = 0.0f; in Translation()
311 ret.f_[11] = 0.0f; in Translation()
312 ret.f_[15] = 1.0f; in Translation()
313 return ret; in Translation()