4#include "math/Matrix4.h"
20 Matrix4(
float _m00,
float _m01,
float _m02,
float _m03,
21 float _m10,
float _m11,
float _m12,
float _m13,
22 float _m20,
float _m21,
float _m22,
float _m23,
23 float _m30,
float _m31,
float _m32,
float _m33)
48 auto n = kmyMath::Matrix4::perspectiveFOV(fov * 2, asp, znear, zfar);
54 auto n = kmyMath::Matrix4::ortho(
left,
right, top, bottom, znear, zfar);
60 return Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1);
65 return Matrix4(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);
103 return Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
109 nm = kmyMath::Matrix4::inverse(nm);
121 kmyMath::Matrix4 res = nm1 * nm2;
250 if (x == 0.0f || y == 0.0f || z == 0.0f) {
251 PRINTF(
"Matrix4 scale reset error");
282 kmyMath::Vector3 v = nm.getEularZXY();
289 auto v = nm.getScale();
Vector3 getScale()
Definition: Matrix4.h:286
Vector3 translation()
Definition: Matrix4.h:229
Vector3 getEularZXY()
Definition: Matrix4.h:278
static Matrix4 ortho(float left, float right, float top, float bottom, float znear, float zfar)
Definition: Matrix4.h:52
float m31
Definition: Matrix4.h:18
static Matrix4 rotateX(float r)
Definition: Matrix4.h:68
static Vector4 operator*(Matrix4 m, Vector4 v)
Definition: Matrix4.h:169
float m02
Definition: Matrix4.h:15
static Matrix4 inverse(Matrix4 m)
Definition: Matrix4.h:106
float m10
Definition: Matrix4.h:16
float m30
Definition: Matrix4.h:18
static Matrix4 operator*(Matrix4 m1, Matrix4 m2)
Definition: Matrix4.h:114
float m12
Definition: Matrix4.h:16
float m22
Definition: Matrix4.h:17
static Matrix4 rotateZ(float r)
Definition: Matrix4.h:90
float m01
Definition: Matrix4.h:15
float m33
Definition: Matrix4.h:18
float m00
Definition: Matrix4.h:15
static Vector4 operator*(Matrix4 m, Vector3 v)
Definition: Matrix4.h:159
static Matrix4 scale(float x, float y, float z)
Definition: Matrix4.h:63
Vector3 left()
Definition: Matrix4.h:303
Vector3 up()
Definition: Matrix4.h:313
static Matrix4 fromNativeMatrix4(const kmyMath::Matrix4 &m)
Definition: Matrix4.h:204
float m23
Definition: Matrix4.h:17
Vector3 down()
Definition: Matrix4.h:318
float m20
Definition: Matrix4.h:17
Matrix4(float _m00, float _m01, float _m02, float _m03, float _m10, float _m11, float _m12, float _m13, float _m20, float _m21, float _m22, float _m23, float _m30, float _m31, float _m32, float _m33)
Definition: Matrix4.h:20
float m32
Definition: Matrix4.h:18
Vector3 front()
Definition: Matrix4.h:293
static Matrix4 perspectiveFOV(float fov, float asp, float znear, float zfar)
Definition: Matrix4.h:46
static Matrix4 identity()
Definition: Matrix4.h:101
static Matrix4 translate(float x, float y, float z)
Definition: Matrix4.h:58
kmyMath::Matrix4 toNativeMatrix4()
Definition: Matrix4.h:179
Matrix4 scaleIdentity()
Definition: Matrix4.h:243
float m13
Definition: Matrix4.h:16
float m03
Definition: Matrix4.h:15
static Matrix4 lookat(Vector3 eye, Vector3 target, Vector3 upvec)
Definition: Matrix4.h:126
Vector3 right()
Definition: Matrix4.h:308
Vector3 scale()
Definition: Matrix4.h:234
Vector3 back()
Definition: Matrix4.h:298
float m21
Definition: Matrix4.h:17
Matrix4 translateIdentity()
Definition: Matrix4.h:271
static Matrix4 rotateY(float r)
Definition: Matrix4.h:79
float m11
Definition: Matrix4.h:16
Definition: RefCapture.h:3
float y
Definition: Vector3.h:10
float z
Definition: Vector3.h:10
static Vector3 crossProduct(Vector3 v1, Vector3 v2)
Definition: Vector3.h:98
float x
Definition: Vector3.h:10
static Vector3 normalize(Vector3 v)
Definition: Vector3.h:29
float x
Definition: Vector4.h:9
float w
Definition: Vector4.h:9
float y
Definition: Vector4.h:9
float z
Definition: Vector4.h:9