mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 09:09:29 +01:00
Merge remote repo native into ext/native/.
This commit is contained in:
commit
f279c2a3c2
378 files changed
+190761
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "math/lin/vec3.h"
|
||||
#include "math/lin/matrix4x4.h"
|
||||
|
||||
Vec3 Vec3::operator *(const Matrix4x4 &m) const {
|
||||
return Vec3(x*m.xx + y*m.yx + z*m.zx + m.wx,
|
||||
x*m.xy + y*m.yy + z*m.zy + m.wy,
|
||||
x*m.xz + y*m.yz + z*m.zz + m.wz);
|
||||
}
|
||||
Vec4 Vec3::multiply4D(const Matrix4x4 &m) const {
|
||||
return Vec4(x*m.xx + y*m.yx + z*m.zx + m.wx,
|
||||
x*m.xy + y*m.yy + z*m.zy + m.wy,
|
||||
x*m.xz + y*m.yz + z*m.zz + m.wz,
|
||||
x*m.xw + y*m.yw + z*m.zw + m.ww);
|
||||
}
|
||||
Vec4 Vec4::multiply4D(Matrix4x4 &m) const {
|
||||
return Vec4(x*m.xx + y*m.yx + z*m.zx + w*m.wx,
|
||||
x*m.xy + y*m.yy + z*m.zy + w*m.wy,
|
||||
x*m.xz + y*m.yz + z*m.zz + w*m.wz,
|
||||
x*m.xw + y*m.yw + z*m.zw + w*m.ww);
|
||||
}
|
||||
|
||||
Vec3 Vec3::rotatedBy(const Matrix4x4 &m) const {
|
||||
return Vec3(x*m.xx + y*m.yx + z*m.zx,
|
||||
x*m.xy + y*m.yy + z*m.zy,
|
||||
x*m.xz + y*m.yz + z*m.zz);
|
||||
}
|
||||
Reference in new issue
Block a user